mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-17 12:12:10 -04:00
*** empty log message ***
This commit is contained in:
parent
ed7652ee3d
commit
993b4582ad
@ -40,6 +40,7 @@ class DirectEntry(DirectFrame):
|
||||
('extraArgs', [], None),
|
||||
# Sounds to be used for button events
|
||||
('rolloverSound', getDefaultRolloverSound(), self.setRolloverSound),
|
||||
('clickSound', getDefaultClickSound(), self.setClickSound),
|
||||
)
|
||||
# Merge keyword options with default options
|
||||
self.defineoptions(kw, optiondefs)
|
||||
@ -105,6 +106,14 @@ class DirectEntry(DirectFrame):
|
||||
else:
|
||||
self.guiItem.clearSound(ENTER + self.guiId)
|
||||
|
||||
def setClickSound(self):
|
||||
if base.wantSfx:
|
||||
clickSound = self['clickSound']
|
||||
if clickSound:
|
||||
self.guiItem.setSound(ACCEPT + self.guiId, clickSound)
|
||||
else:
|
||||
self.guiItem.clearSound(ACCEPT + self.guiId)
|
||||
|
||||
def commandFunc(self, event):
|
||||
if self['command']:
|
||||
# Pass any extra args to command
|
||||
|
Loading…
x
Reference in New Issue
Block a user