1
Window / [SOLVED] - Input Text Box whilst using State Machine
« on: December 23, 2020, 05:36:49 pm »
Good Evening all,
I've decided to use a statemachine for my game i.e main menu > character selection and so on and so forth.
I'm not at a stage of creating input/textbox's for users to type their name / login to the game but for the life of me i cant get it working.
ordinarily i know the code for TextEntered should go within the Event Loop in main.cpp
However due to the state Machine being used i only need it to appear on say MainMenuState.cpp but i cant figure why it wont work and i assume i need to some how poll events on each state but i've tried to no avail.
I can provide details / code examples when i get home but just wondered if anyone had any ideas off the top of their head?
Using this tutorial for the box's :
Solution: Turns out i had a game.cpp using the polling event whilst the window was open so it was essentially overriding it in any other .cpp
remove and now i can poll in any of my states
I've decided to use a statemachine for my game i.e main menu > character selection and so on and so forth.
I'm not at a stage of creating input/textbox's for users to type their name / login to the game but for the life of me i cant get it working.
ordinarily i know the code for TextEntered should go within the Event Loop in main.cpp
However due to the state Machine being used i only need it to appear on say MainMenuState.cpp but i cant figure why it wont work and i assume i need to some how poll events on each state but i've tried to no avail.
I can provide details / code examples when i get home but just wondered if anyone had any ideas off the top of their head?
Using this tutorial for the box's :
Solution: Turns out i had a game.cpp using the polling event whilst the window was open so it was essentially overriding it in any other .cpp
remove and now i can poll in any of my states