-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDropdownBox.h
More file actions
38 lines (27 loc) · 952 Bytes
/
Copy pathDropdownBox.h
File metadata and controls
38 lines (27 loc) · 952 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef RAYGUI_CPP_DROPDOWN_BOX_H
#define RAYGUI_CPP_DROPDOWN_BOX_H
#include "Component.h"
#include "Directives.h"
#include <raygui.h>
RAYGUI_CPP_BEGIN_NAMESPACE
class DropdownBox : public Component<bool> {
public:
DropdownBox();
DropdownBox(const char *text, int *active, bool editMode);
DropdownBox(Bounds bounds, const char *text, int *active, bool editMode);
RAYGUI_CPP_NODISCARD const char *GetText() const;
void SetText(const char *newText);
RAYGUI_CPP_NODISCARD int *GetActive() const;
void SetActive(int *newActive);
RAYGUI_CPP_NODISCARD bool GetEditMode() const;
void SetEditMode(bool newEditMode);
RAYGUI_CPP_NODISCARD bool Show(bool canClick) override;
void OnClick(const Callback &onClick) override;
void OnUpdate(const Callback &onUpdate) override;
private:
const char *text;
int *active;
bool editMode;
};
RAYGUI_CPP_END_NAMESPACE
#endif // RAYGUI_CPP_DROPDOWN_BOX_H