mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
yell if invalid orientation given
This commit is contained in:
parent
20b5398ab8
commit
ba4c626028
@ -106,8 +106,10 @@ class DirectScrollBar(DirectFrame):
|
||||
def setOrientation(self):
|
||||
if self['orientation'] == HORIZONTAL:
|
||||
self.guiItem.setAxis(Vec3(1, 0, 0))
|
||||
else:
|
||||
elif self['orientation'] == VERTICAL:
|
||||
self.guiItem.setAxis(Vec3(0, 0, -1))
|
||||
else:
|
||||
raise ValueError, 'Invalid value for orientation: %s' % (self['orientation'])
|
||||
|
||||
def setManageButtons(self):
|
||||
self.guiItem.setManagePieces(self['manageButtons'])
|
||||
|
@ -99,8 +99,10 @@ class DirectSlider(DirectFrame):
|
||||
def setOrientation(self):
|
||||
if self['orientation'] == HORIZONTAL:
|
||||
self.guiItem.setAxis(Vec3(1, 0, 0))
|
||||
else:
|
||||
elif self['orientation'] == VERTICAL:
|
||||
self.guiItem.setAxis(Vec3(0, 0, 1))
|
||||
else:
|
||||
raise ValueError, 'Invalid value for orientation: %s' % (self['orientation'])
|
||||
|
||||
def destroy(self):
|
||||
DirectFrame.destroy(self)
|
||||
|
Loading…
x
Reference in New Issue
Block a user