|
lmgl 1.0.0
A lightweight OpenGL graphics engine library written in C++
|
JSON-based UI loader. More...
#include <ui_loader.hpp>
Public Member Functions | |
| UILoader () | |
| Constructor. | |
| UILoadResult | load_from_file (const std::string &filepath, const UICallbackRegistry &callbacks) |
| Load UI from JSON file. | |
| UILoadResult | load_from_string (const std::string &json_str, const UICallbackRegistry &callbacks) |
| Load UI from JSON string. | |
| void | set_base_path (const std::string &base_path) |
| Set base path for resolving relative paths (fonts, images). | |
JSON-based UI loader.
Loads UI definitions from JSON files and creates UI elements.
| UILoadResult lmgl::ui::UILoader::load_from_file | ( | const std::string & | filepath, |
| const UICallbackRegistry & | callbacks ) |
Load UI from JSON file.
| filepath | Path to JSON file. |
| callbacks | Callback registry for event handlers. |
| UILoadResult lmgl::ui::UILoader::load_from_string | ( | const std::string & | json_str, |
| const UICallbackRegistry & | callbacks ) |
Load UI from JSON string.
| json_str | JSON string. |
| callbacks | Callback registry for event handlers. |
| void lmgl::ui::UILoader::set_base_path | ( | const std::string & | base_path | ) |
Set base path for resolving relative paths (fonts, images).
| base_path | Base directory path. |