@@ -28,12 +28,12 @@ def gui(self, parent):
2828 self .label1 .place (x = 0 , y = 550 , width = 130 , height = 32 )
2929 self .output = Text (self .w1 , font = tkinter .font .Font (family = "MS Shell Dlg 2" , size = 8 ), cursor = "arrow" , state = "normal" )
3030 self .output .place (x = 10 , y = 10 , width = 390 , height = 370 )
31- self .set_varible = Button (self .w1 , text = "set varible" , font = tkinter .font .Font (family = "MS Shell Dlg 2" , size = 8 ), cursor = "arrow" , state = "normal" )
31+ self .set_varible = Button (self .w1 , text = "set varible" , bg = "#ffff00" , fg = "#000000" , font = tkinter .font .Font (family = "MS Shell Dlg 2" , size = 8 ), cursor = "arrow" , state = "normal" )
3232 self .set_varible .place (x = 420 , y = 50 , width = 140 , height = 22 )
3333 self .set_varible ['command' ] = self .setvar
3434 self .button1_copy = Button (self .w1 , text = "set varible" , font = tkinter .font .Font (family = "MS Shell Dlg 2" , size = 8 ), cursor = "arrow" , state = "normal" )
3535 self .button1_copy .place (x = 1990 , y = 360 , width = 140 , height = 22 )
36- self .get_varible = Button (self .w1 , text = "get varible" , font = tkinter .font .Font (family = "MS Shell Dlg 2" , size = 8 ), cursor = "arrow" , state = "normal" )
36+ self .get_varible = Button (self .w1 , text = "get varible" , bg = "#ffff00" , fg = "#000000" , font = tkinter .font .Font (family = "MS Shell Dlg 2" , size = 8 ), cursor = "arrow" , state = "normal" )
3737 self .get_varible .place (x = 420 , y = 80 , width = 140 , height = 22 )
3838 self .get_varible ['command' ] = self .getvar
3939 self .onkeydown = Button (self .w1 , text = "on keydown" , bg = "#005500" , font = tkinter .font .Font (family = "MS Shell Dlg 2" , size = 8 ), cursor = "arrow" , state = "normal" )
@@ -52,10 +52,10 @@ def gui(self, parent):
5252 self .onmouseup ['command' ] = self .mouseup
5353 self .label3 = Label (self .w1 , text = "scene nodes" , fg = "#000000" , font = tkinter .font .Font (family = "MS Shell Dlg 2" , size = 8 ), cursor = "arrow" , state = "normal" )
5454 self .label3 .place (x = 260 , y = 390 , width = 90 , height = 22 )
55- self .button7 = Button (self .w1 , text = "clone node" , bg = "#00007f" , font = tkinter .font .Font (family = "MS Shell Dlg 2" , size = 8 ), cursor = "arrow" , state = "normal" )
55+ self .button7 = Button (self .w1 , text = "clone node" , bg = "#00007f" , fg = "#666666" , font = tkinter .font .Font (family = "MS Shell Dlg 2" , size = 8 ), cursor = "arrow" , state = "normal" )
5656 self .button7 .place (x = 260 , y = 420 , width = 120 , height = 22 )
5757 self .button7 ['command' ] = self .clonenode
58- self .button8 = Button (self .w1 , text = "remove node" , bg = "#00007f" , font = tkinter .font .Font (family = "MS Shell Dlg 2" , size = 8 ), cursor = "arrow" , state = "normal" )
58+ self .button8 = Button (self .w1 , text = "remove node" , bg = "#00007f" , fg = "#666666" , font = tkinter .font .Font (family = "MS Shell Dlg 2" , size = 8 ), cursor = "arrow" , state = "normal" )
5959 self .button8 .place (x = 260 , y = 450 , width = 120 , height = 22 )
6060 self .button8 ['command' ] = self .removenode
6161 self .label4 = Label (self .w1 , text = "various" , fg = "#000000" , font = tkinter .font .Font (family = "MS Shell Dlg 2" , size = 8 ), cursor = "arrow" , state = "normal" )
@@ -68,10 +68,10 @@ def gui(self, parent):
6868 self .button10 = Button (self .w1 , text = "get active camera" , bg = "#550000" , font = tkinter .font .Font (family = "MS Shell Dlg 2" , size = 8 ), cursor = "arrow" , state = "normal" )
6969 self .button10 .place (x = 260 , y = 540 , width = 120 , height = 22 )
7070 self .button10 ['command' ] = self .getcamera
71- self .switch_scene = Button (self .w1 , text = "switch scene" , font = tkinter .font .Font (family = "MS Shell Dlg 2" , size = 8 ), cursor = "arrow" , state = "normal" )
71+ self .switch_scene = Button (self .w1 , text = "switch scene" , bg = "#ffff00" , fg = "#000000" , font = tkinter .font .Font (family = "MS Shell Dlg 2" , size = 8 ), cursor = "arrow" , state = "normal" )
7272 self .switch_scene .place (x = 420 , y = 110 , width = 140 , height = 22 )
7373 self .switch_scene ['command' ] = self .scene_switch
74- self .button12 = Button (self .w1 , text = "get current node" , bg = "#00007f" , fg = "#ffffff " , font = tkinter .font .Font (family = "MS Shell Dlg 2" , size = 8 ), cursor = "arrow" , state = "normal" )
74+ self .button12 = Button (self .w1 , text = "get current node" , bg = "#00007f" , fg = "#666666 " , font = tkinter .font .Font (family = "MS Shell Dlg 2" , size = 8 ), cursor = "arrow" , state = "normal" )
7575 self .button12 .place (x = 390 , y = 420 , width = 120 , height = 22 )
7676 self .button12 ['command' ] = self .getcurrentnode
7777 self .label6 = Label (self .w1 , text = "remember to format your code" , fg = "#000000" , font = tkinter .font .Font (family = "MS Shell Dlg 2" , size = 8 ), cursor = "arrow" , state = "normal" )
@@ -87,19 +87,19 @@ def gui(self, parent):
8787 self .label9 .place (x = 550 , y = 530 , width = 140 , height = 22 )
8888 self .label10 = Label (self .w1 , text = "can reconize it" , fg = "#000000" , font = tkinter .font .Font (family = "MS Shell Dlg 2" , size = 8 ), cursor = "arrow" , state = "normal" )
8989 self .label10 .place (x = 550 , y = 550 , width = 90 , height = 22 )
90- self .varname = Entry (self .w1 , font = tkinter .font .Font (family = "MS Shell Dlg 2" , size = 8 ), cursor = "arrow" , state = "normal" )
91- self .varname .place (x = 570 , y = 50 , width = 130 , height = 22 )
90+ self .varname = Entry (self .w1 , bg = "#ffffff" , font = tkinter .font .Font (family = "MS Shell Dlg 2" , size = 8 ), cursor = "arrow" , state = "normal" )
91+ self .varname .place (x = 420 , y = 300 , width = 140 , height = 22 )
9292 self .varname .insert (INSERT , "enter varible name" )
93- self .createfunction = Button (self .w1 , text = "create function" , font = tkinter .font .Font (family = "MS Shell Dlg 2" , size = 8 ), cursor = "arrow" , state = "normal" )
93+ self .createfunction = Button (self .w1 , text = "create function" , bg = "#ffff00" , fg = "#000000" , font = tkinter .font .Font (family = "MS Shell Dlg 2" , size = 8 ), cursor = "arrow" , state = "normal" )
9494 self .createfunction .place (x = 420 , y = 140 , width = 140 , height = 22 )
9595 self .createfunction ['command' ] = self .func_create
9696 self .funcname = Entry (self .w1 , font = tkinter .font .Font (family = "MS Shell Dlg 2" , size = 8 ), cursor = "arrow" , state = "normal" )
97- self .funcname .place (x = 570 , y = 140 , width = 130 , height = 22 )
97+ self .funcname .place (x = 570 , y = 330 , width = 130 , height = 22 )
9898 self .funcname .insert (INSERT , "enter function name" )
9999 self .label11 = Label (self .w1 , text = "scripted actions" , fg = "#000000" , font = tkinter .font .Font (family = "MS Shell Dlg 2" , size = 8 ), cursor = "arrow" , state = "normal" )
100100 self .label11 .place (x = 420 , y = 170 , width = 90 , height = 22 )
101101 self .nodename = Entry (self .w1 , font = tkinter .font .Font (family = "MS Shell Dlg 2" , size = 8 ), cursor = "arrow" , state = "normal" )
102- self .nodename .place (x = 390 , y = 450 , width = 120 , height = 22 )
102+ self .nodename .place (x = 420 , y = 330 , width = 140 , height = 22 )
103103 self .nodename .insert (INSERT , "enter node name" )
104104 self .healthbar = Button (self .w1 , text = "healthbar" , bg = "#55ff7f" , fg = "#000000" , font = tkinter .font .Font (family = "MS Shell Dlg 2" , size = 8 ), cursor = "arrow" , state = "normal" )
105105 self .healthbar .place (x = 420 , y = 200 , width = 140 , height = 22 )
@@ -113,9 +113,21 @@ def gui(self, parent):
113113 self .replace = Button (self .w1 , text = "replace" , bg = "#55ff7f" , fg = "#000000" , font = tkinter .font .Font (family = "MS Shell Dlg 2" , size = 8 ), cursor = "arrow" , state = "normal" )
114114 self .replace .place (x = 570 , y = 230 , width = 130 , height = 22 )
115115 self .replace ['command' ] = self .replace_1
116+ self .label12 = Label (self .w1 , text = "inputs" , fg = "#000000" , font = tkinter .font .Font (family = "MS Shell Dlg 2" , size = 8 ), cursor = "arrow" , state = "normal" )
117+ self .label12 .place (x = 420 , y = 270 , width = 90 , height = 22 )
118+ self .value = Entry (self .w1 , font = tkinter .font .Font (family = "MS Shell Dlg 2" , size = 8 ), cursor = "arrow" , state = "normal" )
119+ self .value .place (x = 570 , y = 300 , width = 130 , height = 22 )
120+ self .value .insert (INSERT , "enter varible value" )
121+ self .label13 = Label (self .w1 , text = "remember to put double" , fg = "#000000" , font = tkinter .font .Font (family = "MS Shell Dlg 2" , size = 8 ), cursor = "arrow" , state = "normal" )
122+ self .label13 .place (x = 420 , y = 360 , width = 120 , height = 22 )
123+ self .label14 = Label (self .w1 , text = "quote on every input" , fg = "#000000" , font = tkinter .font .Font (family = "MS Shell Dlg 2" , size = 8 ), cursor = "arrow" , state = "normal" )
124+ self .label14 .place (x = 420 , y = 380 , width = 110 , height = 22 )
125+ self .keycode = Entry (self .w1 , font = tkinter .font .Font (family = "MS Shell Dlg 2" , size = 8 ), cursor = "arrow" , state = "normal" )
126+ self .keycode .place (x = 570 , y = 360 , width = 130 , height = 22 )
127+ self .keycode .insert (INSERT , "enter keycode" )
116128
117129 def setvar (self ):
118- self .output .insert ('1.0' , "\n ccbSetCopperCubeVariable(" + self .varname .get () + ", value of varible )" )
130+ self .output .insert ('1.0' , "\n ccbSetCopperCubeVariable(" + self .varname .get () + ", " + self . value . get () + " )" )
119131
120132 def getvar (self ):
121133 self .output .insert ('1.0' , "\n ccbGetCopperCubeVariable(" + self .varname .get () + ")" )
@@ -124,16 +136,16 @@ def scene_switch(self):
124136 self .output .insert ('1.0' , "\n ccbSwitchToScene(sceneName)" )
125137
126138 def keydown (self ):
127- self .output .insert ('1.0' , "\n ccbRegisterKeyDownEvent(keyPressedDown); \n function keyPressedDown(keyCode) \n { \n print(A key was pressed down: + keyCode ); \n }" )
139+ self .output .insert ('1.0' , "\n ccbRegisterKeyDownEvent(keyPressedDown); \n function keyPressedDown(" + self . keycode . get () + ") \n { \n print(A key was pressed down: + " + self . keycode . get () + " ); \n }" )
128140
129141 def keyup (self ):
130- self .output .insert ('1.0' , "\n ccbRegisterKeyUpEvent(keyPressedUp); \n function keyPressedUp(keyCode) \n { \n print(A key was left up: + keyCode ); \n }" )
142+ self .output .insert ('1.0' , "\n ccbRegisterKeyUpEvent(keyPressedUp); \n function keyPressedUp(" + self . keycode . get () + ") \n { \n print(A key was left up: + " + self . keycode . get () + " ); \n }" )
131143
132144 def mousedown (self ):
133- self .output .insert ('1.0' , "\n ccbRegisterMouseDownEvent(mousePressedDown);\n function mousePressedDown(button) { \n print(A mouse button was presssed down: + button ); \n }" )
145+ self .output .insert ('1.0' , "\n ccbRegisterMouseDownEvent(mousePressedDown);\n function mousePressedDown(" + self . keycode . get () + ") { \n print(A mouse button was presssed down: + " + self . keycode . get () + " ); \n }" )
134146
135147 def mouseup (self ):
136- self .output .insert ('1.0' , "\n ccbRegisterMouseUpEvent(mousePressedUp); \n function mousePressedUp(button) \n { \n print(A mouse button was presssed up: + button ); \n }" )
148+ self .output .insert ('1.0' , "\n ccbRegisterMouseUpEvent(mousePressedUp); \n function mousePressedUp(" + self . keycode . get () + ") \n { \n print(A mouse button was presssed up: + " + self . keycode . get () + " ); \n }" )
137149
138150 def clonenode (self ):
139151 self .output .insert ('1.0' , "\n var sourceNode = ccbGetSceneNodeFromName(" + self .nodename .get () + "); \n var newscenenode = ccbCloneSceneNode(sourceNode);" )
@@ -148,7 +160,7 @@ def setcamera(self):
148160 self .output .insert ('1.0' ,"\n ccbGetActiveCamera()" )
149161
150162 def getcamera (self ):
151- self .output .insert ('1.0' ,"\n ccbSetActiveCamera(cameraNode )" )
163+ self .output .insert ('1.0' ,"\n ccbSetActiveCamera(" + self . nodename . get () + " )" )
152164
153165 def save (self ):
154166 outputtext = self .output .get ("1.0" , "end-1c" )
0 commit comments