From: Laszlo T. <ave...@us...> - 2005-11-21 21:21:43
|
Update of /cvsroot/gemrb/gemrb/gemrb/GUIScripts/iwd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13990/iwd Modified Files: GUICommonWindows.py MessageWindow.py TextScreen.py Log Message: updated iwd guiscripts a bit (now iwd can start) Index: MessageWindow.py =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/GUIScripts/iwd/MessageWindow.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** MessageWindow.py 15 Aug 2005 15:55:39 -0000 1.17 --- MessageWindow.py 21 Nov 2005 21:21:31 -0000 1.18 *************** *** 49,53 **** GemRB.LoadWindowPack(GetWindowPack()) ActionsWindow = GemRB.LoadWindow(3) ! OptionsWindow = GemRB.LoadWindow(25) PortraitWindow = OpenPortraitWindow(1) --- 49,53 ---- GemRB.LoadWindowPack(GetWindowPack()) ActionsWindow = GemRB.LoadWindow(3) ! OptionsWindow = GemRB.LoadWindow(0) PortraitWindow = OpenPortraitWindow(1) *************** *** 66,70 **** SetupActionsWindowControls (ActionsWindow) ! SetupMenuWindowControls (OptionsWindow, 1) UpdateControlStatus() --- 66,70 ---- SetupActionsWindowControls (ActionsWindow) ! SetupMenuWindowControls (OptionsWindow, 1, "ReturnToGame") UpdateControlStatus() Index: TextScreen.py =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/GUIScripts/iwd/TextScreen.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TextScreen.py 6 Jun 2005 19:56:45 -0000 1.2 --- TextScreen.py 21 Nov 2005 21:21:31 -0000 1.3 *************** *** 28,51 **** TextScreen = None TextArea = None def StartTextScreen (): ! global TextScreen, TextArea GemRB.LoadWindowPack ("GUICHAP", 640, 480) LoadPic = GemRB.GetGameString (STR_LOADMOS) #if there is no preset loadpic, try to determine it from the chapter ! if LoadPic == "": ! Chapter = GemRB.GetVar("CHAPTER") #set ID according to the Chapter? ! ID = Chapter else: ID = 63 TextScreen = GemRB.LoadWindow (ID) GemRB.SetWindowFrame (TextScreen) ! if LoadPic != "": ! GemRB.SetWindowPicture (TextScreen, LoadPic) TextArea = GemRB.GetControl (TextScreen, 2) GemRB.SetTextAreaFlags (TextScreen, TextArea, IE_GUI_TEXTAREA_SMOOTHSCROLL) #done Button=GemRB.GetControl (TextScreen, 0) --- 28,60 ---- TextScreen = None TextArea = None + Chapter = 0 def StartTextScreen (): ! global TextScreen, TextArea, Chapter GemRB.LoadWindowPack ("GUICHAP", 640, 480) LoadPic = GemRB.GetGameString (STR_LOADMOS) #if there is no preset loadpic, try to determine it from the chapter ! if LoadPic[:6] == "CHPTXT": ! ID = GemRB.GetVar("CHAPTER") #set ID according to the Chapter? ! Chapter = ID + 1 else: + Chapter = -1 ID = 63 + TextScreen = GemRB.LoadWindow (ID) GemRB.SetWindowFrame (TextScreen) ! TextArea = GemRB.GetControl (TextScreen, 2) GemRB.SetTextAreaFlags (TextScreen, TextArea, IE_GUI_TEXTAREA_SMOOTHSCROLL) + #caption + Table = GemRB.LoadTable("chapters") + Value = GemRB.GetTableValue (Table, Chapter, 0) + GemRB.UnloadTable (Table) + Label=GemRB.GetControl (TextScreen, 0x10000000) + GemRB.SetText (TextScreen, Label, Value) + #done Button=GemRB.GetControl (TextScreen, 0) *************** *** 61,69 **** GemRB.SetVisible (0, 0) #removing the gamecontrol screen GemRB.SetVisible (TextScreen, 1) def ReplayTextScreen (): global TextScreen, TextArea ! #GemRB.Rewind(TextScreen, TextArea) def EndTextScreen (): --- 70,94 ---- GemRB.SetVisible (0, 0) #removing the gamecontrol screen GemRB.SetVisible (TextScreen, 1) + GemRB.RewindTA(TextScreen, TextArea, 100) + GemRB.GamePause(1, 1) + + + def FeedScroll (): + global TextScreen, TextArea, Position + + TableName = GemRB.GetGameString ("chapters") + Table = GemRB.LoadTable(TableName) + Value = GemRB.GetTableValue (Table, Chapter, Position) + GemRB.UnloadTable (Table) + if Value ==-1: + Position = 1 + else: + GemRB.TextAreaAppend (TextScreen, TextArea, Value) + Position = Position + 1 def ReplayTextScreen (): global TextScreen, TextArea ! GemRB.RewindTA(TextScreen, TextArea, 100) def EndTextScreen (): *************** *** 74,76 **** --- 99,102 ---- GemRB.SetVisible (0, 1) #enabling gamecontrol screen GemRB.UnhideGUI () + GemRB.GamePause(0, 1) Index: GUICommonWindows.py =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/GUIScripts/iwd/GUICommonWindows.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** GUICommonWindows.py 29 May 2005 12:59:43 -0000 1.8 --- GUICommonWindows.py 21 Nov 2005 21:21:31 -0000 1.9 *************** *** 45,49 **** # 10 TXTE ! def SetupMenuWindowControls (Window): # FIXME: add "(key)" to tooltips! --- 45,49 ---- # 10 TXTE ! def SetupMenuWindowControls (Window, Gears, ReturnToGame): # FIXME: add "(key)" to tooltips! *************** *** 107,119 **** GemRB.SetEvent (Window, Button, IE_GUI_BUTTON_ON_PRESS, "") ## # Rest ## Button = GemRB.GetControl (Window, 8) ## GemRB.SetTooltip (Window, Button, 11942) ## GemRB.SetEvent(Window, Button, IE_GUI_BUTTON_ON_PRESS, "OpenStoreWindow") - - # AI - #Button = GemRB.GetControl (Window, 9) - #GemRB.SetTooltip (Window, Button, 41631) # or 41646 Activate ... - #GemRB.SetEvent (Window, Button, IE_GUI_BUTTON_ON_PRESS, "OpenFloatMenuWindow") return --- 107,121 ---- GemRB.SetEvent (Window, Button, IE_GUI_BUTTON_ON_PRESS, "") + if Gears: + # Gears (time) + Button = GemRB.GetControl (Window, 9) + GemRB.SetAnimation (Window, Button, "CGEAR") + GemRB.SetButtonFlags (Window, Button, IE_GUI_BUTTON_PICTURE | IE_GUI_BUTTON_ANIMATED, OP_SET) + GemRB.SetButtonState(Window, Button, IE_GUI_BUTTON_LOCKED) + ## # Rest ## Button = GemRB.GetControl (Window, 8) ## GemRB.SetTooltip (Window, Button, 11942) ## GemRB.SetEvent(Window, Button, IE_GUI_BUTTON_ON_PRESS, "OpenStoreWindow") return *************** *** 195,203 **** global PortraitWindow ! #we use needcontrols to determine which window is the portraitwindow ! if needcontrols: ! PortraitWindow = Window = GemRB.LoadWindow(26) ! else: ! PortraitWindow = Window = GemRB.LoadWindow(1) for i in range (PARTY_SIZE): --- 197,214 ---- global PortraitWindow ! PortraitWindow = Window = GemRB.LoadWindow(1) ! if needcontrols: ! Button=GemRB.GetControl(PortraitWindow, 8) ! GemRB.SetEvent(PortraitWindow, Button, IE_GUI_BUTTON_ON_PRESS, "MinimizePortraits") ! ! # AI ! Button = GemRB.GetControl (Window, 6) ! GemRB.SetButtonState (Window, Button, IE_GUI_BUTTON_DISABLED) ! GemRB.SetEvent (Window, Button, IE_GUI_BUTTON_ON_PRESS, "AIPress") ! ! #Select All ! Button = GemRB.GetControl (Window, 7) ! GemRB.SetTooltip (Window, Button, 10485) ! GemRB.SetEvent (Window, Button, IE_GUI_BUTTON_ON_PRESS, "SelectAllOnPress") for i in range (PARTY_SIZE): |