Switch between Stages or Screens

Anything about development not directly related to libgdx, e.g. OpenGL, Android APIs etc.

Switch between Stages or Screens

Postby DRing » Tue Feb 13, 2018 3:09 pm

For my menu system there is a decent amount of screens to switch between, settings, character select, store, etc., what Im doing right now is a Screen for each view, but was wondering if it would be better to just create stages for each view and stay on one screen? Or does it not really matter
DRing
 
Posts: 100
Joined: Thu Oct 20, 2011 7:42 pm

Re: Switch between Stages or Screens

Postby evilentity » Tue Feb 13, 2018 4:53 pm

It usually makes sense to have one stage per screen, so neither solution is great.

As usual, it depends. If you dont show something very often, like settings, screen probably makes sense. If its something that happens often, store maybe, add it as dialog or something to current stage.
Looking for a freelancer? PM me!
evilentity
 
Posts: 4117
Joined: Wed Aug 24, 2011 11:37 am

Re: Switch between Stages or Screens

Postby DRing » Wed Feb 14, 2018 3:35 pm

Ok, so Ive modified my approach and now using different tables and showing or hiding them depending on what I want. Seems to be working nicely, now I just need to work in transitions to make it smoother.
DRing
 
Posts: 100
Joined: Thu Oct 20, 2011 7:42 pm

Re: Switch between Stages or Screens

Postby evilentity » Wed Feb 14, 2018 7:26 pm

Actions are perfect for that.
Looking for a freelancer? PM me!
evilentity
 
Posts: 4117
Joined: Wed Aug 24, 2011 11:37 am

Re: Switch between Stages or Screens

Postby DRing » Wed Feb 14, 2018 10:30 pm

Yeah that was my plan, right now I have everything in a table, will that mess up if I try to move one item? I can also redo it to group the things together in different tables and not have it all in one base table if that will cause an issue
DRing
 
Posts: 100
Joined: Thu Oct 20, 2011 7:42 pm

Re: Switch between Stages or Screens

Postby MrStahlfelge » Thu Feb 15, 2018 6:47 pm

My approach is using Groups (Tables are Groups). Actions are good for the transitions.

A very handy class is the Dialog class.
MrStahlfelge
 
Posts: 68
Joined: Thu Jun 15, 2017 6:40 am


Return to General Development

Who is online

Users browsing this forum: Bing [Bot] and 4 guests