From: Laszlo T. <ave...@us...> - 2006-08-04 22:41:17
|
Update of /cvsroot/gemrb/gemrb/gemrb/GUIScripts/bg1 In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv681/bg1 Modified Files: GUICommonWindows.py Log Message: added item/spell lists to bg1/iwd/how Index: GUICommonWindows.py =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/GUIScripts/bg1/GUICommonWindows.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** GUICommonWindows.py 19 Jul 2006 17:44:08 -0000 1.13 --- GUICommonWindows.py 4 Aug 2006 22:41:09 -0000 1.14 *************** *** 121,124 **** --- 121,125 ---- global ActionsWindow + GemRB.SetVar ("ActionLevel", 0) Window = ActionsWindow for i in range (12): *************** *** 137,141 **** Window = ActionsWindow ! for i in range(12): Button = GemRB.GetControl (Window, i) GemRB.SetButtonFlags (Window, Button, IE_GUI_BUTTON_NORMAL, OP_SET) --- 138,142 ---- Window = ActionsWindow ! for i in range (12): Button = GemRB.GetControl (Window, i) GemRB.SetButtonFlags (Window, Button, IE_GUI_BUTTON_NORMAL, OP_SET) *************** *** 153,156 **** --- 154,158 ---- global ActionsWindow + GemRB.SetVar ("ActionLevel", 0) Window = ActionsWindow Button = GemRB.GetControl (Window, 0) *************** *** 216,219 **** --- 218,222 ---- Button = GemRB.GetControl (ActionsWindow, i) GemRB.SetButtonBorder (ActionsWindow, Button, 0,6,6,4,4,0,254,0,255) + GemRB.SetButtonBorder (ActionsWindow, Button, 1, 0, 0, 0, 0, 50,30,10,120, 0, 1) if pc == 0: *************** *** 224,228 **** return #this is based on class ! GemRB.SetupControls (ActionsWindow, pc) return --- 227,241 ---- return #this is based on class ! ! level = GemRB.GetVar ("ActionLevel") ! TopIndex = GemRB.GetVar ("TopIndex") ! if level == 0: ! GemRB.SetupControls (ActionsWindow, pc) ! elif level == 1: ! GemRB.SetupEquipmentIcons(ActionsWindow, pc, TopIndex) ! elif level == 2: #spells ! GemRB.SetupSpellIcons(ActionsWindow, pc, 3, TopIndex) ! elif level == 3: #innates ! GemRB.SetupSpellIcons(ActionsWindow, pc, 4, TopIndex) return *************** *** 239,247 **** pc = GemRB.GameGetFirstSelectedPC() ! if GemRB.GetEquippedQuickSlot(pc)==which and not (GemRB.GameControlGetTargetMode() &TARGET_MODE_ATTACK): GemRB.GameControlSetTargetMode (TARGET_MODE_ALL | TARGET_MODE_ATTACK) else: GemRB.GameControlSetTargetMode (TARGET_MODE_ALL) ! GemRB.SetEquippedQuickSlot(pc, which) GemRB.SetupControls (ActionsWindow, pc) --- 252,260 ---- pc = GemRB.GameGetFirstSelectedPC() ! if GemRB.GetEquippedQuickSlot (pc)==which and not (GemRB.GameControlGetTargetMode() &TARGET_MODE_ATTACK): GemRB.GameControlSetTargetMode (TARGET_MODE_ALL | TARGET_MODE_ATTACK) else: GemRB.GameControlSetTargetMode (TARGET_MODE_ALL) ! GemRB.SetEquippedQuickSlot (pc, which) GemRB.SetupControls (ActionsWindow, pc) *************** *** 267,281 **** return ! def RefreshUseItemWindow (): ! pc = GemRB.GameGetFirstSelectedPC() ! print "setting up useitem window topindex:",TopIndex ! GemRB.SetupEquipmentIcons(ActionsWindow, pc, TopIndex) return def ActionUseItemPressed (): ! global TopIndex ! TopIndex = 0 ! RefreshUseItemWindow() return --- 280,311 ---- return ! #no check needed because the button wouldn't be drawn if illegal ! def LeftScrollPressed (): ! GemRB.SetVar ("TopIndex", GemRB.GetVar ("TopIndex") -1) ! UpdateActionsWindow () ! return ! ! #no check needed because the button wouldn't be drawn if illegal ! def RightScrollPressed (): ! GemRB.SetVar ("TopIndex", GemRB.GetVar ("TopIndex") +1) ! UpdateActionsWindow () return def ActionUseItemPressed (): ! GemRB.SetVar ("TopIndex", 0) ! GemRB.SetVar ("ActionLevel", 1) ! UpdateActionsWindow () ! return ! def ActionCastPressed (): ! GemRB.SetVar ("TopIndex", 0) ! GemRB.SetVar ("ActionLevel", 2) ! UpdateActionsWindow () ! return ! ! def ActionInnatePressed (): ! GemRB.SetVar ("TopIndex", 0) ! GemRB.SetVar ("ActionLevel", 3) ! UpdateActionsWindow () return *************** *** 413,416 **** --- 443,447 ---- global PortraitWindow + GemRB.SetVar ("ActionLevel", 0) if (not SelectionChangeHandler): UpdateActionsWindow () *************** *** 503,506 **** GemRB.SetLabelTextColor (Window, Label2, 255, 0, 0) return - - --- 534,535 ---- |