فهرست منبع

*** empty log message ***

gregw 25 سال پیش
والد
کامیت
0cc0bf5e31
4فایلهای تغییر یافته به همراه8 افزوده شده و 7 حذف شده
  1. 1 2
      direct/src/gui/Button.py
  2. 2 2
      direct/src/gui/ScrollingLabel.py
  3. 1 3
      direct/src/gui/Sign.py
  4. 4 0
      direct/src/showbase/ShowBaseGlobal.py

+ 1 - 2
direct/src/gui/Button.py

@@ -5,11 +5,10 @@ import GuiLabel
 import GuiButton
 
 guiMgr = GuiManager.GuiManager.getPtr(base.win, base.mak.node(), base.renderGui.node())
-font = loader.loadModelNode("phase_3/models/fonts/ttf-comic")
 
 class Button(DirectObject):
 
-    def __init__(self, name, label=None):
+    def __init__(self, name, label=None, font=interfaceFont):
         self.name = name
         # if no label given, use the button name
         if (label == None):

+ 2 - 2
direct/src/gui/ScrollingLabel.py

@@ -6,12 +6,12 @@ import Button
 import GuiLabel
 import Sign
 
-font = (loader.loadModelOnce("phase_3/models/fonts/ttf-comic")).node()
+
 
 class ScrollingLabel(PandaObject.PandaObject):
 
     # special methods
-    def __init__(self, name, itemList):
+    def __init__(self, name, itemList, font=interfaceFont):
 
         self.name = name
         self.eventName = self.name

+ 1 - 3
direct/src/gui/Sign.py

@@ -6,11 +6,9 @@ import GuiLabel
 
 guiMgr = GuiManager.GuiManager.getPtr(base.win, base.mak.node(), base.renderGui.node())
 
-font = (loader.loadModelOnce("phase_3/models/fonts/ttf-comic")).node()
-
 class Sign(DirectObject):
 
-    def __init__(self, name, label=None):
+    def __init__(self, name, label=None, font=interfaceFont):
         self.name = name
         # label in this case means GuiLabel
         if not label:

+ 4 - 0
direct/src/showbase/ShowBaseGlobal.py

@@ -18,3 +18,7 @@ __builtin__.taskMgr = base.taskMgr
 __builtin__.eventMgr = base.eventMgr
 __builtin__.messenger = base.messenger
 __builtin__.config = base.config
+
+# Pointer to interface font
+import ToontownGlobals
+__builtin__.interfaceFont = ToontownGlobals.getInterfaceFont()