Skip to content

Commit

Permalink
(re?)add L/R double click to KeyBinderDialog
Browse files Browse the repository at this point in the history
  • Loading branch information
emersonrp committed Jan 29, 2023
1 parent 0c5445b commit c88efaf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion BindControl.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def OnMenuAboutBox(self, _):
info = wx.adv.AboutDialogInfo()
info.AddDeveloper('R Pickett ([email protected])')
info.SetName('BindControl')
info.SetVersion('0.8')
info.SetVersion('0.8.1')
info.SetDescription("""
BindControl can help you set up custom keybinds in City of Heroes/Villains, including speed-on-demand binds.
Expand Down
6 changes: 6 additions & 0 deletions UI/KeySelectDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ def __init__(self, button):
i.Bind(wx.EVT_LEFT_DOWN , self.handleBind )
i.Bind(wx.EVT_MIDDLE_DOWN , self.handleBind )
i.Bind(wx.EVT_RIGHT_DOWN , self.handleBind )
i.Bind(wx.EVT_LEFT_DCLICK , self.handleBind )
i.Bind(wx.EVT_RIGHT_DCLICK , self.handleBind )
i.Bind(wx.EVT_MOUSE_AUX1_DOWN , self.handleBind )
i.Bind(wx.EVT_MOUSE_AUX2_DOWN , self.handleBind )

Expand Down Expand Up @@ -138,6 +140,8 @@ def handleBind(self, event):
code = event.GetKeyCode()
if code == wx.WXK_ESCAPE:
self.EndModal(wx.CANCEL)
elif (event.ButtonDClick()):
code = "DCLICK" + str(event.GetButton())
else:
code = "BUTTON" + str(event.GetButton())

Expand Down Expand Up @@ -303,6 +307,8 @@ def SetKeymap(self):
'BUTTON6' : 'BUTTON6',
'BUTTON7' : 'BUTTON7',
'BUTTON8' : 'BUTTON8',
'DCLICK1' : 'LEFTDOUBLECLICK',
'DCLICK3' : 'RIGHTDOUBLECLICK',
}

# Add alphanumerics
Expand Down

0 comments on commit c88efaf

Please sign in to comment.