Fixed button press state ordering problem and CardMaker creation bug

This commit is contained in:
Mark Mine 2002-06-11 17:03:51 +00:00
parent dae9071c87
commit 2f57e39d93
3 changed files with 4 additions and 3 deletions

View File

@ -50,7 +50,7 @@ class DirectButton(DirectFrame):
# If specifed, add scaling to the pressed state to make it look
# like the button is moving when you press it
if self['pressEffect']:
np = self.stateNodePath[1].attachNewNode('pressEffect')
np = self.stateNodePath[1].attachNewNode('pressEffect', 1)
np.setScale(0.98)
self.stateNodePath[1] = np

View File

@ -88,7 +88,8 @@ def printEntryText(text):
# Here we create an entry, and specify everything up front
# CALL de1.get() and de1.set('new text') to get and set entry contents
de1 = DirectEntry(initialText = 'Hello, how are you?',
image = 'phase_3/maps/hotel-room.jpg',
image = 'phase_4/maps/middayskyB.jpg',
#image = 'phase_3/maps/toowntown-logo.jpg',
image_pos = (4.55, 0, -1.65),
image_scale = (5.5, 1, 2.55),
command = printEntryText,

View File

@ -46,7 +46,7 @@ class OnscreenImage(PandaObject, NodePath):
elif type(image) == type(''):
# Assume its a file name and create a texture card
tex = loader.loadTexture(image)
cm = CardMaker()
cm = CardMaker('OnscreenImage')
cm.setFrame(-1, 1, -1, 1)
self.assign(parent.attachNewNode(cm.generate(), sort))
self.setTexture(tex)