Polyphase Game Engine
Loading...
Searching...
No Matches
ComboBox_Lua.h
Go to the documentation of this file.
1#pragma once
2
3#include "EngineTypes.h"
4#include "Log.h"
5
7
9
10#if LUA_ENABLED
11
12#define COMBOBOX_LUA_NAME "ComboBox"
13#define COMBOBOX_LUA_FLAG "cfComboBox"
14#define CHECK_COMBOBOX(L, arg) (ComboBox*)CheckNodeLuaType(L, arg, COMBOBOX_LUA_NAME, COMBOBOX_LUA_FLAG);
15
16struct ComboBox_Lua
17{
18 // Options
19 static int AddOption(lua_State* L);
20 static int RemoveOption(lua_State* L);
21 static int ClearOptions(lua_State* L);
22 static int SetOptions(lua_State* L);
23 static int GetOptions(lua_State* L);
24 static int GetOptionCount(lua_State* L);
25
26 // Selection
27 static int SetSelectedIndex(lua_State* L);
28 static int GetSelectedIndex(lua_State* L);
29 static int GetSelectedOption(lua_State* L);
30
31 // State
32 static int IsOpen(lua_State* L);
33 static int Open(lua_State* L);
34 static int Close(lua_State* L);
35 static int Toggle(lua_State* L);
36
37 // Visual
38 static int SetBackgroundColor(lua_State* L);
39 static int GetBackgroundColor(lua_State* L);
40 static int SetTextColor(lua_State* L);
41 static int GetTextColor(lua_State* L);
42 static int SetDropdownColor(lua_State* L);
43 static int GetDropdownColor(lua_State* L);
44 static int SetHoveredColor(lua_State* L);
45 static int GetHoveredColor(lua_State* L);
46 static int SetMaxVisibleItems(lua_State* L);
47 static int GetMaxVisibleItems(lua_State* L);
48
49 // Children
50 static int GetBackground(lua_State* L);
51 static int GetTextWidget(lua_State* L);
52
53 static void Bind();
54};
55
56#endif