diff --git a/direct/src/gui/Button.py b/direct/src/gui/Button.py index f82bcdc08f..317a28163a 100644 --- a/direct/src/gui/Button.py +++ b/direct/src/gui/Button.py @@ -4,9 +4,6 @@ import GuiLabel import GuiButton import Vec3 -#import ClockObject -#clock = ClockObject.ClockObject.getGlobalClock() - guiMgr = GuiManager.GuiManager.getPtr(base.win, base.mak.node()) font = (loader.loadModelOnce("phase_3/models/fonts/ttf-comic")).node() @@ -21,26 +18,18 @@ class Button: self.label = label # up self.l1 = GuiLabel.GuiLabel.makeSimpleTextLabel(self.label, font) - #print "made the label: t = %.3f" % clock.getRealTime() self.l1.setForegroundColor(0., 0., 0., 1.) - #print "set the label colors: t = %.3f" % clock.getRealTime() # roll-over up self.l2 = GuiLabel.GuiLabel.makeSimpleTextLabel(self.label, font) - #print "made the label: t = %.3f" % clock.getRealTime() self.l2.setForegroundColor(0., 0., 0., 1.) self.l2.setBackgroundColor(1., 1., 0., 1.) - #print "set the label colors: t = %.3f" % clock.getRealTime() # roll-over down self.l3 = GuiLabel.GuiLabel.makeSimpleTextLabel(self.label, font) - #print "made the label: t = %.3f" % clock.getRealTime() self.l3.setForegroundColor(1., 1., 1., 1.) self.l3.setBackgroundColor(0., 0., 0., 1.) - #print "set the label colors: t = %.3f" % clock.getRealTime() self.button = GuiButton.GuiButton(self.name, self.l1, self.l2, self.l3, self.l3, self.l1) - #print "made the button: t = %.3f" % clock.getRealTime() self.setScale(0.1) - #print "scale button: t = %.3f" % clock.getRealTime() self.managed = 0 @@ -86,3 +75,4 @@ class Button: def setScale(self, scale): self.button.setScale(scale) + diff --git a/direct/src/gui/Frame.py b/direct/src/gui/Frame.py index be8584606e..8c78c6da85 100644 --- a/direct/src/gui/Frame.py +++ b/direct/src/gui/Frame.py @@ -80,21 +80,15 @@ class Frame: # convenience functions def makeVertical(self): - # remove any previous packing - #self.frame.clearAllPacking() # make each item (except first) align under the last for itemNum in range(1, len(self.items)): self.packItem(self.items[itemNum], GuiFrame.GuiFrame.UNDER, self.items[itemNum - 1]) self.packItem(self.items[itemNum], GuiFrame.GuiFrame.ALIGNLEFT, self.items[itemNum - 1]) - #print "MakeVert: done packing: t = %.3f" % clock.getRealTime() self.frame.recompute() - #print "MakeVert: done recompute: t = %.3f" % clock.getRealTime() def makeHorizontal(self): - # remove any previous packing - #self.frame.clearAllPacking() # make each item (except first) align right of the last for itemNum in range(1, len(self.items)): self.packItem(self.items[itemNum], GuiFrame.GuiFrame.RIGHT, diff --git a/direct/src/gui/PickList.py b/direct/src/gui/PickList.py index 6d357fa54b..586ddf1948 100644 --- a/direct/src/gui/PickList.py +++ b/direct/src/gui/PickList.py @@ -5,9 +5,6 @@ import PandaObject import Frame import Button -#import ClockObject -#clock = ClockObject.ClockObject.getGlobalClock() - class PickList(PandaObject.PandaObject): """PickList class: display a menu of choices and report users choice (via mouse or keyboard) as an event with the choice as @@ -70,7 +67,6 @@ class PickList(PandaObject.PandaObject): """__displayChoices(self, string[]) Display the list of choices """ - #print "starting choiceList: t = %.3f" % clock.getRealTime() for choice in choiceList: # create a button for each choice button = Button.Button(choice) @@ -89,18 +85,12 @@ class PickList(PandaObject.PandaObject): button.button.setUpEvent(eventName) self.accept(eventName, self.__exitChoice) # keep a list of the choice buttons - #print "done with button events: t = %.3f" % clock.getRealTime() self.frame.addItem(button) - #print "frame add button: t = %.3f" % clock.getRealTime() self.choiceList.append(button) - #print "list add button: t = %.3f" % clock.getRealTime() - #print "done with choiceList: t = %.3f" % clock.getRealTime() # set up the frame self.frame.makeWideAsWidest() - #print "done with makeWideAsWidest: t = %.3f" % clock.getRealTime() self.frame.makeVertical() - #print "done with makeVertical: t = %.3f" % clock.getRealTime() def manage(self): self.frame.manage()