Removefromparent() does not work
Hello, I'm trying to display and toggle a widget (like a menu screen when hit esc) using c++. I was able to display the widget but wasn't able to toggle it on and off. The code is below GameState.cpp
NOTE: Visible is defined as bool in header file and initialized to false
and inventory() is called by using:
Any help is appreciated, thanks in advance!
asked May 05 '17 at 05:59 PM in C++ Programming
You have no reference to the widget you have created.
Currently your code will always create a new InventoryWidget and add it to the screen, it will never get removed.
This line will always create a widget, your previously created widget no longer has a reference and is now just in memory.
answered May 12 '17 at 05:20 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here