2014-12-29 20:58:30 -06:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
import wx
|
|
|
|
import widgetUtils
|
|
|
|
|
|
|
|
class soundsTutorialDialog(widgetUtils.BaseDialog):
|
2021-06-16 16:18:41 -05:00
|
|
|
def __init__(self, actions):
|
|
|
|
super(soundsTutorialDialog, self).__init__(None, -1)
|
|
|
|
self.SetTitle(_(u"Sounds tutorial"))
|
|
|
|
panel = wx.Panel(self)
|
|
|
|
sizer = wx.BoxSizer(wx.VERTICAL)
|
|
|
|
label = wx.StaticText(panel, -1, _(u"Press enter to listen to the sound for the selected event"))
|
|
|
|
self.items = wx.ListBox(panel, 1, choices=actions, style=wx.LB_SINGLE)
|
|
|
|
self.items.SetSelection(0)
|
|
|
|
listBox = wx.BoxSizer(wx.HORIZONTAL)
|
|
|
|
listBox.Add(label)
|
|
|
|
listBox.Add(self.items)
|
|
|
|
self.play = wx.Button(panel, 1, (u"Play"))
|
|
|
|
self.play.SetDefault()
|
|
|
|
close = wx.Button(panel, wx.ID_CANCEL)
|
|
|
|
btnBox = wx.BoxSizer(wx.HORIZONTAL)
|
|
|
|
btnBox.Add(self.play)
|
|
|
|
btnBox.Add(close)
|
|
|
|
sizer.Add(listBox)
|
|
|
|
sizer.Add(btnBox)
|
|
|
|
panel.SetSizer(sizer)
|
|
|
|
self.SetClientSize(sizer.CalcMin())
|
2015-04-03 16:57:08 -06:00
|
|
|
|
2021-06-16 16:18:41 -05:00
|
|
|
def get_selection(self):
|
|
|
|
return self.items.GetSelection()
|