From: Laszlo T. <ave...@us...> - 2005-05-17 17:14:37
|
Update of /cvsroot/gemrb/gemrb/gemrb/GUIScripts/bg2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3197/GUIScripts/bg2 Modified Files: GUIWORLD.py MessageWindow.py Log Message: Fixed closing of container when moving away (or doing something in the gamescreen), playing closing sound as well Fixed problems with ControlAnimation Index: MessageWindow.py =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/GUIScripts/bg2/MessageWindow.py,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** MessageWindow.py 13 May 2005 16:40:09 -0000 1.27 --- MessageWindow.py 17 May 2005 17:13:53 -0000 1.28 *************** *** 170,172 **** --- 170,173 ---- GemRB.SetVar("PortraitWindow", PortraitWindow) + print "Unhidegui" GemRB.UnhideGUI() Index: GUIWORLD.py =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/GUIScripts/bg2/GUIWORLD.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** GUIWORLD.py 16 May 2005 14:26:18 -0000 1.5 --- GUIWORLD.py 17 May 2005 17:13:53 -0000 1.6 *************** *** 30,52 **** ContainerWindow = None FormationWindow = None ReformPartyWindow = None Container = None def OpenEndDialogWindow (): ! global ContinueWindow GemRB.HideGUI () if ContinueWindow: - GemRB.UnloadWindow (ContinueWindow) - ContinueWindow = None - - GemRB.SetVar ("OtherWindow", -1) - GemRB.UnhideGUI () return GemRB.LoadWindowPack (GetWindowPack()) ! ContainerWindow = Window = GemRB.LoadWindow (9) ! GemRB.SetVar ("OtherWindow", Window) #end dialog --- 30,61 ---- ContainerWindow = None + ContinueWindow = None FormationWindow = None ReformPartyWindow = None + OldActionsWindow = None Container = None + def CloseContinueWindow (): + global ContinueWindow, OldActionsWindow + + GemRB.UnloadWindow (ContinueWindow) + GemRB.SetVar ("ActionsWindow", OldActionsWindow) + ContinueWindow = None + OldActionsWindow = None + GemRB.UnhideGUI () + + def OpenEndDialogWindow (): ! global ContinueWindow, OldActionsWindow ! GemRB.HideGUI () if ContinueWindow: return GemRB.LoadWindowPack (GetWindowPack()) ! ContinueWindow = Window = GemRB.LoadWindow (9) ! OldActionsWindow = GemRB.GetVar("ActionsWindow") ! GemRB.SetVar ("ActionsWindow", Window) #end dialog *************** *** 54,75 **** GemRB.SetText (Window, Button, 9371) GemRB.SetVarAssoc (Window, Button, "DialogChoose", -1) GemRB.UnhideGUI () def OpenContinueDialogWindow (): ! global ContinueWindow GemRB.HideGUI () if ContinueWindow: - GemRB.UnloadWindow (ContinueWindow) - ContinueWindow = None - - GemRB.SetVar ("OtherWindow", -1) - GemRB.UnhideGUI () return GemRB.LoadWindowPack (GetWindowPack()) ! ContainerWindow = Window = GemRB.LoadWindow (9) ! GemRB.SetVar ("OtherWindow", Window) #continue --- 63,82 ---- GemRB.SetText (Window, Button, 9371) GemRB.SetVarAssoc (Window, Button, "DialogChoose", -1) + GemRB.SetEvent (Window, Button, IE_GUI_BUTTON_ON_PRESS, "CloseContinueWindow") GemRB.UnhideGUI () def OpenContinueDialogWindow (): ! global ContinueWindow, OldActionsWindow ! GemRB.HideGUI () if ContinueWindow: return GemRB.LoadWindowPack (GetWindowPack()) ! ContinueWindow = Window = GemRB.LoadWindow (9) ! OldActionsWindow = GemRB.GetVar("ActionsWindow") ! GemRB.SetVar ("ActionsWindow", Window) #continue *************** *** 77,101 **** GemRB.SetText (Window, Button, 9372) GemRB.SetVarAssoc (Window, Button, "DialogChoose", 0) GemRB.UnhideGUI () ! def OpenContainerWindow (): ! global ContainerWindow, Container GemRB.HideGUI () ! if ContainerWindow: ! GemRB.UnloadWindow (ContainerWindow) ! ContainerWindow = None ! GemRB.SetVar ("OtherWindow", -1) ! GemRB.UnhideGUI () return GemRB.LoadWindowPack (GetWindowPack()) ContainerWindow = Window = GemRB.LoadWindow (8) ! GemRB.SetVar ("OtherWindow", Window) ! Container = GemRB.GetContainer() # Gears (time) when options pane is down --- 84,127 ---- GemRB.SetText (Window, Button, 9372) GemRB.SetVarAssoc (Window, Button, "DialogChoose", 0) + GemRB.SetEvent (Window, Button, IE_GUI_BUTTON_ON_PRESS, "CloseContinueWindow") GemRB.UnhideGUI () ! def CloseContainerWindow (): ! global OldActionsWindow, ContainerWindow ! ! print "Start Closing" GemRB.HideGUI () ! GemRB.UnloadWindow (ContainerWindow) ! ContainerWindow = None ! GemRB.SetVar ("ActionsWindow", OldActionsWindow) ! Table = GemRB.LoadTable ("containr") ! row = Container['Type'] ! tmp = GemRB.GetTableValue (Table, row, 2) ! #play closing sound if applicable ! if tmp!='*': ! GemRB.PlaySound (tmp) ! #it is enough to close here ! GemRB.UnloadTable (Table) ! GemRB.UnhideGUI () ! ! ! def OpenContainerWindow (): ! global OldActionsWindow, ContainerWindow, Container ! ! if ContainerWindow: return + GemRB.HideGUI () + GemRB.LoadWindowPack (GetWindowPack()) ContainerWindow = Window = GemRB.LoadWindow (8) ! OldActionsWindow = GemRB.GetVar ("ActionsWindow") ! GemRB.SetVar ("ActionsWindow", Window) ! Container = GemRB.GetContainer(GemRB.GameGetFirstSelectedPC()) # Gears (time) when options pane is down |