Skip to content

Commit

Permalink
tob: basic level up gui;
Browse files Browse the repository at this point in the history
lots of things still to try
and mend and fix
and think up tricks
to have a nicely leveled guy.

svn-id: r5639
  • Loading branch information
lynxlynxlynx committed Feb 4, 2009
1 parent a8d66de commit c00a230
Show file tree
Hide file tree
Showing 3 changed files with 451 additions and 13 deletions.
13 changes: 7 additions & 6 deletions gemrb/GUIScripts/bg2/GUICG9.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
PointsLeft = 0
ProfColumn = 0

def RedrawSkills(SkillWindow, First=0):
def RedrawSkills(First=0):
global TopIndex, ScrollBarControl

if PointsLeft == 0:
Expand Down Expand Up @@ -62,7 +62,7 @@ def RedrawSkills(SkillWindow, First=0):
if len(SkipProfs) > 0 and First == 1:
TopIndex += SkipProfs[len(SkipProfs)-1] + 1
GemRB.SetVar("TopIndex",TopIndex)
RedrawSkills(SkillWindow)
RedrawSkills()

return

Expand Down Expand Up @@ -139,18 +139,19 @@ def OnLoad():
BackButton.SetEvent(IE_GUI_BUTTON_ON_PRESS,"BackPress")
DoneButton.SetState(IE_GUI_BUTTON_DISABLED)
TopIndex = 0
RedrawSkills(SkillWindow, 1)
RedrawSkills(1)
SkillWindow.SetVisible(1)
return

def ScrollBarPress():
global TopIndex

TopIndex = GemRB.GetVar("TopIndex")
RedrawSkills(SkillWindow)
RedrawSkills()
return

def JustPress():
global TextAreaControl
Pos = GemRB.GetVar("Prof")+TopIndex
TextAreaControl.SetText(SkillTable.GetValue(Pos+8, 2) )
return
Expand All @@ -166,7 +167,7 @@ def RightPress():
GemRB.SetVar("Prof "+str(Pos),ActPoint-1)
PointsLeft = PointsLeft + 1
DoneButton.SetState(IE_GUI_BUTTON_DISABLED)
RedrawSkills(SkillWindow)
RedrawSkills()
return

def LeftPress():
Expand All @@ -185,7 +186,7 @@ def LeftPress():
return
GemRB.SetVar("Prof "+str(Pos),ActPoint+1)
PointsLeft = PointsLeft - 1
RedrawSkills(SkillWindow)
RedrawSkills()
return

def BackPress():
Expand Down
9 changes: 2 additions & 7 deletions gemrb/GUIScripts/bg2/GUIREC.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import GUICommonWindows
from GUIDefines import *
from ie_stats import *
from GUICommon import CloseOtherWindow
from GUICommon import CloseOtherWindow, GameIsTOB
from GUICommonWindows import *
from GUIWORLD import OpenReformPartyWindow

Expand All @@ -41,7 +41,6 @@
OldOptionsWindow = None
ExportWindow = None
KitInfoWindow = None
LevelUpWindow = None
ExportDoneButton = None
ExportFileName = ""

Expand Down Expand Up @@ -934,15 +933,11 @@ def KitInfoWindow():
KitInfoWindow.ShowModal (MODAL_SHADOW_GRAY)
return

def LevelUpDonePress():
if LevelUpWindow:
LevelUpWindow.Unload()
return

def KitDonePress():
if KitInfoWindow:
KitInfoWindow.Unload()
return

from LevelUp import *
###################################################
# End of file GUIREC.py
Loading

0 comments on commit c00a230

Please sign in to comment.