Files
SDL3CPlusPlus/src/script/gui_manager.hpp
johndoe6345789 e9b944680c feat: Enhance ScriptEngine with Shader and Scene Management
- Added ShaderManager to handle shader paths loading from Lua.
- Integrated SceneManager for managing scene objects within ScriptEngine.
- Updated ScriptEngine to utilize ShaderManager and SceneManager.
- Refactored audio command handling to use AudioManager.
- Improved error handling and Lua integration for shader and scene loading.
- Cleaned up code structure and dependencies in script_engine.hpp.
2026-01-04 00:05:05 +00:00

31 lines
712 B
C++

#pragma once
#include "script/gui_types.hpp"
#include "script/lua_helpers.hpp"
#include <lua.hpp>
#include <vector>
namespace sdl3cpp::script {
class GuiManager {
public:
explicit GuiManager(lua_State* L);
std::vector<GuiCommand> LoadGuiCommands();
void UpdateGuiInput(const GuiInputSnapshot& input);
bool HasGuiCommands() const;
private:
lua_State* L_;
int guiInputRef_ = LUA_REFNIL;
int guiCommandsFnRef_ = LUA_REFNIL;
GuiCommand::RectData ReadRect(int index);
GuiColor ReadColor(int index, const GuiColor& defaultColor);
bool ReadStringField(int index, const char* name, std::string& outString);
std::string GetLuaError();
};
} // namespace sdl3cpp::script