mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
add scrollStep(), scrollPage()
This commit is contained in:
parent
490d24ef41
commit
67da79e374
@ -108,6 +108,16 @@ class DirectScrollBar(DirectFrame):
|
|||||||
def setPageSize(self):
|
def setPageSize(self):
|
||||||
self.guiItem.setPageSize(self['pageSize'])
|
self.guiItem.setPageSize(self['pageSize'])
|
||||||
|
|
||||||
|
def scrollStep(self, stepCount):
|
||||||
|
"""Scrolls the indicated number of steps forward. If
|
||||||
|
stepCount is negative, scrolls backward."""
|
||||||
|
self['value'] = self.guiItem.getValue() + self.guiItem.getScrollSize() * stepCount
|
||||||
|
|
||||||
|
def scrollPage(self, pageCount):
|
||||||
|
"""Scrolls the indicated number of pages forward. If
|
||||||
|
pageCount is negative, scrolls backward."""
|
||||||
|
self['value'] = self.guiItem.getValue() + self.guiItem.getPageSize() * pageCount
|
||||||
|
|
||||||
def setOrientation(self):
|
def setOrientation(self):
|
||||||
if self['orientation'] == DGG.HORIZONTAL:
|
if self['orientation'] == DGG.HORIZONTAL:
|
||||||
self.guiItem.setAxis(Vec3(1, 0, 0))
|
self.guiItem.setAxis(Vec3(1, 0, 0))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user