mirror of
https://github.com/Sani7/remote-ui.git
synced 2026-10-27 06:01:14 +01:00
UI message parser
move message parser threads to UI set functions
This commit is contained in:
@@ -7,9 +7,11 @@
|
||||
class UI_textbox : public UI_item
|
||||
{
|
||||
public:
|
||||
UI_textbox(std::string id, std::string hint, Color fg_color, Color bg_color);
|
||||
UI_textbox(std::string id, std::string hint, Color fg_color, Color bg_color, std::function<void(std::string, std::string)> on_change);
|
||||
UI_textbox(const json& j);
|
||||
|
||||
void set_text(std::string text) override;
|
||||
|
||||
void set_hint(std::string hint);
|
||||
std::string hint() const;
|
||||
|
||||
@@ -17,4 +19,5 @@ public:
|
||||
json to_json() const override;
|
||||
private:
|
||||
std::string m_hint;
|
||||
std::function<void(std::string, std::string)> m_on_change;
|
||||
};
|
||||
Reference in New Issue
Block a user