Add textbox
This commit is contained in:
2024-08-24 00:06:56 +02:00
parent 43793e1065
commit a340889f62
3 changed files with 56 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
#pragma once
#include <string>
#include "UI_item.hpp"
#define UI_TEXTBOX_TYPE std::string("UItextbox")
class UI_textbox : public UI_item
{
public:
UI_textbox(std::string id, std::string hint, Color fg_color, Color bg_color);
UI_textbox(const json& j);
void set_hint(std::string hint);
std::string hint() const;
void from_json(const json& j) override;
json to_json() const override;
private:
std::string m_hint;
};