*** empty log message ***

This commit is contained in:
Joe Shochet 2001-11-06 01:21:37 +00:00
parent ed7652ee3d
commit 993b4582ad

View File

@ -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