SUNENGINE 0.0.2
A simple and bright C++ game engine.
 
Loading...
Searching...
No Matches
UIDropdownCommand.h
1#ifndef UIDropdownCommand_H
2#define UIDropdownCommand_H
3
4#include "UICommand.h"
5
6class Dropdown;
7
23{
24public:
31 UIDropdownCommand(Dropdown* d, int idx, UICommand* userCmd = nullptr);
32
36 void Execute() override;
37
38private:
40 int index;
42};
43
44#endif
Definition Dropdown.h:14
Abstract base class for UI-related command objects.
Definition UICommand.h:32
UICommand * userCommand
Optional user command to execute when the option is selected.
Definition UIDropdownCommand.h:41
UIDropdownCommand(Dropdown *d, int idx, UICommand *userCmd=nullptr)
Constructor for UIDropdownCommand.
Definition UIDropdownCommand.cpp:4
void Execute() override
Executes the command.
Definition UIDropdownCommand.cpp:8
int index
Index of the option in the dropdown.
Definition UIDropdownCommand.h:40
Dropdown * dropdown
Pointer to the associated Dropdown object.
Definition UIDropdownCommand.h:39