individual buttons

This commit is contained in:
James B. Pollack 2016-04-26 17:00:12 -07:00
parent e24c6f1b17
commit fc5960fa15
5 changed files with 25 additions and 1 deletions

View file

@ -32,12 +32,15 @@
z: 13501 z: 13501
}, },
preload: function(entityId) { preload: function(entityId) {
print('CELL PRELOAD CeLLS 1 ')
this.entityId = entityId; this.entityId = entityId;
this.addButton(); this.addButton();
Controller.mousePressEvent.connect(this.onClick); Controller.mousePressEvent.connect(this.onClick);
print('CELL PRELOAD CeLLS 2 ')
}, },
addButton: function() { addButton: function() {
if (this.hasButton === false) { if (this.hasButton === false) {
print('CELL ADDBuTTON CeLLS 1 ')
var windowDimensions = Controller.getViewportDimensions(); var windowDimensions = Controller.getViewportDimensions();
var buttonWidth = 150; var buttonWidth = 150;
var buttonHeight = 50; var buttonHeight = 50;
@ -55,6 +58,9 @@
alpha: 1.0 alpha: 1.0
}); });
this.hasButton = true; this.hasButton = true;
print('CELL ADDBuTTON CeLLS 2 button id is : ' +button)
} else {
print('CELL ADDBUTTON CeLLS FAIL - hasButton is' + this.hasButton)
} }
}, },
onClick: function(event) { onClick: function(event) {

View file

@ -38,12 +38,15 @@
z: 13501 z: 13501
}, },
preload: function(entityId) { preload: function(entityId) {
print('CELL PRELOAD HEXOKINASE 1')
this.entityId = entityId; this.entityId = entityId;
this.addButton(); this.addButton();
Controller.mousePressEvent.connect(this.onClick); Controller.mousePressEvent.connect(this.onClick);
print('CELL PRELOAD HEXOKINASE 2')
}, },
addButton: function() { addButton: function() {
if (this.hasButton === false) { if (this.hasButton === false) {
print('CELL ADDBUTTON HEXOKINASE 1')
var windowDimensions = Controller.getViewportDimensions(); var windowDimensions = Controller.getViewportDimensions();
var buttonWidth = 150; var buttonWidth = 150;
var buttonHeight = 50; var buttonHeight = 50;
@ -61,6 +64,9 @@
alpha: 1.0 alpha: 1.0
}); });
this.hasButton = true; this.hasButton = true;
print('CELL ADDBUTTON HEXOKINASE 2 button id is : ' +button)
} else {
print('CELL ADDBUTTON HEXOKINASE FAIL hasButton is' + this.hasButton)
} }
}, },
onClick: function(event) { onClick: function(event) {

View file

@ -32,12 +32,15 @@
z: 4405.6 z: 4405.6
}, },
preload: function(entityId) { preload: function(entityId) {
print('CeLL PRELOAD INSIDECELL 1')
this.entityId = entityId; this.entityId = entityId;
this.addButton(); this.addButton();
Controller.mousePressEvent.connect(this.onClick); Controller.mousePressEvent.connect(this.onClick);
print('CeLL PRELOAD INSIDECELL 2')
}, },
addButton: function() { addButton: function() {
if (this.hasButton === false) { if (this.hasButton === false) {
print('CELL ADDBUTTON INSIDECELL 1')
var windowDimensions = Controller.getViewportDimensions(); var windowDimensions = Controller.getViewportDimensions();
var buttonWidth = 150; var buttonWidth = 150;
var buttonHeight = 50; var buttonHeight = 50;
@ -55,6 +58,9 @@
alpha: 1.0 alpha: 1.0
}); });
this.hasButton = true; this.hasButton = true;
print('CELL ADDBUTTON INSIDECELL 2 button id is : ' +button)
} else {
print('CELL ADDBUTTON INSIDECELL FAIL - hasButton is' + this.hasButton)
} }
}, },
onClick: function(event) { onClick: function(event) {

View file

@ -31,12 +31,15 @@
z: 4405.6 z: 4405.6
}, },
preload: function(entityId) { preload: function(entityId) {
print('CELL PRELOAD RIBOSOME 1')
this.entityId = entityId; this.entityId = entityId;
this.addButton(); this.addButton();
Controller.mousePressEvent.connect(this.onClick); Controller.mousePressEvent.connect(this.onClick);
print('CELL PRELOAD RIBOSOME 2')
}, },
addButton: function() { addButton: function() {
if (this.hasButton === false) { if (this.hasButton === false) {
print('CELL ADBUTTON RIBOSOME 1')
var windowDimensions = Controller.getViewportDimensions(); var windowDimensions = Controller.getViewportDimensions();
var buttonWidth = 150; var buttonWidth = 150;
var buttonHeight = 50; var buttonHeight = 50;
@ -54,6 +57,9 @@
alpha: 1.0 alpha: 1.0
}); });
this.hasButton = true; this.hasButton = true;
print('CELL ADDBUTTON RIBOSOME 2 button id is : ' +button)
} else {
print('CELL ADDBUTTON RIBOSOME FAIL - hasButton is' + this.hasButton)
} }
}, },
onClick: function(event) { onClick: function(event) {

View file

@ -5,7 +5,7 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
var version = 1216; var version = 1217;
var WORLD_OFFSET = { var WORLD_OFFSET = {
x: 0, x: 0,