2015-04-10 12:06:17 -05:00
|
|
|
from direct.stdpy import threading
|
|
|
|
from direct.showbase.ShowBase import ShowBase
|
|
|
|
from panda3d.core import VirtualFileSystem
|
2015-05-29 21:49:55 -05:00
|
|
|
import __builtin__, wx, os, sys
|
|
|
|
|
|
|
|
sys.path.append(
|
|
|
|
os.path.abspath(
|
|
|
|
os.path.join(
|
|
|
|
os.path.dirname(__file__),
|
|
|
|
"../../../"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2015-04-10 12:06:17 -05:00
|
|
|
|
|
|
|
__builtin__.__dict__.update(__import__('pandac.PandaModules', fromlist=['*']).__dict__)
|
|
|
|
|
2015-05-29 05:03:48 -05:00
|
|
|
loadPrcFile('dependencies/config/guieditor.prc')
|
|
|
|
loadPrcFile('dependencies/config/general.prc')
|
2015-04-10 12:06:17 -05:00
|
|
|
|
2015-06-23 18:11:48 -05:00
|
|
|
defaultText = """from panda3d.core import *
|
2015-05-29 21:49:55 -05:00
|
|
|
from direct.gui import DirectGuiGlobals
|
2015-04-10 12:06:17 -05:00
|
|
|
from direct.gui.DirectGui import *
|
2015-05-29 21:49:55 -05:00
|
|
|
from toontown.toonbase import ToontownGlobals
|
2015-04-10 12:06:17 -05:00
|
|
|
|
2015-05-29 21:49:55 -05:00
|
|
|
DirectGuiGlobals.setDefaultFontFunc(ToontownGlobals.getInterfaceFont)
|
|
|
|
DirectGuiGlobals.setDefaultRolloverSound(base.loadSfx('phase_3/audio/sfx/GUI_rollover.ogg'))
|
|
|
|
DirectGuiGlobals.setDefaultClickSound(base.loadSfx('phase_3/audio/sfx/GUI_create_toon_fwd.ogg'))
|
|
|
|
DirectGuiGlobals.setDefaultDialogGeom(loader.loadModel('phase_3/models/gui/dialog_box_gui'))
|
2015-04-10 12:06:17 -05:00
|
|
|
"""
|
|
|
|
|
2015-05-29 21:49:55 -05:00
|
|
|
exec(
|
|
|
|
"from %s import %s as imported" % \
|
|
|
|
(
|
|
|
|
'.'.join(
|
|
|
|
sys.argv[1].split('.')[:-1]
|
|
|
|
),
|
|
|
|
sys.argv[1].split('.')[-1]
|
|
|
|
)
|
|
|
|
)
|
2015-04-10 12:06:17 -05:00
|
|
|
|
2015-05-29 21:49:55 -05:00
|
|
|
if hasattr(imported, 'GUI_EDITOR'):
|
|
|
|
defaultText += imported.GUI_EDITOR
|
2015-04-10 12:06:17 -05:00
|
|
|
|
|
|
|
__builtin__.base = ShowBase()
|
2015-05-29 21:49:55 -05:00
|
|
|
|
|
|
|
exec(defaultText)
|
|
|
|
|
2015-05-12 00:06:23 -05:00
|
|
|
base.run()
|