Implement basic ammo switching context menu. (still needs much

polishing)
This commit is contained in:
cncfanatics
2010-10-19 10:31:52 +02:00
parent 5c653c98ae
commit bc883685ec
7 changed files with 94 additions and 5 deletions

View File

@@ -51,6 +51,15 @@ class FittingView(d.Display):
self.Bind(wx.EVT_KEY_UP, self.kbEvent)
def getSelectedMods(self):
sel = []
row = self.GetFirstSelected()
while row != -1:
sel.append(self.mods[self.GetItemData(row)])
row = self.GetNextSelected(row)
return sel
def kbEvent(self,event):
keycode = event.GetKeyCode()
if keycode == wx.WXK_DELETE or keycode == wx.WXK_NUMPAD_DELETE: