diff --git a/Scripts/Python/clftYeeshaPage08.py b/Scripts/Python/clftYeeshaPage08.py index a31002332c..51c0c7825b 100644 --- a/Scripts/Python/clftYeeshaPage08.py +++ b/Scripts/Python/clftYeeshaPage08.py @@ -62,6 +62,7 @@ RespOpen = ptAttribResponder(3, "Open Responder") RespLoop = ptAttribResponder(4, "Loop Responder") RespClose = ptAttribResponder(5, "Close Responder") +RespGlow = ptAttribResponder(6, "Glow Responder",['GlowSound','PageTurn']) #Linking Books GUI tags DialogName="YeeshaPageGUI" @@ -149,32 +150,26 @@ def OnGUINotify(self,id,control,event): if isinstance(control,ptGUIControlButton): btnID = control.getTagID() - if event == kShowHide: - if control.isEnabled(): - #control.show() - if self.GotPage(): - mydialog = PtGetDialogFromString(DialogName) - ptGUIControlButton(mydialog.getControlFromTag(kYeeshaPage08)).disable() - - elif event == kAction and btnID == kYeeshaPage08: + if event == kAction and btnID == kYeeshaPage08: PtDebugPrint("DEBUG: clftYeeshaPage08.OnGUINotify():\tPicked up page") RespClose.run(self.key) isOpen = 0 PtHideDialog(DialogName) self.SetStdGUIVisibility(1) + RespGlow.run(self.key, state='GlowSound') if self.GotPage(): PtDebugPrint ("DEBUG: clftYeeshaPage08.py: You've already found Yeesha Page #8. Move along. Move along.") return else: PtDebugPrint ("DEBUG: clftYeeshaPage08.py: Yeesha Page #8 is new to you.") - PtDebugPrint ("DEBUG: clftYeeshaPage08.py: Trying to update the value of the SDL variable %s to 1" % ("YeeshaPage8")) + PtDebugPrint ("DEBUG: clftYeeshaPage08.py: Trying to update the value of the SDL variable %s to 4" % ("YeeshaPage8")) vault = ptVault() psnlSDL = vault.getPsnlAgeSDL() if psnlSDL: YeeshaPageVar = psnlSDL.findVar("YeeshaPage8") - YeeshaPageVar.setInt(1) + YeeshaPageVar.setInt(4) vault.updatePsnlAgeSDL (psnlSDL) mydialog = PtGetDialogFromString(DialogName) ptGUIControlButton(mydialog.getControlFromTag(kYeeshaPage08)).disable() @@ -241,3 +236,4 @@ def SetStdGUIVisibility(self, visible): ptGUIControlButton(mydialog.getControlFromTag(kYeeshaPage08)).show() GUIDialogObject.value.draw.disable() + diff --git a/Scripts/Python/psnlYeeshaPageChanges.py b/Scripts/Python/psnlYeeshaPageChanges.py index 7cbfaddc09..7498f9cc5b 100644 --- a/Scripts/Python/psnlYeeshaPageChanges.py +++ b/Scripts/Python/psnlYeeshaPageChanges.py @@ -238,9 +238,9 @@ def EnableDisable(self, val): respAudioStop.run(self.key,avatar=None,fastforward=0) respDisable.run(self.key,avatar=None,fastforward=1) - if len(bushDistrib.value) > 0: + if bushDistrib.value: for x in bushDistrib.value: - x.setVisible(0) + x.setVisible(False) def TimeToGrow(self): diff --git a/Scripts/Python/xYeeshaPages.py b/Scripts/Python/xYeeshaPages.py index 9aa8ac0132..87b6bb9f98 100644 --- a/Scripts/Python/xYeeshaPages.py +++ b/Scripts/Python/xYeeshaPages.py @@ -153,7 +153,7 @@ def OnGUINotify(self,id,control,event): if event == kExitMode: PtHideDialog(DialogName) return - + btnID = 0 if isinstance(control,ptGUIControlButton): btnID = control.getTagID() @@ -162,13 +162,13 @@ def OnGUINotify(self,id,control,event): PtDebugPrint("xYeeshaPages.OnGUINotify():\tPicked up page number: ", PageNumber.value) # PtUnloadDialog(DialogName) PtHideDialog(DialogName) - + vault = ptVault() - + psnlSDL = vault.getPsnlAgeSDL() if psnlSDL: YeeshaPageVar = psnlSDL.findVar("YeeshaPage" + str(PageNumber.value)) - + PtDebugPrint ("xYeeshaPages.py: The previous value of the SDL variable %s is %s" % ("YeeshaPage" + str(PageNumber.value), YeeshaPageVar.getInt())) if StartInCleft(): @@ -179,10 +179,10 @@ def OnGUINotify(self,id,control,event): if YeeshaPageVar.getInt() != 0: PtDebugPrint ("xYeeshaPages.py: You've already found Yeesha Page #%s. Move along. Move along." % (PageNumber.value)) return - + else: PtDebugPrint ("xYeeshaPages.py: Yeesha Page #%s is new to you." % (PageNumber.value)) - + PtDebugPrint ("xYeeshaPages.py: Trying to update the value of the SDL variable %s to 1" % ("YeeshaPage" + str(PageNumber.value))) YeeshaPageVar.setInt(4) vault.updatePsnlAgeSDL (psnlSDL)