summary refs log tree commit diff
path: root/src/Menus.h
diff options
context:
space:
mode:
authorWlodekM <[email protected]>2024-06-16 10:35:45 +0300
committerWlodekM <[email protected]>2024-06-16 10:35:45 +0300
commitabef6da56913f1c55528103e60a50451a39628b1 (patch)
treeb3c8092471ecbb73e568cd0d336efa0e7871ee8d /src/Menus.h
initial commit
Diffstat (limited to 'src/Menus.h')
-rw-r--r--src/Menus.h69
1 files changed, 69 insertions, 0 deletions
diff --git a/src/Menus.h b/src/Menus.h
new file mode 100644
index 0000000..9e2cd65
--- /dev/null
+++ b/src/Menus.h
@@ -0,0 +1,69 @@
+#ifndef CC_MENUS_H
+#define CC_MENUS_H
+#include "Gui.h"
+
+/* Contains all 2D menu screen implementations.
+   Copyright 2014-2023 ClassiCube | Licensed under BSD-3
+*/
+struct Screen;
+struct MenuInputDesc;
+struct FontDesc;
+struct ButtonWidget;
+
+int Menu_InputDown(void* screen, int key);
+int Menu_PointerDown(void* screen, int id, int x, int y);
+int Menu_PointerMove(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, 
+					const struct SimpleButtonDesc* descs, int count);
+void Menu_LayoutButtons(struct ButtonWidget* btns, 
+					const struct SimpleButtonDesc* descs, int count);
+void Menu_SetButtons(struct ButtonWidget* btns, struct FontDesc* font, 
+					const struct SimpleButtonDesc* descs, int count);
+void Menu_LayoutBack(struct ButtonWidget* btn);
+
+void PauseScreen_Show(void);
+void OptionsGroupScreen_Show(void);
+void ClassicOptionsScreen_Show(void);
+void ClassicPauseScreen_Show(void);
+
+void ClassicBindingsScreen_Show(void);
+void ClassicHacksBindingsScreen_Show(void);
+void NormalBindingsScreen_Show(void);
+void HacksBindingsScreen_Show(void);
+void OtherBindingsScreen_Show(void);
+void MouseBindingsScreen_Show(void);
+void HotbarBindingsScreen_Show(void);
+
+void GenLevelScreen_Show(void);
+void ClassicGenScreen_Show(void);
+void LoadLevelScreen_Show(void);
+void SaveLevelScreen_Show(void);
+void TexturePackScreen_Show(void);
+void FontListScreen_Show(void);
+void HotkeyListScreen_Show(void);
+
+void MiscOptionsScreen_Show(void);
+void ChatOptionsScreen_Show(void);
+void GuiOptionsScreen_Show(void);
+void GraphicsOptionsScreen_Show(void);
+void HacksSettingsScreen_Show(void);
+void EnvSettingsScreen_Show(void);
+void NostalgiaAppearanceScreen_Show(void);
+void NostalgiaFunctionalityScreen_Show(void);
+void NostalgiaMenuScreen_Show(void);
+
+void UrlWarningOverlay_Show(const cc_string* url);
+void TexIdsOverlay_Show(void);
+void TexPackOverlay_Show(const cc_string* url);
+#ifdef CC_BUILD_TOUCH
+void TouchCtrlsScreen_Show(void);
+void TouchMoreScreen_Show(void);
+void TouchOnscreenScreen_Show(void);
+#endif
+
+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);
+#endif