From: <ave...@us...> - 2003-11-30 14:16:23
|
Update of /cvsroot/gemrb/gemrb/gemrb/GUIScripts/bg2 In directory sc8-pr-cvs1:/tmp/cvs-serv17023 Modified Files: GUICG13.py Log Message: Add: Added paperdoll to the BG2 color selection screen (it is not fully implemented) Index: GUICG13.py =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/GUIScripts/bg2/GUICG13.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** GUICG13.py 27 Nov 2003 22:15:35 -0000 1.5 --- GUICG13.py 30 Nov 2003 14:16:19 -0000 1.6 *************** *** 16,22 **** Color3 = 0 Color4 = 0 def OnLoad(): ! global ColorWindow, DoneButton, ColorTable global HairButton, SkinButton, MajorButton, MinorButton global Color1, Color2, Color3, Color4 --- 16,34 ---- Color3 = 0 Color4 = 0 + PDollButton = 0 + IE_ANIM_ID = 206 + global IE_ANIM_ID + + def RefreshPDoll(): + PDollTable = GemRB.LoadTable("pdolls") + AnimID = "0x6000" + ResRef = GemRB.GetTableValue(PDollTable, AnimID, "LEVEL4") + print ResRef + GemRB.SetButtonPLT(ColorWindow, PDollButton, ResRef, + Color2, Color1, Color3, Color4, 0,0,0,0) + return def OnLoad(): ! global ColorWindow, DoneButton, PDollButton, ColorTable global HairButton, SkinButton, MajorButton, MinorButton global Color1, Color2, Color3, Color4 *************** *** 33,36 **** --- 45,51 ---- Color3=GemRB.GetTableValue(PortraitTable,PortraitIndex,3) Color4=GemRB.GetTableValue(PortraitTable,PortraitIndex,4) + PDollButton = GemRB.GetControl(ColorWindow, 1) + GemRB.SetButtonFlags(ColorWindow, PDollButton, IE_GUI_BUTTON_PICTURE,OP_OR) + HairButton = GemRB.GetControl(ColorWindow, 2) GemRB.SetButtonFlags(ColorWindow, HairButton, IE_GUI_BUTTON_PICTURE,OP_OR) *************** *** 60,63 **** --- 75,79 ---- GemRB.SetEvent(ColorWindow,DoneButton,IE_GUI_BUTTON_ON_PRESS,"NextPress") GemRB.SetEvent(ColorWindow,BackButton,IE_GUI_BUTTON_ON_PRESS,"BackPress") + RefreshPDoll() GemRB.SetVisible(ColorWindow,1) return *************** *** 72,87 **** --- 88,107 ---- Color1=PickedColor GemRB.SetButtonBAM(ColorWindow, HairButton, "COLGRAD", 1, 0, Color1) + RefreshPDoll() return if ColorIndex==1: Color2=PickedColor GemRB.SetButtonBAM(ColorWindow, SkinButton, "COLGRAD", 1, 0, Color2) + RefreshPDoll() return if ColorIndex==2: Color3=PickedColor GemRB.SetButtonBAM(ColorWindow, MajorButton, "COLGRAD", 1, 0, Color3) + RefreshPDoll() return Color4=PickedColor GemRB.SetButtonBAM(ColorWindow, MinorButton, "COLGRAD", 1, 0, Color4) + RefreshPDoll() return |