Open Rixium opened 4 years ago
Hi @Rixium , thank you for this PR!
Just wondering, what did you mean by this:
"It might have some unwanted side effects"
Also can you please provide a minimal usage example so it will be easier for me to test / understand how to use it?
Thanks!
Hi @Rixium , thank you for this PR!
Just wondering, what did you mean by this:
"It might have some unwanted side effects"
Also can you please provide a minimal usage example so it will be easier for me to test / understand how to use it?
Thanks!
Basically, I don't know the full extent of your library, so I'm not sure if changing things such as ActiveEntity will have an unwanted effect elsewhere.
I created it so I could tab through input fields and buttons on a form. Below I create a tab list and pass in the desired entities that can be tabbed through. The color defines the color of the entity when it's the active tabbed entity.
TabList tabList = new TabList(new Entity[] { inputField, inputField2, loginButton }, Color.Yellow * 0.9f);
You then add the tab list to the user interfaces systems, which are updated every update.
UserInterface.Active.AddSystem(tabList);
Adds the concept of systems to the user interface.
Adds the tab system.
Added a new text validator that the tab system utilizes to ignore certain key presses.
Tab System
Add a list of entities to the tab system, and you can then press tab to cycle through them.
Reason
I was making a personal project and added something that didn't exist, according to the documentation. I'm not entirely sure of the implementation, but it works from what I can tell. It might have some unwanted side effects, but I thought I'd add a pull request, just in case you like the look of it so far.