*** empty log message ***

This commit is contained in:
David Rose 2001-04-04 22:34:53 +00:00
parent a8a4d8199f
commit 5a61602f0d
3 changed files with 19 additions and 23 deletions

View File

@ -125,20 +125,6 @@ class Button(DirectObject):
self.lDown.setWidth(width)
self.lInactive.setWidth(width)
## def freeze(self):
## self.lUp.freeze()
## self.lLit.freeze()
## self.lDown.freeze()
## self.lInactive.freeze()
## self.button.freeze()
## def thaw(self):
## self.lUp.thaw()
## self.lLit.thaw()
## self.lDown.thaw()
## self.lInactive.thaw()
## self.button.thaw()
def manage(self, nodepath = aspect2d):
if nodepath:
self.button.manage(guiMgr, base.eventMgr.eventHandler,

View File

@ -65,16 +65,21 @@ class OnscreenPanel(PandaObject.PandaObject, NodePath):
The parameters are as follows:
rect: the left, right, bottom, top of the panel on the
rect: the (left, right, bottom, top) of the panel on the
screen. This is in aspect2d coordinates. The panel
will be set up in its own coordinate system so that (0,
0) is the center of the panel.
bg: the r, g, b, a background color of the panel.
bg: the (r, g, b, a) background color of the panel.
geom: the model to use as the background panel geometry.
Normally you can safely let this default.
geomRect: the (left, right, bottom, top) rectangle around
the background panel geometry as it is modeled. This is
used to compute how the panel should be scaled to make
it fit the rectangle specified by rect, above.
drawOrder: the drawing order of this panel with respect to
all other things in the 'fixed' bin within render2d.
Buttons and text created within the panel via
@ -300,11 +305,16 @@ class OnscreenPanel(PandaObject.PandaObject, NodePath):
def setPos(self, x, y, z):
"""setPos(self, x, y, x)
"""setPos(self, x, y, z)
Repositions the panel onscreen, taking all of the panel's
managed buttons along with it.
"""
NodePath.setPos(self, x, y, z)
for button in self.panelButtons:
button.unmanage()
button.manage(self)
if button.managed:
button.unmanage()
button.manage(self)

View File

@ -53,18 +53,18 @@ class OnscreenText(PandaObject, NodePath):
or it may be a 2-tuple of floats, specifying a different
x, y scale.
fg: the r, g, b, a foreground color of the text. This is
fg: the (r, g, b, a) foreground color of the text. This is
normally a 4-tuple of floats or ints.
bg: the r, g, b, a background color of the text. If the
bg: the (r, g, b, a) background color of the text. If the
fourth value, a, is nonzero, a card is created to place
behind the text and set to the given color.
shadow: the r, g, b, a color of the shadow behind the text.
shadow: the (r, g, b, a) color of the shadow behind the text.
If the fourth value, a, is nonzero, a little drop shadow
is created and placed behind the text.
frame: the r, g, b, a color of the frame drawn around the
frame: the (r, g, b, a) color of the frame drawn around the
text. If the fourth value, a, is nonzero, a frame is
created around the text.