the shortcut

This commit is contained in:
MihailRis 2024-04-21 17:12:06 +03:00
parent 635e512142
commit 30a38035e2
35 changed files with 90 additions and 84 deletions

View File

@ -325,6 +325,11 @@ Map& Map::put(std::string key, bool value){
return *this;
}
Map& Map::put(std::string key, std::unique_ptr<Value> value) {
values.emplace(key, value.release());
return *this;
}
List& Map::putList(std::string key) {
List* arr = new List();
put(key, arr);

View File

@ -115,6 +115,7 @@ namespace dynamic {
Map& put(std::string key, Map* value);
Map& put(std::string key, List* value);
Map& put(std::string key, bool value);
Map& put(std::string key, std::unique_ptr<Value> value);
List& putList(std::string key);
Map& putMap(std::string key);

View File

@ -6,7 +6,7 @@
#include <glm/glm.hpp>
#include "../graphics/ui/elements/UINode.hpp"
#include "../graphics/ui/elements/layout/Container.hpp"
#include "../graphics/ui/elements/Container.hpp"
#include "../items/ItemStack.h"
#include "../typedefs.h"

View File

@ -6,10 +6,10 @@
#include "../delegates.h"
#include "../engine.h"
#include "../graphics/core/Mesh.h"
#include "../graphics/ui/elements/control/CheckBox.hpp"
#include "../graphics/ui/elements/control/TextBox.hpp"
#include "../graphics/ui/elements/control/TrackBar.hpp"
#include "../graphics/ui/elements/control/InputBindBox.hpp"
#include "../graphics/ui/elements/CheckBox.hpp"
#include "../graphics/ui/elements/TextBox.hpp"
#include "../graphics/ui/elements/TrackBar.hpp"
#include "../graphics/ui/elements/InputBindBox.hpp"
#include "../graphics/render/WorldRenderer.h"
#include "../objects/Player.h"
#include "../physics/Hitbox.h"

View File

@ -16,9 +16,9 @@
#include "../graphics/render/BlocksPreview.h"
#include "../graphics/render/WorldRenderer.h"
#include "../graphics/ui/elements/UINode.hpp"
#include "../graphics/ui/elements/layout/Menu.hpp"
#include "../graphics/ui/elements/layout/Panel.hpp"
#include "../graphics/ui/elements/display/Plotter.hpp"
#include "../graphics/ui/elements/Menu.hpp"
#include "../graphics/ui/elements/Panel.hpp"
#include "../graphics/ui/elements/Plotter.hpp"
#include "../graphics/ui/GUI.h"
#include "../items/Inventories.h"
#include "../items/Inventory.h"

View File

@ -7,9 +7,9 @@
#include "../engine.h"
#include "../interfaces/Task.h"
#include "../files/engine_paths.h"
#include "../graphics/ui/elements/display/Label.hpp"
#include "../graphics/ui/elements/layout/Panel.hpp"
#include "../graphics/ui/elements/layout/Menu.hpp"
#include "../graphics/ui/elements/Label.hpp"
#include "../graphics/ui/elements/Panel.hpp"
#include "../graphics/ui/elements/Menu.hpp"
#include "../graphics/ui/gui_util.h"
#include "../graphics/ui/GUI.h"
#include "../logic/scripting/scripting.h"

View File

@ -10,7 +10,7 @@
#include "../graphics/core/Shader.h"
#include "../graphics/core/TextureAnimation.h"
#include "../graphics/render/WorldRenderer.h"
#include "../graphics/ui/elements/layout/Menu.hpp"
#include "../graphics/ui/elements/Menu.hpp"
#include "../graphics/ui/GUI.h"
#include "../logic/ChunksController.h"
#include "../logic/LevelController.h"

View File

@ -1,6 +1,6 @@
#include "GUI.h"
#include "elements/UINode.hpp"
#include "elements/layout/Menu.hpp"
#include "elements/Menu.hpp"
#include <iostream>
#include <algorithm>

View File

@ -1,8 +1,8 @@
#include "Button.hpp"
#include "../display/Label.hpp"
#include "../../../core/GfxContext.h"
#include "../../../core/Batch2D.h"
#include "Label.hpp"
#include "../../core/GfxContext.h"
#include "../../core/Batch2D.h"
using namespace gui;

View File

@ -1,7 +1,7 @@
#ifndef GRAPHICS_UI_ELEMENTS_BUTTON_HPP_
#define GRAPHICS_UI_ELEMENTS_BUTTON_HPP_
#include "../layout/Panel.hpp"
#include "Panel.hpp"
namespace gui {
class Label;

View File

@ -1,8 +1,8 @@
#include "CheckBox.hpp"
#include "../../../core/GfxContext.h"
#include "../../../core/Batch2D.h"
#include "../display/Label.hpp"
#include "../../core/GfxContext.h"
#include "../../core/Batch2D.h"
#include "Label.hpp"
using namespace gui;

View File

@ -1,7 +1,7 @@
#ifndef GRAPHICS_UI_ELEMENTS_CHECKBOX_HPP_
#define GRAPHICS_UI_ELEMENTS_CHECKBOX_HPP_
#include "../layout/Panel.hpp"
#include "Panel.hpp"
namespace gui {
class CheckBox : public UINode {

View File

@ -1,7 +1,7 @@
#include "Container.hpp"
#include "../../../core/GfxContext.h"
#include "../../../core/Batch2D.h"
#include "../../core/GfxContext.h"
#include "../../core/Batch2D.h"
using namespace gui;

View File

@ -1,8 +1,8 @@
#ifndef GRAPHICS_UI_ELEMENTS_CONTAINER_HPP_
#define GRAPHICS_UI_ELEMENTS_CONTAINER_HPP_
#include "../UINode.hpp"
#include "../commons.hpp"
#include "UINode.hpp"
#include "commons.hpp"
#include <vector>

View File

@ -1,10 +1,10 @@
#include "Image.hpp"
#include "../../../core/GfxContext.h"
#include "../../../core/Batch2D.h"
#include "../../../core/Texture.h"
#include "../../../../assets/Assets.h"
#include "../../../../maths/UVRegion.h"
#include "../../core/GfxContext.h"
#include "../../core/Batch2D.h"
#include "../../core/Texture.h"
#include "../../../assets/Assets.h"
#include "../../../maths/UVRegion.h"
using namespace gui;

View File

@ -1,7 +1,7 @@
#ifndef GRAPHICS_UI_ELEMENTS_IMAGE_HPP_
#define GRAPHICS_UI_ELEMENTS_IMAGE_HPP_
#include "../UINode.hpp"
#include "UINode.hpp"
namespace gui {
class Image : public UINode {

View File

@ -1,9 +1,9 @@
#include "InputBindBox.hpp"
#include "../display/Label.hpp"
#include "../../../core/GfxContext.h"
#include "../../../core/Batch2D.h"
#include "../../../../util/stringutil.h"
#include "Label.hpp"
#include "../../core/GfxContext.h"
#include "../../core/Batch2D.h"
#include "../../../util/stringutil.h"
using namespace gui;

View File

@ -1,7 +1,7 @@
#ifndef GRAPHICS_UI_ELEMENTS_INPUTBINDBOX_HPP_
#define GRAPHICS_UI_ELEMENTS_INPUTBINDBOX_HPP_
#include "../layout/Panel.hpp"
#include "Panel.hpp"
namespace gui {
class Label;

View File

@ -1,10 +1,10 @@
#include "Label.hpp"
#include "../../../core/GfxContext.h"
#include "../../../core/Batch2D.h"
#include "../../../core/Font.h"
#include "../../../../assets/Assets.h"
#include "../../../../util/stringutil.h"
#include "../../core/GfxContext.h"
#include "../../core/Batch2D.h"
#include "../../core/Font.h"
#include "../../../assets/Assets.h"
#include "../../../util/stringutil.h"
using namespace gui;

View File

@ -1,7 +1,7 @@
#ifndef GRAPHICS_UI_ELEMENTS_LABEL_HPP_
#define GRAPHICS_UI_ELEMENTS_LABEL_HPP_
#include "../UINode.hpp"
#include "UINode.hpp"
namespace gui {
class Label : public UINode {

View File

@ -1,7 +1,7 @@
#ifndef GRAPHICS_UI_ELEMENTS_PANEL_HPP_
#define GRAPHICS_UI_ELEMENTS_PANEL_HPP_
#include "../commons.hpp"
#include "commons.hpp"
#include "Container.hpp"
namespace gui {

View File

@ -1,10 +1,10 @@
#include "Plotter.hpp"
#include "../../../core/Batch2D.h"
#include "../../../core/Font.h"
#include "../../../core/GfxContext.h"
#include "../../../../assets/Assets.h"
#include "../../../../util/stringutil.h"
#include "../../core/Batch2D.h"
#include "../../core/Font.h"
#include "../../core/GfxContext.h"
#include "../../../assets/Assets.h"
#include "../../../util/stringutil.h"
using namespace gui;

View File

@ -1,8 +1,8 @@
#ifndef GRAPHICS_UI_ELEMENTS_PLOTTER_HPP_
#define GRAPHICS_UI_ELEMENTS_PLOTTER_HPP_
#include "../UINode.hpp"
#include "../../../../typedefs.h"
#include "UINode.hpp"
#include "../../../typedefs.h"
#include <memory>
#include <glm/glm.hpp>

View File

@ -1,12 +1,12 @@
#include "TextBox.hpp"
#include "../display/Label.hpp"
#include "../../../core/GfxContext.h"
#include "../../../core/Batch2D.h"
#include "../../../core/Font.h"
#include "../../../../assets/Assets.h"
#include "../../../../util/stringutil.h"
#include "../../../../window/Events.h"
#include "Label.hpp"
#include "../../core/GfxContext.h"
#include "../../core/Batch2D.h"
#include "../../core/Font.h"
#include "../../../assets/Assets.h"
#include "../../../util/stringutil.h"
#include "../../../window/Events.h"
using namespace gui;

View File

@ -1,8 +1,8 @@
#ifndef GRAPHICS_UI_ELEMENTS_TEXTBOX_HPP_
#define GRAPHICS_UI_ELEMENTS_TEXTBOX_HPP_
#include "../layout/Panel.hpp"
#include "../display/Label.hpp"
#include "Panel.hpp"
#include "Label.hpp"
class Font;

View File

@ -1,8 +1,8 @@
#include "TrackBar.hpp"
#include "../../../core/GfxContext.h"
#include "../../../core/Batch2D.h"
#include "../../../../assets/Assets.h"
#include "../../core/GfxContext.h"
#include "../../core/Batch2D.h"
#include "../../../assets/Assets.h"
using namespace gui;

View File

@ -1,7 +1,7 @@
#ifndef GRAPHICS_UI_ELEMENTS_TRACKBAR_HPP_
#define GRAPHICS_UI_ELEMENTS_TRACKBAR_HPP_
#include "../UINode.hpp"
#include "UINode.hpp"
namespace gui {
class TrackBar : public UINode {

View File

@ -1,6 +1,6 @@
#include "UINode.hpp"
#include "layout/Container.hpp"
#include "Container.hpp"
#include "../../core/Batch2D.h"
using gui::UINode;

View File

@ -1,7 +1,7 @@
#include "gui_util.h"
#include "elements/display/Label.hpp"
#include "elements/layout/Menu.hpp"
#include "elements/control/Button.hpp"
#include "elements/Label.hpp"
#include "elements/Menu.hpp"
#include "elements/Button.hpp"
#include "gui_xml.h"
#include <glm/glm.hpp>

View File

@ -3,13 +3,13 @@
#include <charconv>
#include <stdexcept>
#include "elements/layout/Panel.hpp"
#include "elements/display/Image.hpp"
#include "elements/control/Button.hpp"
#include "elements/control/CheckBox.hpp"
#include "elements/control/TextBox.hpp"
#include "elements/control/TrackBar.hpp"
#include "elements/control/InputBindBox.hpp"
#include "elements/Panel.hpp"
#include "elements/Image.hpp"
#include "elements/Button.hpp"
#include "elements/CheckBox.hpp"
#include "elements/TextBox.hpp"
#include "elements/TrackBar.hpp"
#include "elements/InputBindBox.hpp"
#include "../../frontend/locale/langs.h"
#include "../../logic/scripting/scripting.h"

View File

@ -8,10 +8,10 @@
#include "../frontend/locale/langs.h"
#include "../frontend/screens.h"
#include "../frontend/menu.hpp"
#include "../graphics/ui/elements/display/Label.hpp"
#include "../graphics/ui/elements/control/Button.hpp"
#include "../graphics/ui/elements/layout/Panel.hpp"
#include "../graphics/ui/elements/layout/Menu.hpp"
#include "../graphics/ui/elements/Label.hpp"
#include "../graphics/ui/elements/Button.hpp"
#include "../graphics/ui/elements/Panel.hpp"
#include "../graphics/ui/elements/Menu.hpp"
#include "../graphics/ui/gui_util.h"
#include "../interfaces/Task.h"
#include "../util/stringutil.h"

View File

@ -10,12 +10,12 @@
#include "../../../assets/Assets.h"
#include "../../../graphics/ui/gui_util.h"
#include "../../../graphics/ui/elements/UINode.hpp"
#include "../../../graphics/ui/elements/control/Button.hpp"
#include "../../../graphics/ui/elements/control/CheckBox.hpp"
#include "../../../graphics/ui/elements/control/TextBox.hpp"
#include "../../../graphics/ui/elements/control/TrackBar.hpp"
#include "../../../graphics/ui/elements/layout/Panel.hpp"
#include "../../../graphics/ui/elements/layout/Menu.hpp"
#include "../../../graphics/ui/elements/Button.hpp"
#include "../../../graphics/ui/elements/CheckBox.hpp"
#include "../../../graphics/ui/elements/TextBox.hpp"
#include "../../../graphics/ui/elements/TrackBar.hpp"
#include "../../../graphics/ui/elements/Panel.hpp"
#include "../../../graphics/ui/elements/Menu.hpp"
#include "../../../frontend/UiDocument.h"
#include "../../../frontend/locale/langs.h"
#include "../../../util/stringutil.h"