Skip to content

Commit

Permalink
GUIClasses: add "global" parameter to MakeDefault
Browse files Browse the repository at this point in the history
issue #126
  • Loading branch information
bradallred committed Apr 19, 2018
1 parent 2016794 commit 630ed6a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions gemrb/GUIScripts/GUIClasses.py
Expand Up @@ -295,13 +295,13 @@ class GButton(GControl):
'SetActionIcon': _GemRB.Button_SetActionIcon
}

def MakeDefault(self):
def MakeDefault(self, glob=False):
# return key
return self.SetHotKey(chr(0x86), 0)
return self.SetHotKey(chr(0x86), 0, glob)

def MakeEscape(self):
def MakeEscape(self, glob=False):
# escape key
return self.SetHotKey(chr(0x8c), 0)
return self.SetHotKey(chr(0x8c), 0, glob)

def SetMOS(self, mos):
self.SetPicture(mos) # backwards compatibility
Expand Down
4 changes: 2 additions & 2 deletions gemrb/GUIScripts/GUIWORLD.py
Expand Up @@ -95,15 +95,15 @@ def OpenEndMessageWindow ():
Button.SetVisible(True)
Button.SetText (9371)
Button.SetEvent (IE_GUI_BUTTON_ON_PRESS, CloseContinueWindow)
Button.SetHotKey(chr(0x86), 0, True)
Button.MakeDefault(True)

def OpenContinueMessageWindow ():
#continue
Button = ContinueWindow.GetControl (0)
Button.SetVisible(True)
Button.SetText (9372)
Button.SetEvent (IE_GUI_BUTTON_ON_PRESS, CloseContinueWindow)
Button.SetHotKey(chr(0x86), 0, True)
Button.MakeDefault(True)

def UpdateReformWindow ():
Window = ReformPartyWindow
Expand Down
4 changes: 2 additions & 2 deletions gemrb/GUIScripts/iwd2/GUIWORLD.py
Expand Up @@ -73,14 +73,14 @@ def OpenEndMessageWindow ():
Button = ContinueWindow.GetControl (0)
Button.SetText (9371)
Button.SetEvent (IE_GUI_BUTTON_ON_PRESS, CloseContinueWindow)
Button.SetHotKey(chr(0x86), 0, True)
Button.MakeDefault(True)

def OpenContinueMessageWindow ():
#continue
Button = ContinueWindow.GetControl (0)
Button.SetText (9372)
Button.SetEvent (IE_GUI_BUTTON_ON_PRESS, CloseContinueWindow)
Button.SetHotKey(chr(0x86), 0, True)
Button.MakeDefault(True)

def OpenReformPartyWindow ():
global ReformPartyWindow
Expand Down
4 changes: 2 additions & 2 deletions gemrb/GUIScripts/pst/GUIWORLD.py
Expand Up @@ -62,14 +62,14 @@ def OpenEndMessageWindow ():
Button = MessageWindow.MWindow.GetControl (0)
Button.SetText (34602)
Button.SetEvent (IE_GUI_BUTTON_ON_PRESS, CloseContinueWindow)
Button.SetHotKey(chr(0x86), 0, True)
Button.MakeDefault(True)

def OpenContinueMessageWindow ():
#continue
Button = MessageWindow.MWindow.GetControl (0)
Button.SetText (34603)
Button.SetEvent (IE_GUI_BUTTON_ON_PRESS, CloseContinueWindow)
Button.SetHotKey(chr(0x86), 0, True)
Button.MakeDefault(True)

def OpenReformPartyWindow ():
global ReformPartyWindow
Expand Down

0 comments on commit 630ed6a

Please sign in to comment.