From: <lyn...@us...> - 2008-09-13 18:03:29
|
Revision: 5284 http://gemrb.svn.sourceforge.net/gemrb/?rev=5284&view=rev Author: lynxlupodian Date: 2008-09-13 18:03:40 +0000 (Sat, 13 Sep 2008) Log Message: ----------- bg2: made parts of the proficiencies window's left part mouse wheelable Modified Paths: -------------- gemrb/trunk/gemrb/GUIScripts/bg2/GUICG9.py Modified: gemrb/trunk/gemrb/GUIScripts/bg2/GUICG9.py =================================================================== --- gemrb/trunk/gemrb/GUIScripts/bg2/GUICG9.py 2008-09-13 17:39:06 UTC (rev 5283) +++ gemrb/trunk/gemrb/GUIScripts/bg2/GUICG9.py 2008-09-13 18:03:40 UTC (rev 5284) @@ -98,10 +98,22 @@ RowCount = GemRB.GetTableRowCount(SkillTable)-7 #we decrease it with the bg1 skills SkillWindow = GemRB.LoadWindow(9) + GemRB.SetVar("TopIndex",0) + ScrollBarControl = GemRB.GetControl(SkillWindow, 78) + GemRB.SetEvent(SkillWindow, ScrollBarControl, IE_GUI_SCROLLBAR_ON_CHANGE, "ScrollBarPress") + ProfCount = RowCount - 8 # decrease it with the number of controls + # decrease it with the number of invalid proficiencies + for i in range(RowCount): + SkillName = GemRB.GetTableValue (SkillTable, i+8, 1) + if SkillName == -1: + ProfCount -= 1 + GemRB.SetVarAssoc (SkillWindow, ScrollBarControl, "TopIndex", ProfCount) + for i in range(8): Button=GemRB.GetControl(SkillWindow, i+69) GemRB.SetVarAssoc(SkillWindow, Button, "Prof", i) GemRB.SetEvent(SkillWindow, Button, IE_GUI_BUTTON_ON_PRESS, "JustPress") + GemRB.AttachScrollBar (SkillWindow, Button, ScrollBarControl) Button=GemRB.GetControl(SkillWindow, i*2+11) GemRB.SetVarAssoc(SkillWindow, Button, "Prof", i) @@ -113,7 +125,8 @@ for j in range(5): Star=GemRB.GetControl(SkillWindow, i*5+j+27) - GemRB.SetButtonState(SkillWindow, Star, IE_GUI_BUTTON_DISABLED) + #GemRB.SetButtonState(SkillWindow, Star, IE_GUI_BUTTON_DISABLED) + GemRB.AttachScrollBar (SkillWindow, Star, ScrollBarControl) BackButton = GemRB.GetControl(SkillWindow,77) GemRB.SetText(SkillWindow,BackButton,15416) @@ -124,17 +137,6 @@ TextAreaControl = GemRB.GetControl(SkillWindow, 68) GemRB.SetText(SkillWindow,TextAreaControl,9588) - GemRB.SetVar("TopIndex",0) - ScrollBarControl = GemRB.GetControl(SkillWindow, 78) - GemRB.SetEvent(SkillWindow, ScrollBarControl, IE_GUI_SCROLLBAR_ON_CHANGE, "ScrollBarPress") - ProfCount = RowCount - 8 # decrease it with the number of controls - # decrease it with the number of invalid proficiencies - for i in range(RowCount): - SkillName = GemRB.GetTableValue (SkillTable, i+8, 1) - if SkillName == -1: - ProfCount -= 1 - GemRB.SetVarAssoc (SkillWindow, ScrollBarControl, "TopIndex", ProfCount) - GemRB.SetEvent(SkillWindow,DoneButton,IE_GUI_BUTTON_ON_PRESS,"NextPress") GemRB.SetEvent(SkillWindow,BackButton,IE_GUI_BUTTON_ON_PRESS,"BackPress") GemRB.SetButtonState(SkillWindow,DoneButton,IE_GUI_BUTTON_DISABLED) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |