From: Laszlo T. <ave...@us...> - 2011-05-31 17:20:32
|
gemrb: Infinity Engine emulator The branch master has been updated via 33c5de4e16c11f56ac70ebcc1b4ce0563d849209 (commit) Summary of changes: gemrb/GUIScripts/bg2/GUIMG.py | 3 +++ gemrb/GUIScripts/bg2/GUIPR.py | 19 +++++++++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) from a2ec7ab64d7789e321b2298d08406158ad88204b (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=33c5de4e16c11f56ac70ebcc1b4ce0563d849209 commit 33c5de4e16c11f56ac70ebcc1b4ce0563d849209 Author: Avenger <ave...@so...> Date: Tue May 31 19:19:38 2011 +0200 improved the spellbook animations in bg2 diff --git a/gemrb/GUIScripts/bg2/GUIMG.py b/gemrb/GUIScripts/bg2/GUIMG.py index 8cdc1c9..d2bf16e 100644 --- a/gemrb/GUIScripts/bg2/GUIMG.py +++ b/gemrb/GUIScripts/bg2/GUIMG.py @@ -311,6 +311,9 @@ def OnMageMemorizeSpell (): GemRB.PlaySound ("GAM_24") Button = MageWindow.GetControl(index + 27) Button.SetAnimation ("FLASH") + mem_cnt = GemRB.GetMemorizedSpellsCount (pc, type, level) + Button = MageWindow.GetControl(mem_cnt + 2) + Button.SetAnimation ("FLASH") return def CloseMageSpellUnmemorizeWindow (): diff --git a/gemrb/GUIScripts/bg2/GUIPR.py b/gemrb/GUIScripts/bg2/GUIPR.py index cbf2748..58392d1 100644 --- a/gemrb/GUIScripts/bg2/GUIPR.py +++ b/gemrb/GUIScripts/bg2/GUIPR.py @@ -98,13 +98,13 @@ def OpenPriestWindow (): Button = Window.GetControl (3 + i) Button.SetBorder (0,0,0,0,0,0,0,0,64,0,1) Button.SetSprites ("SPELFRAM",0,0,0,0,0) - Button.SetFlags (IE_GUI_BUTTON_PICTURE, OP_OR) + Button.SetFlags (IE_GUI_BUTTON_PICTURE | IE_GUI_BUTTON_PLAYONCE, OP_OR) Button.SetState (IE_GUI_BUTTON_LOCKED) # Setup book spells buttons for i in range (24): Button = Window.GetControl (27 + i) - Button.SetFlags (IE_GUI_BUTTON_NO_IMAGE, OP_OR) + Button.SetFlags (IE_GUI_BUTTON_NO_IMAGE | IE_GUI_BUTTON_PLAYONCE, OP_OR) Button.SetState (IE_GUI_BUTTON_LOCKED) GUICommonWindows.SetSelectionChangeHandler (UpdatePriestWindow) @@ -142,7 +142,7 @@ def UpdatePriestWindow (): ms = GemRB.GetMemorizedSpell (pc, type, level, i) Button.SetSpellIcon (ms['SpellResRef'], 0) Button.SetFlags (IE_GUI_BUTTON_NO_IMAGE, OP_NAND) - Button.SetFlags (IE_GUI_BUTTON_PICTURE, OP_OR) + Button.SetFlags (IE_GUI_BUTTON_PICTURE | IE_GUI_BUTTON_PLAYONCE, OP_OR) if ms['Flags']: Button.SetEvent (IE_GUI_BUTTON_ON_PRESS, OpenPriestSpellUnmemorizeWindow) else: @@ -155,7 +155,7 @@ def UpdatePriestWindow (): Button.EnableBorder (0, ms['Flags'] == 0) else: if i < max_mem_cnt: - Button.SetFlags (IE_GUI_BUTTON_NORMAL, OP_SET) + Button.SetFlags (IE_GUI_BUTTON_NORMAL | IE_GUI_BUTTON_PLAYONCE, OP_SET) else: Button.SetFlags (IE_GUI_BUTTON_NO_IMAGE, OP_SET) Button.SetEvent (IE_GUI_BUTTON_ON_PRESS, None) @@ -163,7 +163,6 @@ def UpdatePriestWindow (): Button.SetTooltip ('') Button.EnableBorder (0, 0) - known_cnt = GemRB.GetKnownSpellsCount (pc, type, level) for i in range (24): Button = Window.GetControl (27 + i) @@ -176,7 +175,6 @@ def UpdatePriestWindow (): Button.SetTooltip (spell['SpellName']) PriestKnownSpellList.append (ks['SpellResRef']) Button.SetVarAssoc ("SpellButton", 100 + i) - else: Button.SetFlags (IE_GUI_BUTTON_NO_IMAGE, OP_OR) Button.SetFlags (IE_GUI_BUTTON_PICTURE, OP_NAND) @@ -265,6 +263,12 @@ def OnPriestMemorizeSpell (): if GemRB.MemorizeSpell (pc, type, level, index): UpdatePriestWindow () + GemRB.PlaySound ("GAM_24") + Button = PriestWindow.GetControl(index + 27) + Button.SetAnimation ("FLASH") + mem_cnt = GemRB.GetMemorizedSpellsCount (pc, type, level) + Button = PriestWindow.GetControl(mem_cnt + 2) + Button.SetAnimation ("FLASH") return def OpenPriestSpellRemoveWindow (): @@ -335,6 +339,9 @@ def OnPriestUnmemorizeSpell (): if GemRB.UnmemorizeSpell (pc, type, level, index): UpdatePriestWindow () + GemRB.PlaySound ("GAM_44") + Button = PriestWindow.GetControl(index + 3) + Button.SetAnimation ("FLASH") return def OnPriestRemoveSpell (): ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |