mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-15 18:45:23 -04:00
Merge pull request #1233 from ClassiCube/MenuOptions2
Simplify menu options UI code
This commit is contained in:
commit
2b0941bccd
1203
src/MenuOptions.c
Normal file
1203
src/MenuOptions.c
Normal file
File diff suppressed because it is too large
Load Diff
1256
src/Menus.c
1256
src/Menus.c
File diff suppressed because it is too large
Load Diff
@ -14,6 +14,7 @@ struct InputDevice;
|
||||
int Menu_InputDown(void* screen, int key, struct InputDevice* device);
|
||||
int Menu_PointerDown(void* screen, int id, int x, int y);
|
||||
int Menu_PointerMove(void* screen, int id, int x, int y);
|
||||
int Menu_DoPointerMove(void* screen, int id, int x, int y);
|
||||
|
||||
struct SimpleButtonDesc { short x, y; const char* title; Widget_LeftClick onClick; };
|
||||
void Menu_AddButtons(void* screen, struct ButtonWidget* btns, int width,
|
||||
@ -67,4 +68,5 @@ void TouchOnscreenScreen_Show(void);
|
||||
void MenuScreen_Render2(void* screen, float delta);
|
||||
typedef void (*MenuInputDone)(const cc_string* value, cc_bool valid);
|
||||
void MenuInputOverlay_Show(struct MenuInputDesc* desc, const cc_string* value, MenuInputDone onDone, cc_bool screenMode);
|
||||
void MenuInputOverlay_Close(cc_bool valid);
|
||||
#endif
|
||||
|
@ -28,9 +28,6 @@ CC_NOINLINE void TextWidget_Set(struct TextWidget* w, const cc_string* text, str
|
||||
/* Shorthand for TextWidget_Set using String_FromReadonly */
|
||||
CC_NOINLINE void TextWidget_SetConst(struct TextWidget* w, const char* text, struct FontDesc* font);
|
||||
|
||||
|
||||
typedef void (*Button_Get)(cc_string* raw);
|
||||
typedef void (*Button_Set)(const cc_string* raw);
|
||||
/* A labelled button that can be clicked on. */
|
||||
struct ButtonWidget {
|
||||
Widget_Body
|
||||
@ -38,8 +35,6 @@ struct ButtonWidget {
|
||||
PackedCol color;
|
||||
int minWidth, minHeight;
|
||||
const char* optName;
|
||||
Button_Get GetValue;
|
||||
Button_Set SetValue;
|
||||
};
|
||||
#define BUTTONWIDGET_MAX 12
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user