Import changes to get level editor to run

This commit is contained in:
David Schafer 2006-10-18 18:13:10 +00:00
parent 60d6a84eb4
commit b92660bf13
2 changed files with 5 additions and 4 deletions

View File

@ -32,7 +32,7 @@ class DirectSession(DirectObject):
def __init__(self):
# Establish a global pointer to the direct object early on
# so dependant classes can access it in their code
__builtins__["direct"] = self
__builtins__["direct"] = base.direct = self
# These come early since they are used later on
self.group = render.attachNewNode('DIRECT')
self.font = TextNode.getDefaultFont()

View File

@ -3,13 +3,14 @@ from pandac.PandaModules import *
from direct.directbase.DirectStart import *
from direct.showbase.DirectObject import DirectObject
from PieMenu import *
import direct.gui.DirectGuiGlobals
import direct.gui.DirectGuiGlobals as DGG
from direct.showbase.TkGlobal import *
from direct.directtools.DirectUtil import *
from direct.directtools.DirectGeometry import *
from direct.tkwidgets.SceneGraphExplorer import *
from tkMessageBox import showinfo
from tkFileDialog import *
from Tkinter import *
from whrandom import *
from direct.tkwidgets import Floater
from direct.tkwidgets import VectorWidgets
@ -4635,7 +4636,7 @@ class LevelStyleManager:
for i in range (numItems):
# Create a text node--just a card, really--of the right color.
tn = TextNode('colorChip')
tn.setFont(DirectGuiGlobals.getDefaultFont())
tn.setFont(DGG.getDefaultFont())
tn.setTransform(Mat4.scaleMat(0.07, 0.07, 0.07 * aspectRatio))
tn.setCardColor(colorList[i])
tn.setCardActual(0, 1.1111, 0, 0.8333)
@ -4761,7 +4762,7 @@ class LevelStyleManager:
# Create text node for each item
if (textList[i] != None):
tn = TextNode('TextItem')
tn.setFont(DirectGuiGlobals.getDefaultFont())
tn.setFont(DGG.getDefaultFont())
tn.setTransform(Mat4.scaleMat(0.07, 0.07, 0.07 * aspectRatio))
tn.setTextColor(0, 0, 0, 1)
tn.setCardColor(1, 1, 1, 1)