From 7be1c3f2237c5bb51a29aaba7b8df6fd4b8718c8 Mon Sep 17 00:00:00 2001 From: MihailRis Date: Thu, 16 May 2024 13:02:20 +0300 Subject: [PATCH] textbox onup, ondown callbacks --- src/graphics/ui/elements/TextBox.cpp | 58 +++++++++++++++++++++------- src/graphics/ui/elements/TextBox.hpp | 12 ++++-- src/graphics/ui/elements/UINode.cpp | 12 ++---- src/graphics/ui/elements/UINode.hpp | 23 ++++++++++- src/graphics/ui/gui_xml.cpp | 51 ++++++++++++++---------- 5 files changed, 107 insertions(+), 49 deletions(-) diff --git a/src/graphics/ui/elements/TextBox.cpp b/src/graphics/ui/elements/TextBox.cpp index cf32a1b8..fc42c369 100644 --- a/src/graphics/ui/elements/TextBox.cpp +++ b/src/graphics/ui/elements/TextBox.cpp @@ -12,9 +12,12 @@ using namespace gui; TextBox::TextBox(std::wstring placeholder, glm::vec4 padding) - : Panel(glm::vec2(200,32), padding, 0), - input(L""), - placeholder(placeholder) { + : Panel(glm::vec2(200,32), padding, 0), + input(L""), + placeholder(placeholder) +{ + setOnUpPressed(nullptr); + setOnDownPressed(nullptr); label = std::make_shared