mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 04:21:50 +00:00
add 'onselect' callback & remove 'default' tag
This commit is contained in:
parent
47f7259c72
commit
f17167f8c9
6 changed files with 60 additions and 19 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue