ptr->setSize("min(parent.width, parent.height)*0.16", "min(parent.width, parent.height)*0.16");
auto min = tgui::bindMin(tgui::bindParentWidth(ptr), tgui::bindParentHeight(ptr));
ptr->setSize(min*0.16, min*0.16);
//...somewhere else in the code...
gui.add(ptr)
libtgui-d.so.1.0.0!tgui::Container::processKeyPressEvent(tgui::Container * const this, tgui::Event::KeyEvent event) (/home/user/Desktop/dev/fc/external_deps/TGUI/src/Container.cpp:1252)
libtgui-d.so.1.0.0!tgui::BackendGui::handleEvent(tgui::BackendGui * const this, tgui::Event event) (/home/user/Desktop/dev/fc/external_deps/TGUI/src/Backend/Window/BackendGui.cpp:181)
libtgui-d.so.1.0.0!tgui::BackendGuiSFML::handleEvent(tgui::BackendGuiSFML * const this, sf::Event sfmlEvent) (/home/user/Desktop/dev/fc/external_deps/TGUI/src/Backend/Window/SFML/BackendGuiSFML.cpp:219)
GuiManager::event(GuiManager * const this, const sf::Event & event) (/home/user/Desktop/dev/fc/fc_game/src/Graphics/GuiManager.cpp:88)
SceneLogin::loop(SceneLogin * const this) (/home/user/Desktop/dev/fc/fc_game/src/Scenes/SceneLogin.cpp:169)
Application::run(Application * const this) (/home/user/Desktop/dev/fc/fc_game/src/Core/Application.cpp:259)
main() (/home/user/Desktop/dev/fc/fc_game/src/Core/Application.cpp:56)
const bool bHandled = m_focusedWidget->canHandleKeyPress(event); // TGUI_NEXT: Have keyPressed return a bool
m_focusedWidget
seems to be nullptr (I dont understand that because there is a checking if just before) m_editBoxEmailSignIn->onReturnKeyPress(&SceneLogin::trySignIn, this);
m_editBoxEmailSignIn->setFocused(true);
void SceneLogin::trySignIn(){
//TODO: remove backdoor
if(m_editBoxEmailSignIn->getText() == "dev"){
this->m_continueLoop = false;
this->m_appli.launchAllLoading();
this->m_appli.launchSceneBase({0, 0});
return;
}
//bla bla bla
if(m_editBoxEmailSignIn->getText() == "dev"){
is true, if user doesnt input "dev", then the program doesnt crash.