Created
February 26, 2011 21:58
-
-
Save tomprince/845663 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/gemrb/GUIScripts/GUIClasses.py b/gemrb/GUIScripts/GUIClasses.py | |
index 6f1b412..8e5fb67 100644 | |
--- a/gemrb/GUIScripts/GUIClasses.py | |
+++ b/gemrb/GUIScripts/GUIClasses.py | |
@@ -56,7 +56,6 @@ class GWindow: | |
'SetPos': _GemRB.Window_SetPos, | |
'HasControl': _GemRB.Window_HasControl, | |
'DeleteControl': _GemRB.Window_DeleteControl, | |
- 'Unload': _GemRB.Window_Unload, | |
'SetupEquipmentIcons': _GemRB.Window_SetupEquipmentIcons, | |
'SetupSpellIcons': _GemRB.Window_SetupSpellIcons, | |
'SetupControls': _GemRB.Window_SetupControls, | |
@@ -64,6 +63,12 @@ class GWindow: | |
'ShowModal': _GemRB.Window_ShowModal, | |
'Invalidate': _GemRB.Window_Invalidate | |
} | |
+ def Unload(self): | |
+ if self.ID != -1: | |
+ _GemRB.Winow_Unload(self.ID) | |
+ self.ID = -1 | |
+ def __nonzero__(self): | |
+ return self.ID != -1 | |
def GetControl(self, control): | |
return _GemRB.Window_GetControl(self.ID, control) | |
def CreateWorldMapControl(self, control, *args): |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment