From: Laszlo T. <ave...@us...> - 2006-08-08 20:26:17
|
Update of /cvsroot/gemrb/gemrb/gemrb/GUIScripts/bg2 In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv2485/GUIScripts/bg2 Modified Files: GUICommonWindows.py Log Message: bg2:added Rest button function fixed/implemented resting with rest spawns, movie, healing fixed attackers stuck in the Attackers list fixed RandomWalk implemented SelectWeaponAbility Index: GUICommonWindows.py =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/GUIScripts/bg2/GUICommonWindows.py,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** GUICommonWindows.py 7 Aug 2006 22:25:13 -0000 1.38 --- GUICommonWindows.py 8 Aug 2006 20:25:44 -0000 1.39 *************** *** 27,30 **** --- 27,31 ---- from GUIDefines import * from ie_stats import * + from ie_modal import * FRAME_PC_SELECTED = 0 *************** *** 107,111 **** # Rest ! Button = GemRB.GetControl (Window, rb) GemRB.SetTooltip (Window, Button, 11942) --- 108,113 ---- # Rest ! Button = GemRB.GetControl (Window, rb) ! GemRB.SetEvent (Window, Button, IE_GUI_BUTTON_ON_PRESS, "RestPress") GemRB.SetTooltip (Window, Button, 11942) *************** *** 116,120 **** def RestPress (): ! print "RestPress" return --- 118,122 ---- def RestPress (): ! GemRB.RestParty(0,0,0) return *************** *** 228,233 **** Button = GemRB.GetControl (ActionsWindow, i) GemRB.SetButtonBorder (ActionsWindow, Button, 1, 0, 0, 0, 0, 50,30,10,120, 0, 1) ! GemRB.SetButtonFont (ActionsWindow, Button, "NUMBER") ! GemRB.SetText (ActionsWindow, Button, "") if pc == 0: --- 230,235 ---- Button = GemRB.GetControl (ActionsWindow, i) GemRB.SetButtonBorder (ActionsWindow, Button, 1, 0, 0, 0, 0, 50,30,10,120, 0, 1) ! GemRB.SetButtonFont (ActionsWindow, Button, "NUMBER") ! GemRB.SetText (ActionsWindow, Button, "") if pc == 0: *************** *** 294,302 **** #no check needed because the button wouldn't be drawn if illegal ! def ActionLeftPressed (): ! TopIndex = GemRB.GetVar ("TopIndex") ! if TopIndex>10: ! TopIndex -= 10 ! else: TopIndex = 0 GemRB.SetVar ("TopIndex", TopIndex) --- 296,304 ---- #no check needed because the button wouldn't be drawn if illegal ! def ActionLeftPressed (): ! TopIndex = GemRB.GetVar ("TopIndex") ! if TopIndex>10: ! TopIndex -= 10 ! else: TopIndex = 0 GemRB.SetVar ("TopIndex", TopIndex) *************** *** 306,327 **** #no check needed because the button wouldn't be drawn if illegal def ActionRightPressed (): ! pc = GemRB.GameGetFirstSelectedPC() ! TopIndex = GemRB.GetVar ("TopIndex") ! Type = GemRB.GetVar ("Type") ! if Type == 3: ! Max = GemRB.GetMemorizedSpellsCount(pc,0)+GemRB.GetMemorizedSpellsCount(pc,1) ! else: ! Max = GemRB.GetMemorizedSpellsCount(pc,2) ! TopIndex += 10 ! if TopIndex > Max - 10: ! if Max>10: ! TopIndex = Max-10 ! else: ! TopIndex = 0 ! GemRB.SetVar ("TopIndex", TopIndex) UpdateActionsWindow () return def ActionUseItemPressed (): GemRB.SetVar ("TopIndex", 0) --- 308,353 ---- #no check needed because the button wouldn't be drawn if illegal def ActionRightPressed (): ! pc = GemRB.GameGetFirstSelectedPC() ! TopIndex = GemRB.GetVar ("TopIndex") ! Type = GemRB.GetVar ("Type") ! if Type == 3: ! Max = GemRB.GetMemorizedSpellsCount(pc,0)+GemRB.GetMemorizedSpellsCount(pc,1) ! else: ! Max = GemRB.GetMemorizedSpellsCount(pc,2) ! TopIndex += 10 ! if TopIndex > Max - 10: ! if Max>10: ! TopIndex = Max-10 ! else: ! TopIndex = 0 ! GemRB.SetVar ("TopIndex", TopIndex) UpdateActionsWindow () return + def ActionSongPressed (): + pc = GemRB.GameGetFirstSelectedPC() + GemRB.SetModalState (pc, MS_BATTLESONG) + UpdateActionsWindow () + return + + def ActionSearchPressed (): + pc = GemRB.GameGetFirstSelectedPC() + GemRB.SetModalState (pc, MS_DETECTTRAPS) + UpdateActionsWindow () + return + + def ActionStealthPressed (): + pc = GemRB.GameGetFirstSelectedPC() + GemRB.SetModalState (pc, MS_STEALTH) + UpdateActionsWindow () + return + + def ActionTurnPressed (): + pc = GemRB.GameGetFirstSelectedPC() + GemRB.SetModalState (pc, MS_TURNUNDEAD) + UpdateActionsWindow () + return + def ActionUseItemPressed (): GemRB.SetVar ("TopIndex", 0) |