handle mouse events
Signed-off-by: Peter Siegmund <developer@mars3142.org>
This commit is contained in:
@@ -4,14 +4,11 @@
|
||||
#include <functional>
|
||||
#include <string>
|
||||
|
||||
class MenuItem {
|
||||
public:
|
||||
class MenuItem
|
||||
{
|
||||
public:
|
||||
MenuItem(uint8_t type, std::string text, std::function<void(uint8_t)> callback);
|
||||
MenuItem(
|
||||
uint8_t type,
|
||||
std::string text,
|
||||
std::string value,
|
||||
std::function<void(uint8_t)> callback);
|
||||
MenuItem(uint8_t type, std::string text, std::string value, std::function<void(uint8_t)> callback);
|
||||
[[nodiscard]] uint8_t getType() const;
|
||||
[[nodiscard]] const std::string &getText() const;
|
||||
[[nodiscard]] const std::string &getValue() const;
|
||||
@@ -19,7 +16,7 @@ public:
|
||||
void callback(uint8_t id) const;
|
||||
[[nodiscard]] bool hasCallback() const;
|
||||
|
||||
private:
|
||||
private:
|
||||
uint8_t m_type;
|
||||
std::string m_text;
|
||||
std::string m_value;
|
||||
|
Reference in New Issue
Block a user