From 3887bfff3db207e1b20fb791c1c3b09840d7a449 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Thu, 30 Jul 2020 16:39:16 +0200 Subject: [PATCH] Added a 'CLEAR' button to GuiTextEditPopup. --- es-core/src/guis/GuiTextEditPopup.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/es-core/src/guis/GuiTextEditPopup.cpp b/es-core/src/guis/GuiTextEditPopup.cpp index de139974e..0e90dd1f0 100644 --- a/es-core/src/guis/GuiTextEditPopup.cpp +++ b/es-core/src/guis/GuiTextEditPopup.cpp @@ -45,6 +45,8 @@ GuiTextEditPopup::GuiTextEditPopup( std::vector< std::shared_ptr > buttons; buttons.push_back(std::make_shared(mWindow, acceptBtnText, acceptBtnText, [this, okCallback] { okCallback(mText->getValue()); delete this; })); + buttons.push_back(std::make_shared(mWindow, "CLEAR", "clear", + [this] { mText->setValue(""); })); buttons.push_back(std::make_shared(mWindow, "CANCEL", "discard changes", [this] { delete this; }));