mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
parent
c395460390
commit
2b64a7d74f
@ -33,7 +33,7 @@ class DirectScrolledFrame(DirectFrame):
|
|||||||
('canvasSize', (-1, 1, -1, 1), self.setCanvasSize),
|
('canvasSize', (-1, 1, -1, 1), self.setCanvasSize),
|
||||||
('manageScrollBars', 1, self.setManageScrollBars),
|
('manageScrollBars', 1, self.setManageScrollBars),
|
||||||
('autoHideScrollBars', 1, self.setAutoHideScrollBars),
|
('autoHideScrollBars', 1, self.setAutoHideScrollBars),
|
||||||
('scrollBarWidth', 0.08, None),
|
('scrollBarWidth', 0.08, self.setScrollBarWidth),
|
||||||
('borderWidth', (0.01, 0.01), self.setBorderWidth),
|
('borderWidth', (0.01, 0.01), self.setBorderWidth),
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -72,6 +72,11 @@ class DirectScrolledFrame(DirectFrame):
|
|||||||
# Call option initialization functions
|
# Call option initialization functions
|
||||||
self.initialiseoptions(DirectScrolledFrame)
|
self.initialiseoptions(DirectScrolledFrame)
|
||||||
|
|
||||||
|
def setScrollBarWidth(self):
|
||||||
|
w = self['scrollBarWidth']
|
||||||
|
self.verticalScroll["frameSize"] = (-w / 2.0, w / 2.0, -1, 1)
|
||||||
|
self.horizontalScroll["frameSize"] = (-1, 1, -w / 2.0, w / 2.0)
|
||||||
|
|
||||||
def setCanvasSize(self):
|
def setCanvasSize(self):
|
||||||
f = self['canvasSize']
|
f = self['canvasSize']
|
||||||
self.guiItem.setVirtualFrame(f[0], f[1], f[2], f[3])
|
self.guiItem.setVirtualFrame(f[0], f[1], f[2], f[3])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user