mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 01:07:51 -04:00
*** empty log message ***
This commit is contained in:
parent
3c6703cb9c
commit
c88ddf6dec
@ -1,5 +1,4 @@
|
|||||||
"""PickList module: contains the PickList class"""
|
"""PickList module: contains the PickList class"""
|
||||||
|
|
||||||
from ShowBaseGlobal import *
|
from ShowBaseGlobal import *
|
||||||
import PandaObject
|
import PandaObject
|
||||||
import Frame
|
import Frame
|
||||||
@ -19,11 +18,6 @@ class PickList(PandaObject.PandaObject):
|
|||||||
self.name = name
|
self.name = name
|
||||||
self.frame = Frame.Frame(name)
|
self.frame = Frame.Frame(name)
|
||||||
|
|
||||||
# listen for keyboard events
|
|
||||||
#self.accept("up-up", self.__decrementChoice)
|
|
||||||
#self.accept("down-up", self.__incrementChoice)
|
|
||||||
#self.accept("enter-up", self.__makeChoice, [1])
|
|
||||||
|
|
||||||
# initialization
|
# initialization
|
||||||
self.choice = -1
|
self.choice = -1
|
||||||
self.choiceList = []
|
self.choiceList = []
|
||||||
@ -104,6 +98,9 @@ class PickList(PandaObject.PandaObject):
|
|||||||
self.accept("up-up", self.__decrementChoice)
|
self.accept("up-up", self.__decrementChoice)
|
||||||
self.accept("down-up", self.__incrementChoice)
|
self.accept("down-up", self.__incrementChoice)
|
||||||
self.accept("enter-up", self.__makeChoice, [1])
|
self.accept("enter-up", self.__makeChoice, [1])
|
||||||
|
for button in self.choiceList:
|
||||||
|
self.accept("gui-button-" + button.name + "-enter",
|
||||||
|
self.__makeChoice, [1])
|
||||||
|
|
||||||
for choice in self.choiceList:
|
for choice in self.choiceList:
|
||||||
choiceIndex = self.choiceList.index(choice)
|
choiceIndex = self.choiceList.index(choice)
|
||||||
@ -126,6 +123,8 @@ class PickList(PandaObject.PandaObject):
|
|||||||
self.ignore("up-up")
|
self.ignore("up-up")
|
||||||
self.ignore("down-up")
|
self.ignore("down-up")
|
||||||
self.ignore("enter-up")
|
self.ignore("enter-up")
|
||||||
|
for button in self.choiceList:
|
||||||
|
self.ignore("gui-button-" + button.name + "-enter")
|
||||||
|
|
||||||
# ignore all the buttons
|
# ignore all the buttons
|
||||||
for item in self.frame.getItems():
|
for item in self.frame.getItems():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user