Generic containers?

So, I noticed that in both examples with Lemur, the menus were contained within application states.

But, I want to be doing something quite different. Essentially, I’m going to have a list of menus, each of them with their own container. Each entry in the list comes from a different class; eg, the main menu is a class (MainMenu.java), and it has its own layout.

However, some of the functions that are needed for what I want to do also require a menu to be able to set its own visibility as well as the visibility of others - eg, menu switching.

The way I thought of doing this was to create a base class for a GUI screen, a GameGui, that contains a container, a visibility boolean, a reference to the parent GameInterface (more on that in a sec) and a name string.

The other piece to the puzzle is the GameInterface - it’s basically a container for a hashmap of <String, GameGui>, along with a node to attach the GameGui containers to (Either the game’s root GuiNode, or another Node within the GameInterface itself)

Will this approach work? I don’t get any errors when I run, but the interface also does not appear on-screen, even when I make a simple IconComponent.

Nevermind, I actually figured out why it was doing what it was doing. Ignore this!

@Eliwood said: Nevermind, I actually figured out why it was doing what it was doing. Ignore this!

Glad you got it working. Is it likely to be something that would help someone else or was it really specific to your situation?

Well, I suppose it might be useful to Lemur, except for the fact that currently I’m very confused about how the layout works.

And really, it was probably rather specific to me, since it’s a system that I came up with.

@Eliwood said: Well, I suppose it might be useful to Lemur, except for the fact that currently I'm very confused about how the layout works.

And really, it was probably rather specific to me, since it’s a system that I came up with.

Cool.

If you have questions about layouts then feel free to ask. They are sorely in need of some better documentation. I think I did post a bit as response to another question but that’s not entirely helpful here. :slight_smile: