8#ifndef GALAXY_COMPONENTS_GUI_HPP_
9#define GALAXY_COMPONENTS_GUI_HPP_
35 GUI(
const nlohmann::json& json);
64 [[nodiscard]]
const std::string&
file()
const;
71 [[nodiscard]] nlohmann::json
serialize()
override;
78 void deserialize(
const nlohmann::json& json)
override;
Script for running an active UI.
const std::string & file() const
Get script file.
GUI & operator=(GUI &&)
Move assignment operator.
void deserialize(const nlohmann::json &json) override
Deserializes from object.
void load(const std::string &file)
Load script and set context.
virtual ~GUI()
Destructor.
sol::table m_self
The script object (table) returned by a lua script.
GUI & operator=(const GUI &)=delete
Copy assignment operator.
nlohmann::json serialize() override
Serializes object.
std::string m_file
Script file.
GUI(const GUI &)=delete
Copy constructor.
sol::function m_update
The update function belonging to the lua table.
Allows a class to be serialized.