add 'onselect' callback & remove 'default' tag

This commit is contained in:
MihailRis
2025-06-28 02:46:54 +03:00
parent 47f7259c72
commit f17167f8c9
6 changed files with 60 additions and 19 deletions
+3
View File
@@ -14,6 +14,7 @@ namespace gui {
private:
std::vector<Option> options;
Option selected {};
StringCallbacksSet changeCallbacks;
public:
SelectBox(
GUI& gui,
@@ -23,6 +24,8 @@ namespace gui {
const glm::vec4& padding
);
void listenChange(onstringchange&& callback);
void setSelected(const Option& selected);
const Option& getSelected() const;