mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
Import changes to get level editor to run
This commit is contained in:
parent
60d6a84eb4
commit
b92660bf13
@ -32,7 +32,7 @@ class DirectSession(DirectObject):
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
# Establish a global pointer to the direct object early on
|
# Establish a global pointer to the direct object early on
|
||||||
# so dependant classes can access it in their code
|
# 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
|
# These come early since they are used later on
|
||||||
self.group = render.attachNewNode('DIRECT')
|
self.group = render.attachNewNode('DIRECT')
|
||||||
self.font = TextNode.getDefaultFont()
|
self.font = TextNode.getDefaultFont()
|
||||||
|
@ -3,13 +3,14 @@ from pandac.PandaModules import *
|
|||||||
from direct.directbase.DirectStart import *
|
from direct.directbase.DirectStart import *
|
||||||
from direct.showbase.DirectObject import DirectObject
|
from direct.showbase.DirectObject import DirectObject
|
||||||
from PieMenu import *
|
from PieMenu import *
|
||||||
import direct.gui.DirectGuiGlobals
|
import direct.gui.DirectGuiGlobals as DGG
|
||||||
from direct.showbase.TkGlobal import *
|
from direct.showbase.TkGlobal import *
|
||||||
from direct.directtools.DirectUtil import *
|
from direct.directtools.DirectUtil import *
|
||||||
from direct.directtools.DirectGeometry import *
|
from direct.directtools.DirectGeometry import *
|
||||||
from direct.tkwidgets.SceneGraphExplorer import *
|
from direct.tkwidgets.SceneGraphExplorer import *
|
||||||
from tkMessageBox import showinfo
|
from tkMessageBox import showinfo
|
||||||
from tkFileDialog import *
|
from tkFileDialog import *
|
||||||
|
from Tkinter import *
|
||||||
from whrandom import *
|
from whrandom import *
|
||||||
from direct.tkwidgets import Floater
|
from direct.tkwidgets import Floater
|
||||||
from direct.tkwidgets import VectorWidgets
|
from direct.tkwidgets import VectorWidgets
|
||||||
@ -4635,7 +4636,7 @@ class LevelStyleManager:
|
|||||||
for i in range (numItems):
|
for i in range (numItems):
|
||||||
# Create a text node--just a card, really--of the right color.
|
# Create a text node--just a card, really--of the right color.
|
||||||
tn = TextNode('colorChip')
|
tn = TextNode('colorChip')
|
||||||
tn.setFont(DirectGuiGlobals.getDefaultFont())
|
tn.setFont(DGG.getDefaultFont())
|
||||||
tn.setTransform(Mat4.scaleMat(0.07, 0.07, 0.07 * aspectRatio))
|
tn.setTransform(Mat4.scaleMat(0.07, 0.07, 0.07 * aspectRatio))
|
||||||
tn.setCardColor(colorList[i])
|
tn.setCardColor(colorList[i])
|
||||||
tn.setCardActual(0, 1.1111, 0, 0.8333)
|
tn.setCardActual(0, 1.1111, 0, 0.8333)
|
||||||
@ -4761,7 +4762,7 @@ class LevelStyleManager:
|
|||||||
# Create text node for each item
|
# Create text node for each item
|
||||||
if (textList[i] != None):
|
if (textList[i] != None):
|
||||||
tn = TextNode('TextItem')
|
tn = TextNode('TextItem')
|
||||||
tn.setFont(DirectGuiGlobals.getDefaultFont())
|
tn.setFont(DGG.getDefaultFont())
|
||||||
tn.setTransform(Mat4.scaleMat(0.07, 0.07, 0.07 * aspectRatio))
|
tn.setTransform(Mat4.scaleMat(0.07, 0.07, 0.07 * aspectRatio))
|
||||||
tn.setTextColor(0, 0, 0, 1)
|
tn.setTextColor(0, 0, 0, 1)
|
||||||
tn.setCardColor(1, 1, 1, 1)
|
tn.setCardColor(1, 1, 1, 1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user