From: Laszlo T. <ave...@us...> - 2011-05-29 18:38:49
|
gemrb: Infinity Engine emulator The branch master has been updated via 7ab6a9e947731db2465c157f4abab382fa5306f4 (commit) Summary of changes: gemrb/GUIScripts/bg2/GUIMG.py | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-) from 7f12369546562aa3bcad06ed2e0b056a07c03df6 (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=7ab6a9e947731db2465c157f4abab382fa5306f4 commit 7ab6a9e947731db2465c157f4abab382fa5306f4 Author: Avenger <ave...@so...> Date: Sun May 29 20:37:53 2011 +0200 play the flash animation/sound in the spell book window diff --git a/gemrb/GUIScripts/bg2/GUIMG.py b/gemrb/GUIScripts/bg2/GUIMG.py index 4299be0..8cdc1c9 100644 --- a/gemrb/GUIScripts/bg2/GUIMG.py +++ b/gemrb/GUIScripts/bg2/GUIMG.py @@ -132,13 +132,13 @@ def SetupMageWindow (): 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) UpdateMageWindow () @@ -177,7 +177,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: @@ -190,7 +190,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) @@ -308,6 +308,9 @@ def OnMageMemorizeSpell (): if GemRB.MemorizeSpell (pc, type, level, index): UpdateMageWindow () + GemRB.PlaySound ("GAM_24") + Button = MageWindow.GetControl(index + 27) + Button.SetAnimation ("FLASH") return def CloseMageSpellUnmemorizeWindow (): @@ -378,6 +381,9 @@ def OnMageUnmemorizeSpell (): if GemRB.UnmemorizeSpell (pc, type, level, index): UpdateMageWindow () + GemRB.PlaySound ("GAM_44") + Button = MageWindow.GetControl(index + 3) + Button.SetAnimation ("FLASH") return def OnMageRemoveSpell (): ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |