From: Alyssa M. <fu...@us...> - 2010-10-26 14:25:24
|
gemrb: Infinity Engine emulator The branch master has been updated via 38f1f7854b158ce2f998dd8f127da4c44c998360 (commit) Summary of changes: gemrb/GUIScripts/CommonWindow.py | 9 +++++++-- gemrb/GUIScripts/GUICommon.py | 8 ++++---- gemrb/GUIScripts/pst/GUIINV.py | 2 +- gemrb/GUIScripts/pst/GUIPR.py | 1 + 4 files changed, 13 insertions(+), 7 deletions(-) from 3b8eb2fcb3f918bedb4540f40e4e476544423234 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=38f1f7854b158ce2f998dd8f127da4c44c998360 commit 38f1f7854b158ce2f998dd8f127da4c44c998360 Author: Alyssa Milburn <fu...@fu...> Date: Tue Oct 26 16:24:36 2010 +0200 some post-merge pst GUI fixes diff --git a/gemrb/GUIScripts/CommonWindow.py b/gemrb/GUIScripts/CommonWindow.py index 4c432e0..385c7a1 100644 --- a/gemrb/GUIScripts/CommonWindow.py +++ b/gemrb/GUIScripts/CommonWindow.py @@ -59,6 +59,9 @@ else: leftdiv = 3 ground_size = 6 +if GUICommon.GameIsPST(): + import GUICommonWindows + def UpdateContainerWindow (): global Container @@ -66,7 +69,7 @@ def UpdateContainerWindow (): pc = GemRB.GameGetFirstSelectedPC () if GUICommon.GameIsPST(): - GUICommon.SetEncumbranceLabels (Window, 54, None, pc) + GUICommon.SetEncumbranceLabels (Window, 54, None, pc, True) else: GUICommon.SetEncumbranceLabels (Window, 0x10000043, 0x10000044, pc) @@ -243,7 +246,9 @@ def OpenContainerWindow (): # Done Button = Window.GetControl (51) - if not GUICommon.GameIsPST(): + if GUICommon.GameIsPST(): + Button.SetText (1403) + else: Button.SetText (11973) Button.SetFlags (IE_GUI_BUTTON_CANCEL, OP_OR) Button.SetEvent (IE_GUI_BUTTON_ON_PRESS, LeaveContainer) diff --git a/gemrb/GUIScripts/GUICommon.py b/gemrb/GUIScripts/GUICommon.py index 138b24e..d7f68e9 100644 --- a/gemrb/GUIScripts/GUICommon.py +++ b/gemrb/GUIScripts/GUICommon.py @@ -470,7 +470,7 @@ def LearnPriestSpells (pc, level, mask): return # PST uses a button, IWD2 two types, the rest are the same with two labels -def SetEncumbranceLabels (Window, ControlID, Control2ID, pc): +def SetEncumbranceLabels (Window, ControlID, Control2ID, pc, invert_colors = False): """Displays the encumbrance as a ratio of current to maximum.""" # Getting the character's strength @@ -497,11 +497,11 @@ def SetEncumbranceLabels (Window, ControlID, Control2ID, pc): ratio = (0.0 + encumbrance) / max_encumb if ratio > 1.0: - Control.SetTextColor (255, 0, 0) + Control.SetTextColor (255, 0, 0, invert_colors) elif ratio > 0.8: - Control.SetTextColor (255, 255, 0) + Control.SetTextColor (255, 255, 0, invert_colors) else: - Control.SetTextColor (255, 255, 255) + Control.SetTextColor (255, 255, 255, invert_colors) if Control2ID: Control2.SetTextColor (255, 0, 0) diff --git a/gemrb/GUIScripts/pst/GUIINV.py b/gemrb/GUIScripts/pst/GUIINV.py index 0a1b52d..c724584 100644 --- a/gemrb/GUIScripts/pst/GUIINV.py +++ b/gemrb/GUIScripts/pst/GUIINV.py @@ -186,7 +186,7 @@ def RefreshInventoryWindow (): Button = Window.GetControl (44) Button.SetPicture (GUICommonWindows.GetActorPortrait (pc, 'INVENTORY')) - GUICommon.SetEncumbranceLabels (Window, 46, None, pc) + GUICommon.SetEncumbranceLabels (Window, 46, None, pc, True) # armor class ac = GemRB.GetPlayerStat (pc, IE_ARMORCLASS) diff --git a/gemrb/GUIScripts/pst/GUIPR.py b/gemrb/GUIScripts/pst/GUIPR.py index df32b55..81c42d3 100644 --- a/gemrb/GUIScripts/pst/GUIPR.py +++ b/gemrb/GUIScripts/pst/GUIPR.py @@ -28,6 +28,7 @@ import CommonTables import GUICommonWindows from GUIDefines import * from ie_stats import * +from ie_action import ACT_CAST PriestWindow = None PriestSpellInfoWindow = None ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |