mirror of
https://github.com/johndoe6345789/SDL3CPlusPlus.git
synced 2026-04-25 06:04:57 +00:00
- 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.
31 lines
712 B
C++
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
|