Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Studio Chat / Handling Different Screens / Levels

Author
Message
Orion5
3
Years of Service
User Offline
Joined: 6th Jun 2020
Location: SPAIN
Posted: 29th Mar 2023 14:09
Hi All,

I am writing a program (not game) that uses different screens for different facilities (Stock Control, Electronic Till, Bar Tabs, etc). I am looking for advice on the best way to manage these different Screens / Levels. There will be a Main Screen where the user selects which screen they want to use via buttons. Effectively the App is several programs for the various facilities. I don't really want to keep moving / hiding elements from one screen when another screen loads. I had thought of using the DEPTH option for each element on a specific screen to hide them behind a Main Panel Image and then bring forward the elements for the new screen, but this seems clumsy?

Any suggestions amigos?

blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 29th Mar 2023 19:46
Disclamer : I have never tried this, i have always moved/removed images

What you could do is create all your screens side by side and then use SetViewOffset() to display/manage each screen when required
Steve Ancell
18
Years of Service
User Offline
Joined: 16th Feb 2006
Location: Brighton, East Sussex, UK
Posted: 29th Mar 2023 23:14 Edited at: 29th Mar 2023 23:18
There's probably many ways of jumping to screens based on a level number, here's how I've been doing it, columnRange is how many levels wide the world scene is. Multiply column and row by your grid cell size and subtract that from the sprite positions or apply is to SetViewOffset to land on and given level.



[EDIT] I will give you the heads up though, your world can only span so far due to there being a scroll limitation in the scene designer. [EDIT]
Orion5
3
Years of Service
User Offline
Joined: 6th Jun 2020
Location: SPAIN
Posted: 30th Mar 2023 13:00
Ok, thanks for the replies, I will defo look at the SetViewOffset command as this seems a simpler solution.

Cheers P

Login to post a reply

Server time is: 2024-04-20 09:05:10
Your offset time is: 2024-04-20 09:05:10