The debugger should show you that it crashes because gui_ProgressBarHP is a nullptr.
The gui doesn't know about the existence of the progress bar. It only has the panel as child widget while the panel in turn has the progress bar as child. So you would have to get the progress bar from the panel:
Alternatively you can pass "true" as second parameter to the get function. This will search for the widget recursively.
The gui doesn't know about the existence of the progress bar. It only has the panel as child widget while the panel in turn has the progress bar as child. So you would have to get the progress bar from the panel:
Code (cpp) Select
gui_panelInfo->get<tgui::ProgressBar>("info_health");Alternatively you can pass "true" as second parameter to the get function. This will search for the widget recursively.
Code (cpp) Select
gui.get<tgui::ProgressBar>("info_health", true);