From: <lyn...@us...> - 2008-06-05 19:43:31
|
Revision: 5175 http://gemrb.svn.sourceforge.net/gemrb/?rev=5175&view=rev Author: lynxlupodian Date: 2008-06-05 12:43:20 -0700 (Thu, 05 Jun 2008) Log Message: ----------- iwd2: partly implemented ModifyPress in party chooser Modified Paths: -------------- gemrb/trunk/gemrb/GUIScripts/iwd2/SPParty.py Modified: gemrb/trunk/gemrb/GUIScripts/iwd2/SPParty.py =================================================================== --- gemrb/trunk/gemrb/GUIScripts/iwd2/SPParty.py 2008-06-05 19:34:39 UTC (rev 5174) +++ gemrb/trunk/gemrb/GUIScripts/iwd2/SPParty.py 2008-06-05 19:43:20 UTC (rev 5175) @@ -20,10 +20,13 @@ GemRB.SetVarAssoc(PartySelectWindow, ScrollBar, "TopIndex", PartyCount) ModifyButton = GemRB.GetControl(PartySelectWindow, 12) + GemRB.SetEvent(PartySelectWindow, ModifyButton, IE_GUI_BUTTON_ON_PRESS, "ModifyPress") GemRB.SetText(PartySelectWindow, ModifyButton, 10316) + CancelButton = GemRB.GetControl(PartySelectWindow, 11) GemRB.SetEvent(PartySelectWindow, CancelButton, IE_GUI_BUTTON_ON_PRESS, "CancelPress") GemRB.SetText(PartySelectWindow, CancelButton, 13727) + DoneButton = GemRB.GetControl(PartySelectWindow, 10) GemRB.SetEvent(PartySelectWindow, DoneButton, IE_GUI_BUTTON_ON_PRESS, "DonePress") GemRB.SetText(PartySelectWindow, DoneButton, 11973) @@ -67,6 +70,14 @@ GemRB.SetText(PartySelectWindow, Button, PartyDesc) return +def ModifyPress(): + Pos = GemRB.GetVar("PartyIdx") + if Pos == 0: # first entry - behaves same as pressing on done + GemRB.UnloadWindow(PartySelectWindow) + GemRB.LoadGame(-1) + GemRB.SetNextScript("SPPartyFormation") + #else: # here come the real modifications + def DonePress(): global PartySelectWindow Pos = GemRB.GetVar("PartyIdx") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |