Pioneer
Loading...
Searching...
No Matches
LuaPiGui.h
Go to the documentation of this file.
1// Copyright © 2008-2024 Pioneer Developers. See AUTHORS.txt for details
2// Licensed under the terms of the GPL v3. See licenses/GPL-3.txt
3
4#ifndef PIGUI_LUA_H
5#define PIGUI_LUA_H
6
7#include "lua/LuaObject.h"
8
9struct ImGuiStyle;
10
11namespace PiGui {
12
13 // Get registered PiGui handlers.
15
16 // Get registered PiGui themes.
18
19 // Get a table of key name to SDL-keycode mappings
21
22 // Get the EventQueue to be used for UI events
24
25 namespace Lua {
26 void RegisterSandbox();
27
28 void Init();
29 void Uninit();
30 } // namespace Lua
31
32 // Emit all queued UI events
33 void EmitEvents();
34
35 // Run a lua PiGui handler.
36 void RunHandler(double delta, std::string handler = "GAME");
37
38 // Load a pigui theme into the specified ImGui style.
39 void LoadTheme(ImGuiStyle &style, std::string theme);
40
41 // FIXME: TEMPORARY to resolve loading order fiasco
42 // we want themes up as soon as possible (because they're usually flat data objects)
43 // so this function exists to load a theme out-of-order from Lua::InitModules
44 void LoadThemeFromDisk(std::string theme);
45} // namespace PiGui
46
47#endif
Definition: LuaRef.h:12
Definition: Lua.cpp:41
void Uninit()
Definition: LuaPiGui.cpp:81
void RegisterSandbox()
Definition: PiGuiSandbox.cpp:141
void Init()
Definition: LuaPiGui.cpp:44
Definition: GuiApplication.h:18
LuaRef GetHandlers()
Definition: LuaPiGui.cpp:91
LuaRef GetEventQueue()
Definition: LuaPiGui.cpp:94
void LoadTheme(ImGuiStyle &style, std::string theme)
Definition: LuaPiGui.cpp:114
LuaRef GetThemes()
Definition: LuaPiGui.cpp:93
LuaRef GetKeys()
Definition: LuaPiGui.cpp:92
void LoadThemeFromDisk(std::string theme)
Definition: LuaPiGui.cpp:126
void RunHandler(double delta, std::string handler)
Definition: LuaPiGui.cpp:104
void EmitEvents()
Definition: LuaPiGui.cpp:96