mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-12 14:31:50 +00:00
inventory script, modules
This commit is contained in:
parent
bb1743105d
commit
8e529eb63b
22 changed files with 274 additions and 163 deletions
|
|
@ -21,26 +21,28 @@ struct uidocscript {
|
|||
using uinodes_map = std::unordered_map<std::string, std::shared_ptr<gui::UINode>>;
|
||||
|
||||
class UiDocument {
|
||||
std::string namesp;
|
||||
std::string id;
|
||||
uidocscript script;
|
||||
uinodes_map map;
|
||||
std::shared_ptr<gui::UINode> root;
|
||||
int env;
|
||||
public:
|
||||
UiDocument(
|
||||
std::string namesp,
|
||||
std::string id,
|
||||
uidocscript script,
|
||||
std::shared_ptr<gui::UINode> root,
|
||||
int env);
|
||||
int env
|
||||
);
|
||||
|
||||
const std::string& getId() const;
|
||||
const uinodes_map& getMap() const;
|
||||
const std::string& getNamespace() const;
|
||||
const std::shared_ptr<gui::UINode> getRoot() const;
|
||||
|
||||
const uidocscript& getScript() const;
|
||||
int getEnvironment() const;
|
||||
/* Collect map of all uinodes having identifiers */
|
||||
static void collect(uinodes_map& map, std::shared_ptr<gui::UINode> node);
|
||||
|
||||
static std::unique_ptr<UiDocument> read (std::string namesp, fs::path file);
|
||||
static std::unique_ptr<UiDocument> read(int env, std::string namesp, fs::path file);
|
||||
};
|
||||
|
||||
#endif // FRONTEND_UI_DOCUMENT_H_
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue