From: Laszlo T. <ave...@us...> - 2011-06-01 16:06:12
|
gemrb: Infinity Engine emulator The branch master has been updated via 997e14e20293527aa055d38f49953a68f5281c7c (commit) Summary of changes: gemrb/GUIScripts/iwd/GUIMG.py | 17 +++++++++++++---- gemrb/GUIScripts/iwd/GUIPR.py | 17 +++++++++++++---- 2 files changed, 26 insertions(+), 8 deletions(-) from 33c5de4e16c11f56ac70ebcc1b4ce0563d849209 (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=997e14e20293527aa055d38f49953a68f5281c7c commit 997e14e20293527aa055d38f49953a68f5281c7c Author: Avenger <ave...@so...> Date: Wed Jun 1 18:04:38 2011 +0200 implemented spellbook animation for iwd/how diff --git a/gemrb/GUIScripts/iwd/GUIMG.py b/gemrb/GUIScripts/iwd/GUIMG.py index c062efb..4abbba9 100644 --- a/gemrb/GUIScripts/iwd/GUIMG.py +++ b/gemrb/GUIScripts/iwd/GUIMG.py @@ -103,13 +103,13 @@ def OpenMageWindow (): 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 (GUICommon.GetIWDSpellButtonCount()): 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 (UpdateMageWindow) @@ -146,7 +146,7 @@ def UpdateMageWindow (): 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, OpenMageSpellUnmemorizeWindow) else: @@ -159,7 +159,7 @@ def UpdateMageWindow (): 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) @@ -227,6 +227,12 @@ def OnMageMemorizeSpell (): if GemRB.MemorizeSpell (pc, type, level, index): UpdateMageWindow () + GemRB.PlaySound ("GAM_24") + Button = MageWindow.GetControl(index + 27) + Button.SetAnimation ("FLASH",0,1) + mem_cnt = GemRB.GetMemorizedSpellsCount (pc, type, level) + Button = MageWindow.GetControl(mem_cnt + 2) + Button.SetAnimation ("FLASH",0,1) return def OpenMageSpellInfoWindow (): @@ -335,6 +341,9 @@ def OnMageUnmemorizeSpell (): if GemRB.UnmemorizeSpell (pc, type, level, index): UpdateMageWindow () + GemRB.PlaySound ("GAM_44") + Button = MageWindow.GetControl(index + 3) + Button.SetAnimation ("FLASH",0,1) return def OnMageRemoveSpell (): diff --git a/gemrb/GUIScripts/iwd/GUIPR.py b/gemrb/GUIScripts/iwd/GUIPR.py index ff4f5a7..3ff4a88 100644 --- a/gemrb/GUIScripts/iwd/GUIPR.py +++ b/gemrb/GUIScripts/iwd/GUIPR.py @@ -88,13 +88,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 (GUICommon.GetIWDSpellButtonCount()): 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) @@ -132,7 +132,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: @@ -145,7 +145,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) @@ -258,6 +258,12 @@ def OnPriestMemorizeSpell (): if GemRB.MemorizeSpell (pc, type, level, index): UpdatePriestWindow () + GemRB.PlaySound ("GAM_24") + Button = PriestWindow.GetControl(index + 27) + Button.SetAnimation ("FLASH",0,1) + mem_cnt = GemRB.GetMemorizedSpellsCount (pc, type, level) + Button = PriestWindow.GetControl(mem_cnt + 2) + Button.SetAnimation ("FLASH",0,1) return def OpenPriestSpellRemoveWindow (): @@ -328,6 +334,9 @@ def OnPriestUnmemorizeSpell (): if GemRB.UnmemorizeSpell (pc, type, level, index): UpdatePriestWindow () + GemRB.PlaySound ("GAM_44") + Button = PriestWindow.GetControl(index + 3) + Button.SetAnimation ("FLASH",0,1) return def OnPriestRemoveSpell (): ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |