+Delta68 Posted January 7 Share Posted January 7 My latest Wherigo creation has an item in the inventory which has a 'power level'. When the item is open, the power goes down. When it is not open the power builds back up again. I do this by having a 'close' button on the item which sets a 'recharging=true' flag and then shows to the main screen. An interval timer then checks the state of the of the recharging flag and incrments a counter This does, of course, work fine because I wrote it and I tested it. However, if someone were to click the back button or home button (depending on the device), the recharging=true flag won't get set. So, my question is: Is there a way of detecting when the main screen is being displayed or when an item is no longer being displayed? I thought maybe the item.opened flag might indicate if an item is open but doesn't look like it I'm using Urwigo builder and it's possible there is an un-implemented attribute I need to access in code Thanks Quote Link to comment
+Forest-Ghost Posted January 11 Share Posted January 11 (edited) Have you set recharging=true for the else part of the if/else statement? The else in a if/else statement will control the back/home button in this scenario. Edited January 11 by Forest-Ghost Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.