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
+5
View File
@@ -325,6 +325,11 @@ Map& Map::put(std::string key, bool value){
return *this; 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& Map::putList(std::string key) {
List* arr = new List(); List* arr = new List();
put(key, arr); put(key, arr);
+1
View File
@@ -115,6 +115,7 @@ namespace dynamic {
Map& put(std::string key, Map* value); Map& put(std::string key, Map* value);
Map& put(std::string key, List* value); Map& put(std::string key, List* value);
Map& put(std::string key, bool value); Map& put(std::string key, bool value);
Map& put(std::string key, std::unique_ptr<Value> value);
List& putList(std::string key); List& putList(std::string key);
Map& putMap(std::string key); Map& putMap(std::string key);
+1 -1
View File
@@ -6,7 +6,7 @@
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include "../graphics/ui/elements/UINode.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 "../items/ItemStack.h"
#include "../typedefs.h" #include "../typedefs.h"
+4 -4
View File
@@ -6,10 +6,10 @@
#include "../delegates.h" #include "../delegates.h"
#include "../engine.h" #include "../engine.h"
#include "../graphics/core/Mesh.h" #include "../graphics/core/Mesh.h"
#include "../graphics/ui/elements/control/CheckBox.hpp" #include "../graphics/ui/elements/CheckBox.hpp"
#include "../graphics/ui/elements/control/TextBox.hpp" #include "../graphics/ui/elements/TextBox.hpp"
#include "../graphics/ui/elements/control/TrackBar.hpp" #include "../graphics/ui/elements/TrackBar.hpp"
#include "../graphics/ui/elements/control/InputBindBox.hpp" #include "../graphics/ui/elements/InputBindBox.hpp"
#include "../graphics/render/WorldRenderer.h" #include "../graphics/render/WorldRenderer.h"
#include "../objects/Player.h" #include "../objects/Player.h"
#include "../physics/Hitbox.h" #include "../physics/Hitbox.h"
+3 -3
View File
@@ -16,9 +16,9 @@
#include "../graphics/render/BlocksPreview.h" #include "../graphics/render/BlocksPreview.h"
#include "../graphics/render/WorldRenderer.h" #include "../graphics/render/WorldRenderer.h"
#include "../graphics/ui/elements/UINode.hpp" #include "../graphics/ui/elements/UINode.hpp"
#include "../graphics/ui/elements/layout/Menu.hpp" #include "../graphics/ui/elements/Menu.hpp"
#include "../graphics/ui/elements/layout/Panel.hpp" #include "../graphics/ui/elements/Panel.hpp"
#include "../graphics/ui/elements/display/Plotter.hpp" #include "../graphics/ui/elements/Plotter.hpp"
#include "../graphics/ui/GUI.h" #include "../graphics/ui/GUI.h"
#include "../items/Inventories.h" #include "../items/Inventories.h"
#include "../items/Inventory.h" #include "../items/Inventory.h"
+3 -3
View File
@@ -7,9 +7,9 @@
#include "../engine.h" #include "../engine.h"
#include "../interfaces/Task.h" #include "../interfaces/Task.h"
#include "../files/engine_paths.h" #include "../files/engine_paths.h"
#include "../graphics/ui/elements/display/Label.hpp" #include "../graphics/ui/elements/Label.hpp"
#include "../graphics/ui/elements/layout/Panel.hpp" #include "../graphics/ui/elements/Panel.hpp"
#include "../graphics/ui/elements/layout/Menu.hpp" #include "../graphics/ui/elements/Menu.hpp"
#include "../graphics/ui/gui_util.h" #include "../graphics/ui/gui_util.h"
#include "../graphics/ui/GUI.h" #include "../graphics/ui/GUI.h"
#include "../logic/scripting/scripting.h" #include "../logic/scripting/scripting.h"
+1 -1
View File
@@ -10,7 +10,7 @@
#include "../graphics/core/Shader.h" #include "../graphics/core/Shader.h"
#include "../graphics/core/TextureAnimation.h" #include "../graphics/core/TextureAnimation.h"
#include "../graphics/render/WorldRenderer.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 "../graphics/ui/GUI.h"
#include "../logic/ChunksController.h" #include "../logic/ChunksController.h"
#include "../logic/LevelController.h" #include "../logic/LevelController.h"
+1 -1
View File
@@ -1,6 +1,6 @@
#include "GUI.h" #include "GUI.h"
#include "elements/UINode.hpp" #include "elements/UINode.hpp"
#include "elements/layout/Menu.hpp" #include "elements/Menu.hpp"
#include <iostream> #include <iostream>
#include <algorithm> #include <algorithm>
@@ -1,8 +1,8 @@
#include "Button.hpp" #include "Button.hpp"
#include "../display/Label.hpp" #include "Label.hpp"
#include "../../../core/GfxContext.h" #include "../../core/GfxContext.h"
#include "../../../core/Batch2D.h" #include "../../core/Batch2D.h"
using namespace gui; using namespace gui;
@@ -1,7 +1,7 @@
#ifndef GRAPHICS_UI_ELEMENTS_BUTTON_HPP_ #ifndef GRAPHICS_UI_ELEMENTS_BUTTON_HPP_
#define GRAPHICS_UI_ELEMENTS_BUTTON_HPP_ #define GRAPHICS_UI_ELEMENTS_BUTTON_HPP_
#include "../layout/Panel.hpp" #include "Panel.hpp"
namespace gui { namespace gui {
class Label; class Label;
@@ -1,8 +1,8 @@
#include "CheckBox.hpp" #include "CheckBox.hpp"
#include "../../../core/GfxContext.h" #include "../../core/GfxContext.h"
#include "../../../core/Batch2D.h" #include "../../core/Batch2D.h"
#include "../display/Label.hpp" #include "Label.hpp"
using namespace gui; using namespace gui;
@@ -1,7 +1,7 @@
#ifndef GRAPHICS_UI_ELEMENTS_CHECKBOX_HPP_ #ifndef GRAPHICS_UI_ELEMENTS_CHECKBOX_HPP_
#define GRAPHICS_UI_ELEMENTS_CHECKBOX_HPP_ #define GRAPHICS_UI_ELEMENTS_CHECKBOX_HPP_
#include "../layout/Panel.hpp" #include "Panel.hpp"
namespace gui { namespace gui {
class CheckBox : public UINode { class CheckBox : public UINode {
@@ -1,7 +1,7 @@
#include "Container.hpp" #include "Container.hpp"
#include "../../../core/GfxContext.h" #include "../../core/GfxContext.h"
#include "../../../core/Batch2D.h" #include "../../core/Batch2D.h"
using namespace gui; using namespace gui;
@@ -1,8 +1,8 @@
#ifndef GRAPHICS_UI_ELEMENTS_CONTAINER_HPP_ #ifndef GRAPHICS_UI_ELEMENTS_CONTAINER_HPP_
#define GRAPHICS_UI_ELEMENTS_CONTAINER_HPP_ #define GRAPHICS_UI_ELEMENTS_CONTAINER_HPP_
#include "../UINode.hpp" #include "UINode.hpp"
#include "../commons.hpp" #include "commons.hpp"
#include <vector> #include <vector>
@@ -1,10 +1,10 @@
#include "Image.hpp" #include "Image.hpp"
#include "../../../core/GfxContext.h" #include "../../core/GfxContext.h"
#include "../../../core/Batch2D.h" #include "../../core/Batch2D.h"
#include "../../../core/Texture.h" #include "../../core/Texture.h"
#include "../../../../assets/Assets.h" #include "../../../assets/Assets.h"
#include "../../../../maths/UVRegion.h" #include "../../../maths/UVRegion.h"
using namespace gui; using namespace gui;
@@ -1,7 +1,7 @@
#ifndef GRAPHICS_UI_ELEMENTS_IMAGE_HPP_ #ifndef GRAPHICS_UI_ELEMENTS_IMAGE_HPP_
#define GRAPHICS_UI_ELEMENTS_IMAGE_HPP_ #define GRAPHICS_UI_ELEMENTS_IMAGE_HPP_
#include "../UINode.hpp" #include "UINode.hpp"
namespace gui { namespace gui {
class Image : public UINode { class Image : public UINode {
@@ -1,9 +1,9 @@
#include "InputBindBox.hpp" #include "InputBindBox.hpp"
#include "../display/Label.hpp" #include "Label.hpp"
#include "../../../core/GfxContext.h" #include "../../core/GfxContext.h"
#include "../../../core/Batch2D.h" #include "../../core/Batch2D.h"
#include "../../../../util/stringutil.h" #include "../../../util/stringutil.h"
using namespace gui; using namespace gui;
@@ -1,7 +1,7 @@
#ifndef GRAPHICS_UI_ELEMENTS_INPUTBINDBOX_HPP_ #ifndef GRAPHICS_UI_ELEMENTS_INPUTBINDBOX_HPP_
#define GRAPHICS_UI_ELEMENTS_INPUTBINDBOX_HPP_ #define GRAPHICS_UI_ELEMENTS_INPUTBINDBOX_HPP_
#include "../layout/Panel.hpp" #include "Panel.hpp"
namespace gui { namespace gui {
class Label; class Label;
@@ -1,10 +1,10 @@
#include "Label.hpp" #include "Label.hpp"
#include "../../../core/GfxContext.h" #include "../../core/GfxContext.h"
#include "../../../core/Batch2D.h" #include "../../core/Batch2D.h"
#include "../../../core/Font.h" #include "../../core/Font.h"
#include "../../../../assets/Assets.h" #include "../../../assets/Assets.h"
#include "../../../../util/stringutil.h" #include "../../../util/stringutil.h"
using namespace gui; using namespace gui;
@@ -1,7 +1,7 @@
#ifndef GRAPHICS_UI_ELEMENTS_LABEL_HPP_ #ifndef GRAPHICS_UI_ELEMENTS_LABEL_HPP_
#define GRAPHICS_UI_ELEMENTS_LABEL_HPP_ #define GRAPHICS_UI_ELEMENTS_LABEL_HPP_
#include "../UINode.hpp" #include "UINode.hpp"
namespace gui { namespace gui {
class Label : public UINode { class Label : public UINode {
@@ -1,7 +1,7 @@
#ifndef GRAPHICS_UI_ELEMENTS_PANEL_HPP_ #ifndef GRAPHICS_UI_ELEMENTS_PANEL_HPP_
#define GRAPHICS_UI_ELEMENTS_PANEL_HPP_ #define GRAPHICS_UI_ELEMENTS_PANEL_HPP_
#include "../commons.hpp" #include "commons.hpp"
#include "Container.hpp" #include "Container.hpp"
namespace gui { namespace gui {
@@ -1,10 +1,10 @@
#include "Plotter.hpp" #include "Plotter.hpp"
#include "../../../core/Batch2D.h" #include "../../core/Batch2D.h"
#include "../../../core/Font.h" #include "../../core/Font.h"
#include "../../../core/GfxContext.h" #include "../../core/GfxContext.h"
#include "../../../../assets/Assets.h" #include "../../../assets/Assets.h"
#include "../../../../util/stringutil.h" #include "../../../util/stringutil.h"
using namespace gui; using namespace gui;
@@ -1,8 +1,8 @@
#ifndef GRAPHICS_UI_ELEMENTS_PLOTTER_HPP_ #ifndef GRAPHICS_UI_ELEMENTS_PLOTTER_HPP_
#define GRAPHICS_UI_ELEMENTS_PLOTTER_HPP_ #define GRAPHICS_UI_ELEMENTS_PLOTTER_HPP_
#include "../UINode.hpp" #include "UINode.hpp"
#include "../../../../typedefs.h" #include "../../../typedefs.h"
#include <memory> #include <memory>
#include <glm/glm.hpp> #include <glm/glm.hpp>
@@ -1,12 +1,12 @@
#include "TextBox.hpp" #include "TextBox.hpp"
#include "../display/Label.hpp" #include "Label.hpp"
#include "../../../core/GfxContext.h" #include "../../core/GfxContext.h"
#include "../../../core/Batch2D.h" #include "../../core/Batch2D.h"
#include "../../../core/Font.h" #include "../../core/Font.h"
#include "../../../../assets/Assets.h" #include "../../../assets/Assets.h"
#include "../../../../util/stringutil.h" #include "../../../util/stringutil.h"
#include "../../../../window/Events.h" #include "../../../window/Events.h"
using namespace gui; using namespace gui;
@@ -1,8 +1,8 @@
#ifndef GRAPHICS_UI_ELEMENTS_TEXTBOX_HPP_ #ifndef GRAPHICS_UI_ELEMENTS_TEXTBOX_HPP_
#define GRAPHICS_UI_ELEMENTS_TEXTBOX_HPP_ #define GRAPHICS_UI_ELEMENTS_TEXTBOX_HPP_
#include "../layout/Panel.hpp" #include "Panel.hpp"
#include "../display/Label.hpp" #include "Label.hpp"
class Font; class Font;
@@ -1,8 +1,8 @@
#include "TrackBar.hpp" #include "TrackBar.hpp"
#include "../../../core/GfxContext.h" #include "../../core/GfxContext.h"
#include "../../../core/Batch2D.h" #include "../../core/Batch2D.h"
#include "../../../../assets/Assets.h" #include "../../../assets/Assets.h"
using namespace gui; using namespace gui;
@@ -1,7 +1,7 @@
#ifndef GRAPHICS_UI_ELEMENTS_TRACKBAR_HPP_ #ifndef GRAPHICS_UI_ELEMENTS_TRACKBAR_HPP_
#define GRAPHICS_UI_ELEMENTS_TRACKBAR_HPP_ #define GRAPHICS_UI_ELEMENTS_TRACKBAR_HPP_
#include "../UINode.hpp" #include "UINode.hpp"
namespace gui { namespace gui {
class TrackBar : public UINode { class TrackBar : public UINode {
+1 -1
View File
@@ -1,6 +1,6 @@
#include "UINode.hpp" #include "UINode.hpp"
#include "layout/Container.hpp" #include "Container.hpp"
#include "../../core/Batch2D.h" #include "../../core/Batch2D.h"
using gui::UINode; using gui::UINode;
+3 -3
View File
@@ -1,7 +1,7 @@
#include "gui_util.h" #include "gui_util.h"
#include "elements/display/Label.hpp" #include "elements/Label.hpp"
#include "elements/layout/Menu.hpp" #include "elements/Menu.hpp"
#include "elements/control/Button.hpp" #include "elements/Button.hpp"
#include "gui_xml.h" #include "gui_xml.h"
#include <glm/glm.hpp> #include <glm/glm.hpp>
+7 -7
View File
@@ -3,13 +3,13 @@
#include <charconv> #include <charconv>
#include <stdexcept> #include <stdexcept>
#include "elements/layout/Panel.hpp" #include "elements/Panel.hpp"
#include "elements/display/Image.hpp" #include "elements/Image.hpp"
#include "elements/control/Button.hpp" #include "elements/Button.hpp"
#include "elements/control/CheckBox.hpp" #include "elements/CheckBox.hpp"
#include "elements/control/TextBox.hpp" #include "elements/TextBox.hpp"
#include "elements/control/TrackBar.hpp" #include "elements/TrackBar.hpp"
#include "elements/control/InputBindBox.hpp" #include "elements/InputBindBox.hpp"
#include "../../frontend/locale/langs.h" #include "../../frontend/locale/langs.h"
#include "../../logic/scripting/scripting.h" #include "../../logic/scripting/scripting.h"
+4 -4
View File
@@ -8,10 +8,10 @@
#include "../frontend/locale/langs.h" #include "../frontend/locale/langs.h"
#include "../frontend/screens.h" #include "../frontend/screens.h"
#include "../frontend/menu.hpp" #include "../frontend/menu.hpp"
#include "../graphics/ui/elements/display/Label.hpp" #include "../graphics/ui/elements/Label.hpp"
#include "../graphics/ui/elements/control/Button.hpp" #include "../graphics/ui/elements/Button.hpp"
#include "../graphics/ui/elements/layout/Panel.hpp" #include "../graphics/ui/elements/Panel.hpp"
#include "../graphics/ui/elements/layout/Menu.hpp" #include "../graphics/ui/elements/Menu.hpp"
#include "../graphics/ui/gui_util.h" #include "../graphics/ui/gui_util.h"
#include "../interfaces/Task.h" #include "../interfaces/Task.h"
#include "../util/stringutil.h" #include "../util/stringutil.h"
+6 -6
View File
@@ -10,12 +10,12 @@
#include "../../../assets/Assets.h" #include "../../../assets/Assets.h"
#include "../../../graphics/ui/gui_util.h" #include "../../../graphics/ui/gui_util.h"
#include "../../../graphics/ui/elements/UINode.hpp" #include "../../../graphics/ui/elements/UINode.hpp"
#include "../../../graphics/ui/elements/control/Button.hpp" #include "../../../graphics/ui/elements/Button.hpp"
#include "../../../graphics/ui/elements/control/CheckBox.hpp" #include "../../../graphics/ui/elements/CheckBox.hpp"
#include "../../../graphics/ui/elements/control/TextBox.hpp" #include "../../../graphics/ui/elements/TextBox.hpp"
#include "../../../graphics/ui/elements/control/TrackBar.hpp" #include "../../../graphics/ui/elements/TrackBar.hpp"
#include "../../../graphics/ui/elements/layout/Panel.hpp" #include "../../../graphics/ui/elements/Panel.hpp"
#include "../../../graphics/ui/elements/layout/Menu.hpp" #include "../../../graphics/ui/elements/Menu.hpp"
#include "../../../frontend/UiDocument.h" #include "../../../frontend/UiDocument.h"
#include "../../../frontend/locale/langs.h" #include "../../../frontend/locale/langs.h"
#include "../../../util/stringutil.h" #include "../../../util/stringutil.h"