mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-17 11:35:08 -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_InputDown(void* screen, int key, struct InputDevice* device);
|
||||||
int Menu_PointerDown(void* screen, int id, int x, int y);
|
int Menu_PointerDown(void* screen, int id, int x, int y);
|
||||||
int Menu_PointerMove(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; };
|
struct SimpleButtonDesc { short x, y; const char* title; Widget_LeftClick onClick; };
|
||||||
void Menu_AddButtons(void* screen, struct ButtonWidget* btns, int width,
|
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);
|
void MenuScreen_Render2(void* screen, float delta);
|
||||||
typedef void (*MenuInputDone)(const cc_string* value, cc_bool valid);
|
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_Show(struct MenuInputDesc* desc, const cc_string* value, MenuInputDone onDone, cc_bool screenMode);
|
||||||
|
void MenuInputOverlay_Close(cc_bool valid);
|
||||||
#endif
|
#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 */
|
/* Shorthand for TextWidget_Set using String_FromReadonly */
|
||||||
CC_NOINLINE void TextWidget_SetConst(struct TextWidget* w, const char* text, struct FontDesc* font);
|
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. */
|
/* A labelled button that can be clicked on. */
|
||||||
struct ButtonWidget {
|
struct ButtonWidget {
|
||||||
Widget_Body
|
Widget_Body
|
||||||
@ -38,8 +35,6 @@ struct ButtonWidget {
|
|||||||
PackedCol color;
|
PackedCol color;
|
||||||
int minWidth, minHeight;
|
int minWidth, minHeight;
|
||||||
const char* optName;
|
const char* optName;
|
||||||
Button_Get GetValue;
|
|
||||||
Button_Set SetValue;
|
|
||||||
};
|
};
|
||||||
#define BUTTONWIDGET_MAX 12
|
#define BUTTONWIDGET_MAX 12
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user