mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-18 20:53:50 -04:00
fix moving by 2 on left and right arrow keys
This commit is contained in:
parent
880c346ad7
commit
43a93cee05
@ -236,14 +236,18 @@ class ScrollingLabel(PandaObject.PandaObject):
|
||||
self.leftButton.getGuiItem().down()
|
||||
self.spawnButtonUpTask(self.leftButton)
|
||||
# then act like a mouse click
|
||||
self.handleLeftButton(self.leftButton.button)
|
||||
# not needed, using the behavior system, this will happen once the
|
||||
# button transitions to up again.
|
||||
# self.handleLeftButton(self.leftButton.button)
|
||||
|
||||
def handleRightArrow(self):
|
||||
# make the button toggle
|
||||
self.rightButton.getGuiItem().down()
|
||||
self.spawnButtonUpTask(self.rightButton)
|
||||
# then act like a mouse click
|
||||
self.handleRightButton(self.rightButton.button)
|
||||
# not needed, using the behavior system, this will happen once the
|
||||
# button transitions to up again.
|
||||
# self.handleRightButton(self.rightButton.button)
|
||||
|
||||
def spawnButtonUpTask(self, button):
|
||||
def buttonUp(state):
|
||||
|
Loading…
x
Reference in New Issue
Block a user