mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 19:41:51 +00:00
minor refactor
This commit is contained in:
parent
252e9f0d19
commit
c8ca56fb8e
16 changed files with 51 additions and 30 deletions
|
|
@ -6,6 +6,7 @@
|
|||
#include <algorithm>
|
||||
|
||||
#include "../../assets/Assets.h"
|
||||
#include "../../frontend/UiDocument.h"
|
||||
#include "../../graphics/core/Batch2D.h"
|
||||
#include "../../graphics/core/Shader.h"
|
||||
#include "../../graphics/core/GfxContext.h"
|
||||
|
|
@ -34,6 +35,15 @@ std::shared_ptr<Menu> GUI::getMenu() {
|
|||
return menu;
|
||||
}
|
||||
|
||||
void GUI::onAssetsLoad(Assets* assets) {
|
||||
assets->store(new UiDocument(
|
||||
"core:root",
|
||||
uidocscript {},
|
||||
std::dynamic_pointer_cast<gui::UINode>(container),
|
||||
nullptr
|
||||
), "core:root");
|
||||
}
|
||||
|
||||
/** Mouse related input and logic handling
|
||||
* @param delta delta time
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -122,6 +122,8 @@ namespace gui {
|
|||
/// @deprecated
|
||||
std::shared_ptr<Container> getContainer() const;
|
||||
|
||||
void onAssetsLoad(Assets* assets);
|
||||
|
||||
void postRunnable(runnable callback);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#include <glm/glm.hpp>
|
||||
|
||||
#include "../../logic/scripting/scripting.h"
|
||||
#include "../../logic/scripting/Environment.h"
|
||||
#include "../../frontend/locale/langs.h"
|
||||
#include "../../util/stringutil.h"
|
||||
#include "../../delegates.h"
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include "../../frontend/locale/langs.h"
|
||||
#include "../../logic/scripting/scripting.h"
|
||||
#include "../../logic/scripting/Environment.h"
|
||||
#include "../../util/stringutil.h"
|
||||
|
||||
using namespace gui;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue