From: <ave...@us...> - 2003-11-01 23:52:20
|
Update of /cvsroot/gemrb/gemrb/gemrb/GUIScripts In directory sc8-pr-cvs1:/tmp/cvs-serv25812 Modified Files: CharGen2.py CharGen3.py Added Files: CharGen4.py Log Message: Flushing script changes (done up to class selection) --- NEW FILE: CharGen4.py --- #character generation (GUICG 0) import GemRB CharGenWindow = 0 TextAreaControl = 0 def OnLoad(): global CharGenWindow, TextAreaControl GemRB.SetVar("Alignment",0) #alignment GemRB.LoadWindowPack("GUICG") CharGenWindow = GemRB.LoadWindow(0) PortraitButton = GemRB.GetControl(CharGenWindow, 12) GemRB.SetButtonFlags(CharGenWindow, PortraitButton, IE_GUI_BUTTON_PICTURE|IE_GUI_BUTTON_NO_IMAGE,OP_SET) PortraitTable = GemRB.LoadTable("pictures") PortraitName = GemRB.GetTableRowName(PortraitTable,GemRB.GetVar("PortraitIndex") ) GemRB.SetButtonPicture(CharGenWindow,PortraitButton, PortraitName+"M") RaceTable = GemRB.LoadTable("races") ClassTable = GemRB.LoadTable("classes") GenderButton = GemRB.GetControl(CharGenWindow,0) GemRB.SetText(CharGenWindow,GenderButton,11956) GemRB.SetButtonState(CharGenWindow,GenderButton,IE_GUI_BUTTON_DISABLED) RaceButton = GemRB.GetControl(CharGenWindow,1) GemRB.SetText(CharGenWindow,RaceButton, 11957) GemRB.SetButtonState(CharGenWindow,RaceButton,IE_GUI_BUTTON_DISABLED) ClassButton = GemRB.GetControl(CharGenWindow,2) GemRB.SetText(CharGenWindow,ClassButton, 11959) GemRB.SetButtonState(CharGenWindow,ClassButton,IE_GUI_BUTTON_DISABLED) AlignmentButton = GemRB.GetControl(CharGenWindow,3) GemRB.SetText(CharGenWindow,AlignmentButton, 11958) GemRB.SetButtonState(CharGenWindow,AlignmentButton,IE_GUI_BUTTON_ENABLED) AbilitiesButton = GemRB.GetControl(CharGenWindow,4) GemRB.SetText(CharGenWindow,AbilitiesButton, 11960) GemRB.SetButtonState(CharGenWindow,AbilitiesButton,IE_GUI_BUTTON_DISABLED) SkillButton = GemRB.GetControl(CharGenWindow,5) GemRB.SetText(CharGenWindow,SkillButton, 17372) GemRB.SetButtonState(CharGenWindow,SkillButton,IE_GUI_BUTTON_DISABLED) AppearanceButton = GemRB.GetControl(CharGenWindow,6) GemRB.SetText(CharGenWindow,AppearanceButton, 11961) GemRB.SetButtonState(CharGenWindow,AppearanceButton,IE_GUI_BUTTON_DISABLED) NameButton = GemRB.GetControl(CharGenWindow,7) GemRB.SetText(CharGenWindow,NameButton, 11963) GemRB.SetButtonState(CharGenWindow,NameButton,IE_GUI_BUTTON_DISABLED) BackButton = GemRB.GetControl(CharGenWindow, 11) GemRB.SetText(CharGenWindow, BackButton, 15416) GemRB.SetButtonState(CharGenWindow,BackButton,IE_GUI_BUTTON_ENABLED) AcceptButton = GemRB.GetControl(CharGenWindow, 8) GemRB.SetText(CharGenWindow, AcceptButton, 11962) GemRB.SetButtonState(CharGenWindow,AcceptButton,IE_GUI_BUTTON_DISABLED) ImportButton = GemRB.GetControl(CharGenWindow, 13) GemRB.SetText(CharGenWindow, ImportButton, 13955) GemRB.SetButtonState(CharGenWindow,ImportButton,IE_GUI_BUTTON_DISABLED) CancelButton = GemRB.GetControl(CharGenWindow, 15) GemRB.SetText(CharGenWindow, CancelButton, 8159) GemRB.SetButtonState(CharGenWindow,CancelButton,IE_GUI_BUTTON_ENABLED) BiographyButton = GemRB.GetControl(CharGenWindow, 16) GemRB.SetText(CharGenWindow, BiographyButton, 18003) GemRB.SetButtonState(CharGenWindow,BiographyButton,IE_GUI_BUTTON_DISABLED) TextAreaControl= GemRB.GetControl(CharGenWindow,9) GemRB.SetText(CharGenWindow, TextAreaControl, 12135) GemRB.TextAreaAppend(CharGenWindow, TextAreaControl,": ") if GemRB.GetVar("Gender") == 1: GemRB.TextAreaAppend(CharGenWindow, TextAreaControl, 1050) else: GemRB.TextAreaAppend(CharGenWindow, TextAreaControl, 1051) GemRB.TextAreaAppend(CharGenWindow, TextAreaControl,1048,-1) # new line GemRB.TextAreaAppend(CharGenWindow, TextAreaControl,": ") GemRB.TextAreaAppend(CharGenWindow, TextAreaControl,GemRB.GetTableValue(RaceTable,GemRB.GetVar("Race")-1,2)) GemRB.TextAreaAppend(CharGenWindow, TextAreaControl,"xxx", -1) GemRB.TextAreaAppend(CharGenWindow, TextAreaControl,": ") GemRB.TextAreaAppend(CharGenWindow, TextAreaControl,GemRB.GetTableValue(ClassTable,GemRB.GetVar("Class")-1,2)) GemRB.SetEvent(CharGenWindow, CancelButton, IE_GUI_BUTTON_ON_PRESS, "CancelPress") GemRB.SetEvent(CharGenWindow, BackButton, IE_GUI_BUTTON_ON_PRESS, "BackPress") GemRB.SetEvent(CharGenWindow, ClassButton, IE_GUI_BUTTON_ON_PRESS, "NextPress") GemRB.ShowModal(CharGenWindow) return def NextPress(): GemRB.UnloadWindow(CharGenWindow) GemRB.SetNextScript("GUICG2") #alignment return def CancelPress(): GemRB.UnloadWindow(CharGenWindow) GemRB.SetNextScript("CharGen") return def BackPress(): GemRB.UnloadWindow(CharGenWindow) GemRB.SetNextScript("CharGen3") #appearance return Index: CharGen2.py =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/GUIScripts/CharGen2.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** CharGen2.py 31 Oct 2003 21:14:53 -0000 1.4 --- CharGen2.py 1 Nov 2003 23:52:16 -0000 1.5 *************** *** 96,100 **** def BackPress(): GemRB.UnloadWindow(CharGenWindow) ! GemRB.SetNextScript("GUICG12") #appearance return --- 96,100 ---- def BackPress(): GemRB.UnloadWindow(CharGenWindow) ! GemRB.SetNextScript("CharGen") #appearance return Index: CharGen3.py =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/GUIScripts/CharGen3.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CharGen3.py 1 Nov 2003 13:45:28 -0000 1.2 --- CharGen3.py 1 Nov 2003 23:52:16 -0000 1.3 *************** *** 8,12 **** global CharGenWindow, TextAreaControl ! GemRB.SetVar("Class",0) #race GemRB.LoadWindowPack("GUICG") --- 8,12 ---- global CharGenWindow, TextAreaControl ! GemRB.SetVar("Class",0) #class GemRB.LoadWindowPack("GUICG") *************** *** 101,105 **** def BackPress(): GemRB.UnloadWindow(CharGenWindow) ! GemRB.SetNextScript("GUICG8") #appearance return --- 101,105 ---- def BackPress(): GemRB.UnloadWindow(CharGenWindow) ! GemRB.SetNextScript("CharGen2") #appearance return |