Browse Source

*** empty log message ***

Mark Mine 24 years ago
parent
commit
68e2ac7a60
2 changed files with 14 additions and 6 deletions
  1. 10 4
      direct/src/directtools/DirectManipulation.py
  2. 4 2
      direct/src/interval/Interval.py

+ 10 - 4
direct/src/directtools/DirectManipulation.py

@@ -541,11 +541,17 @@ class ObjectHandles(NodePath,PandaObject):
 
 
     def toggleWidget(self):
     def toggleWidget(self):
         if self.fActive:
         if self.fActive:
-            self.scalingNode.reparentTo(hidden)
-            self.fActive = 0
+            self.deactivate()
         else:
         else:
-            self.scalingNode.reparentTo(self)
-            self.fActive = 1
+            self.activate()
+
+    def activate(self):
+        self.scalingNode.reparentTo(self)
+        self.fActive = 1
+
+    def deactivate(self):
+        self.scalingNode.reparentTo(hidden)
+        self.fActive = 0
 
 
     def showWidgetIfActive(self):
     def showWidgetIfActive(self):
         if self.fActive:
         if self.fActive:

+ 4 - 2
direct/src/interval/Interval.py

@@ -144,6 +144,8 @@ class Interval(DirectObject):
         """ popupControls()
         """ popupControls()
             Popup control panel for interval.
             Popup control panel for interval.
         """
         """
+        base.wantTk = 1
+        import TkGlobal
         import fpformat
         import fpformat
         import string
         import string
         # I moved this here because Toontown does not ship Tk
         # I moved this here because Toontown does not ship Tk
@@ -152,10 +154,10 @@ class Interval(DirectObject):
         import EntryScale
         import EntryScale
         if tl == None:
         if tl == None:
             tl = Toplevel()
             tl = Toplevel()
-            tl.title(self.getName() + ' Interval Controls')
+            tl.title(' Interval Controls')
         outerFrame = Frame(tl)
         outerFrame = Frame(tl)
         self.es = es = EntryScale.EntryScale(
         self.es = es = EntryScale.EntryScale(
-            outerFrame, text = 'Time',
+            outerFrame, text = self.getName(),
             min = 0, max = string.atof(fpformat.fix(self.duration, 2)),
             min = 0, max = string.atof(fpformat.fix(self.duration, 2)),
             command = lambda t, s = self: s.setT(t))
             command = lambda t, s = self: s.setT(t))
         # So when you drag scale with mouse its like you started a playback
         # So when you drag scale with mouse its like you started a playback