-
Notifications
You must be signed in to change notification settings - Fork 3
/
menu.cpp
67 lines (51 loc) · 2.03 KB
/
menu.cpp
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#include "include/menu.h"
extern "C" {
void* menu_create(String title, float posX, float posY, uint8_t columns, float col1Width, float col2Width) {
return call<void*>("menu_create", title, posX, posY, columns, col1Width, col2Width);
}
void menu_release(void* menu) {
return call<void>("menu_release", menu);
}
void menu_setColumnHeader(void* menu, String header, uint8_t column) {
return call<void>("menu_setColumnHeader", menu, header, column);
}
void menu_addCell(void* menu, String itemText, uint8_t column) {
return call<void>("menu_addCell", menu, itemText, column);
}
void menu_disableRow(void* menu, uint8_t row) {
return call<void>("menu_disableRow", menu, row);
}
unsigned char menu_isRowEnabled(void* menu, uint8_t row) {
return call<unsigned char>("menu_isRowEnabled", menu, row);
}
void menu_disable(void* menu) {
return call<void>("menu_disable", menu);
}
unsigned char menu_isEnabled(void* menu) {
return call<unsigned char>("menu_isEnabled", menu);
}
Vector2 menu_getPosition(void* menu) {
return call<Vector2>("menu_getPosition", menu);
}
int menu_getRowCount(void* menu, uint8_t column) {
return call<int>("menu_getRowCount", menu, column);
}
int menu_getColumnCount(void* menu) {
return call<int>("menu_getColumnCount", menu);
}
Vector2 menu_getColumnWidths(void* menu) {
return call<Vector2>("menu_getColumnWidths", menu);
}
String menu_getColumnHeader(void* menu, uint8_t column) {
return call<String>("menu_getColumnHeader", menu, column);
}
String menu_getCell(void* menu, uint8_t column, uint8_t row) {
return call<String>("menu_getCell", menu, column, row);
}
void menu_showForPlayer(void* menu, void* player) {
return call<void>("menu_showForPlayer", menu, player);
}
void menu_hideForPlayer(void* menu, void* player) {
return call<void>("menu_hideForPlayer", menu, player);
}
}