commit a0b5e810f7308a8dc6058b62a8439f8b6e98c1ad Author: Andrey Zimin Date: Wed May 15 09:09:36 2024 +0300 initial commit diff --git a/.gitignore b/.gitignore new file mode 100755 index 0000000..782dcf1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,12 @@ +build +.cache +subprojects/* +!subprojects/glad.wrap +!subprojects/glfw.wrap +!subprojects/glm.wrap +!subprojects/gtest.wrap +!subprojects/hack.wrap +!subprojects/imgui.wrap +!subprojects/nlohmann_json.wrap +!subprojects/taglib.wrap + diff --git a/README.md b/README.md new file mode 100755 index 0000000..05131f2 --- /dev/null +++ b/README.md @@ -0,0 +1,11 @@ +Движок для OpenCV, OpenGL и ImGui седержащих проектов. +Пример использования предстален в папке sandbox. + +Данный движок используется в проекте Trycaster +для реализации определения психо-эмоционального состояния в видео. + +![video present](./try_engine.gif) + + +// вселенная +https://www.youtube.com/watch?v=Pj1P0zV4zDI diff --git a/bin/layers/meson.build b/bin/layers/meson.build new file mode 100755 index 0000000..b88e217 --- /dev/null +++ b/bin/layers/meson.build @@ -0,0 +1,26 @@ +inc += include_directories('.') + +headers = [ + 'test_panel/test_panel.hpp', + 'test_panel_2/test_panel_2.hpp', + 'opengl_panel/opengl_panel.hpp', +] + +sources = [ + 'test_panel/test_panel.cpp', + 'test_panel_2/test_panel_2.cpp', + 'opengl_panel/opengl_panel.cpp', +] + +lib = library( + 'vertex_engine_sandbox', + include_directories : inc, + sources: [headers, sources], + dependencies : deps, + cpp_args: args +) + +deps += declare_dependency( + include_directories: inc, + link_with: lib, +) diff --git a/bin/layers/opengl_panel/opengl_panel.cpp b/bin/layers/opengl_panel/opengl_panel.cpp new file mode 100755 index 0000000..44d9081 --- /dev/null +++ b/bin/layers/opengl_panel/opengl_panel.cpp @@ -0,0 +1,107 @@ +#include "opengl_panel.hpp" +#include "utils.hpp" + +namespace sandbox +{ + cube::cube() + { + hack::log()("create cube"); + + const std::filesystem::path vsp { "/mnt/raid/projects/vertex_engine/bin/layers/opengl_panel/shaders/vertes.shader" }; + const std::filesystem::path fsp { "/mnt/raid/projects/vertex_engine/bin/layers/opengl_panel/shaders/frag.shader" }; + add_shader(GL_VERTEX_SHADER, vsp); + add_shader(GL_FRAGMENT_SHADER, fsp); + shader_program::link(); + + m_vertices = + { + -0.1f, 0.0f, 0.7f, + 0.1f, 0.0f, 0.7f, + 0.1f, 0.0f, -0.7f, + -0.1f, 0.0f, -0.7f, + 0.0f, 0.3f, 0.0f + }; + + m_indices = + { + 0, 1, 1, 4, 4, 0, + 0, 3, 3, 4, 4, 2, + 2, 1, 3, 2 + }; + + buffer::link(); + } + + void cube::use() { shader_program::use(); } + + void cube::set_scale(float val) { set("scale", val); } + + void cube::set_position(glm::vec3 val) { set("position", val); } + + void cube::set_color(glm::vec4 val) { set("color", val); } + + void cube::render() { buffer::render(); } + + + void opengl_panel::on_attach() + { + hack::log()("on_attach"); + } + + void opengl_panel::on_detach() + { + hack::log()("on_attach"); + } + + void opengl_panel::render() + { + // glm::mat4 view = glm::lookAt(cameraPos, cameraPos + cameraFront, cameraUp); + // glm::mat4 projection = glm::perspective(glm::radians(45.0f), 800.0f / 600.0f, 0.1f, 100.0f); + + cb_1.use(); + // unsigned int viewLoc = glGetUniformLocation(cb_1.get_id(), "view"); + // glUniformMatrix4fv(viewLoc, 1, GL_FALSE, glm::value_ptr(view)); + // unsigned int projLoc = glGetUniformLocation(cb_1.get_id(), "projection"); + // glUniformMatrix4fv(projLoc, 1, GL_FALSE, glm::value_ptr(projection)); + + float r = std::sin(glfwGetTime()); + float g = std::cos(glfwGetTime()); + cb_1.set_color(glm::vec4{ 0.85f, 0.45f, 0.95f, 0.f }); // розовый + cb_1.set_scale(1.0f + std::sin(glfwGetTime()) * 0.2f); + cb_1.set_position(glm::vec3{ 0.f, 0.5, 0.f }); + cb_1.render(); + + r = std::cos(glfwGetTime()); + g = std::sin(glfwGetTime()); + cb_2.use(); + + // unsigned int viewLoc_1 = glGetUniformLocation(cb_2.get_id(), "view"); + // glUniformMatrix4fv(viewLoc_1, 1, GL_FALSE, glm::value_ptr(view)); + // unsigned int projLoc_1 = glGetUniformLocation(cb_2.get_id(), "projection"); + // glUniformMatrix4fv(projLoc_1, 1, GL_FALSE, glm::value_ptr(projection)); + + cb_2.set_color(glm::vec4{ 0.66f, 0.66f, 0.66f, 0.f }); // серый/белый + cb_2.set_scale(1.0f - std::cos(glfwGetTime()) * 0.2f); + cb_2.set_position(glm::vec3{ r, g, 0.f }); + cb_2.render(); + } + + void opengl_panel::on_event(VE::event e) + { + // для событий от перефирии + // if (e.m_type.type() == typeid(VE::event_type)) + // { + // auto t = std::any_cast(e.m_type); + // if (t != VE::event_type::MOUSE_CURSOR_POSITION) + // hack::log()((int)t); + // } + + if (e.m_type.type() == typeid(test_event)) + { + auto t = std::any_cast(e.m_type); + if (t == test_event::TEST_EVEN) + hack::log()(std::any_cast(e.m_data)); + } + } +} + diff --git a/bin/layers/opengl_panel/opengl_panel.hpp b/bin/layers/opengl_panel/opengl_panel.hpp new file mode 100755 index 0000000..ae3cb03 --- /dev/null +++ b/bin/layers/opengl_panel/opengl_panel.hpp @@ -0,0 +1,30 @@ +#pragma once + +#include "VE.hpp" + +namespace sandbox +{ + + class cube : public VE::opengl + { + public: + cube(); + ~cube() = default; + + public: + void set_scale(float val); + void set_position(glm::vec3 val); + void set_color(glm::vec4 val); + void use(); + void render(); + }; + + class opengl_panel : public VE::layer + { + VE_FN_OVERIDE(); + + cube cb_1; + cube cb_2; + }; +} + diff --git a/bin/layers/opengl_panel/shaders/frag.shader b/bin/layers/opengl_panel/shaders/frag.shader new file mode 100644 index 0000000..c2aac5b --- /dev/null +++ b/bin/layers/opengl_panel/shaders/frag.shader @@ -0,0 +1,9 @@ +#version 330 core + +in vec4 v_color; +out vec4 f_color; + +void main() +{ + f_color = v_color; +} diff --git a/bin/layers/opengl_panel/shaders/vertes.shader b/bin/layers/opengl_panel/shaders/vertes.shader new file mode 100644 index 0000000..0bfb648 --- /dev/null +++ b/bin/layers/opengl_panel/shaders/vertes.shader @@ -0,0 +1,22 @@ +#version 330 core + +layout (location = 0) in vec3 base_position; + +uniform float scale; +uniform vec4 color; +uniform vec3 position; + +uniform mat4 view; +uniform mat4 model; +uniform mat4 projection; + +out vec4 v_color; + +void main() +{ + vec3 p = base_position + position * scale ; + // gl_Position = projection * view * vec4(p, 1.0); + gl_Position = vec4(p, 1.0); + v_color = color; +} + diff --git a/bin/layers/test_panel/test_panel.cpp b/bin/layers/test_panel/test_panel.cpp new file mode 100755 index 0000000..82c1edb --- /dev/null +++ b/bin/layers/test_panel/test_panel.cpp @@ -0,0 +1,40 @@ +#include "test_panel.hpp" +#include "utils.hpp" + +namespace sandbox +{ + void test_panel::on_attach() + { + hack::log()("on_attach"); + + // set layer params + // m_passport.m_name = "test_panel"; + m_passport.m_size = mt::vec2{ 600.f, 100.f }; + m_passport.m_pos = mt::vec2{ 100.f, 100.f }; + + // устанавливаем/убираем флаги отличные от установки по умолчанию + // в данном примере убираем флаг + m_window_flags &= ~ImGuiWindowFlags_NoTitleBar; + } + + void test_panel::on_detach() + { + hack::log()("on_attach"); + } + + void test_panel::render() + { + begin(); + if (ImGui::Button("RUN", ImVec2(28, 30))) + { + VE::event e { test_event::TEST_EVEN , std::string("test event message") }; + execute(e); + } + end(); + } + + void test_panel::on_event(VE::event e) + { + } +} + diff --git a/bin/layers/test_panel/test_panel.hpp b/bin/layers/test_panel/test_panel.hpp new file mode 100755 index 0000000..6225435 --- /dev/null +++ b/bin/layers/test_panel/test_panel.hpp @@ -0,0 +1,12 @@ +#pragma once + +#include "VE.hpp" + +namespace sandbox +{ + class test_panel : public VE::layer + { + VE_FN_OVERIDE(); + }; +} + diff --git a/bin/layers/test_panel_2/test_panel_2.cpp b/bin/layers/test_panel_2/test_panel_2.cpp new file mode 100755 index 0000000..da1feac --- /dev/null +++ b/bin/layers/test_panel_2/test_panel_2.cpp @@ -0,0 +1,63 @@ +#include "test_panel_2.hpp" +#include "utils.hpp" + +namespace sandbox +{ + void test_panel_2::on_attach() + { + hack::log()("on_attach"); + + // set layer params + // m_passport.m_name = "test_panel"; + m_passport.m_size = mt::vec2{ 400.f, 400.f }; + m_passport.m_pos = mt::vec2{ 400.f, 400.f }; + } + + void test_panel_2::on_detach() + { + hack::log()("on_attach"); + } + + void test_panel_2::render() + { + begin(); + if (ImGui::Button("RUN", ImVec2(28, 30))) + { + VE::event e { test_event::TEST_EVEN , std::string("test event message") }; + execute(e); + } + + VE_PUSH_FONT(ICON, 18); + + if (ImGui::Button(VE::style::icon::ICON_STOP, ImVec2(28, 30))) + { + VE::event e { test_event::TEST_EVEN , std::string("test icon button") }; + execute(e); + } + + ImGui::Text(VE::style::icon::ICON_PAINT_BRUSH, " Paint" ); + ImGui::Text("\xef\x87\xbc"); + + VE_POP_FONT(); + end(); + } + + void test_panel_2::on_event(VE::event e) + { + // для событий от перефирии + // if (e.m_type.type() == typeid(VE::event_type)) + // { + // auto t = std::any_cast(e.m_type); + // if (t != VE::event_type::MOUSE_CURSOR_POSITION) + // hack::log()((int)t); + // } + + if (e.m_type.type() == typeid(test_event)) + { + auto t = std::any_cast(e.m_type); + if (t == test_event::TEST_EVEN) + hack::log()(std::any_cast(e.m_data)); + } + } +} + diff --git a/bin/layers/test_panel_2/test_panel_2.hpp b/bin/layers/test_panel_2/test_panel_2.hpp new file mode 100755 index 0000000..acff4e1 --- /dev/null +++ b/bin/layers/test_panel_2/test_panel_2.hpp @@ -0,0 +1,12 @@ +#pragma once + +#include "VE.hpp" + +namespace sandbox +{ + class test_panel_2 : public VE::layer + { + VE_FN_OVERIDE(); + }; +} + diff --git a/bin/layers/utils.hpp b/bin/layers/utils.hpp new file mode 100644 index 0000000..86ce546 --- /dev/null +++ b/bin/layers/utils.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include + +namespace sandbox +{ + enum class test_event + { + TEST_EVEN + }; +} diff --git a/bin/main.cpp b/bin/main.cpp new file mode 100755 index 0000000..3e4766d --- /dev/null +++ b/bin/main.cpp @@ -0,0 +1,42 @@ +#include "layers/test_panel/test_panel.hpp" +#include "layers/test_panel_2/test_panel_2.hpp" +#include "layers/opengl_panel/opengl_panel.hpp" + +namespace sandbox +{ + class test_app : public VE::application + { + public: + test_app(std::string app_name) : VE::application{ app_name } {}; + ~test_app() = default; + + public: + template + void push_layer(Args... args) + { + this->VE::application::push_layer(args...); + } + }; +} + +namespace VE +{ + inline application& create() + { + static sandbox::test_app e{ "sandbox" }; + + e.push_layer( + new sandbox::test_panel{}, + new sandbox::test_panel_2{}, + new sandbox::opengl_panel{} + ); + + return e; + } +} + +auto main(int argc, char* args[]) -> int +{ + decltype(auto) app = VE::create(); + app.run(); +} diff --git a/bin/meson.build b/bin/meson.build new file mode 100755 index 0000000..d900bff --- /dev/null +++ b/bin/meson.build @@ -0,0 +1,6 @@ +executable( + meson.project_name(), + 'main.cpp', + dependencies : deps, + cpp_args: args +) diff --git a/meson.build b/meson.build new file mode 100755 index 0000000..f32f189 --- /dev/null +++ b/meson.build @@ -0,0 +1,55 @@ +project( + meson.current_source_dir().split('/').get(-1), + 'cpp', + version : '1.0.0', + default_options : [ + 'warning_level=1', + 'optimization=3', + 'cpp_std=c++20', +]) + +add_project_arguments ( + '-Wall', + '-Wpedantic', + '-Wno-shadow', + '-Wno-unused-but-set-variable', + '-Wno-comment', + '-Wno-unused-parameter', + '-Wno-unused-value', + '-Wno-unused-header', + '-Wno-missing-field-initializers', + '-Wno-narrowing', + '-Wno-deprecated-enum-enum-conversion', + '-Wno-volatile', + '-Wno-format-security', + '-Wno-switch', + '-Wno-ignored-attributes', + '-Wno-unused-variable', + language: 'cpp' +) + +############################################################# + +#args = [ '-lsndfile', '-lmpg123', '-lopenal', '-lglfw', '-ldl', '-lGL', '-lpthread', '-lX11', '-lXxf86vm', '-lXrandr', '-lXi'] +args = [ ] + +deps = [ + dependency('uuid'), + dependency('threads'), + dependency('opengl'), + subproject('glfw').get_variable('glfw_dep'), + subproject('glad').get_variable('glad_dep'), + subproject('hack').get_variable('hack_dep'), + subproject('imgui').get_variable('imgui_dep'), + subproject('nlohmann_json').get_variable('nlohmann_json_dep'), + subproject('glm').get_variable('glm_dep'), +] + +inc = [] + +############################################################# + +subdir('src') +subdir('bin/layers') +subdir('bin') +#subdir('tests') diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..4b31628 --- /dev/null +++ b/run.sh @@ -0,0 +1,21 @@ +#!/bin/zsh + +PROJECT_NAME=$(basename $PWD) + +run() { + command meson compile -C build + if [[ -z "$1" ]]; then + cd build + ./bin/$PROJECT_NAME + cd .. + else + meson test $1 -C build + fi +} + +if [ -d "build" ]; then + run +else + command meson setup build + run +fi diff --git a/src/TMP/bin/main.cpp b/src/TMP/bin/main.cpp new file mode 100755 index 0000000..8f87641 --- /dev/null +++ b/src/TMP/bin/main.cpp @@ -0,0 +1,7 @@ +#include "sandbox/sandbox.hpp" + +auto main(int argc, char* args[]) -> int +{ + decltype(auto) app = try_engine::create(); + app.run(); +} diff --git a/src/TMP/bin/meson.build b/src/TMP/bin/meson.build new file mode 100755 index 0000000..835449d --- /dev/null +++ b/src/TMP/bin/meson.build @@ -0,0 +1,6 @@ +executable( + 'try_engine', + 'main.cpp', + dependencies : deps, + cpp_args: args +) diff --git a/src/TMP/src/meson.build b/src/TMP/src/meson.build new file mode 100755 index 0000000..5801531 --- /dev/null +++ b/src/TMP/src/meson.build @@ -0,0 +1,4 @@ +inc += include_directories('.') + +subdir('try_engine') +subdir('sandbox') diff --git a/src/TMP/src/sandbox/layers/test_panel/test_panel.cpp b/src/TMP/src/sandbox/layers/test_panel/test_panel.cpp new file mode 100755 index 0000000..fe33f27 --- /dev/null +++ b/src/TMP/src/sandbox/layers/test_panel/test_panel.cpp @@ -0,0 +1,70 @@ +#include "test_panel.hpp" + +namespace tr::layers +{ + void test_panel::on_attach() + { + BASE_WINDOW_FLAGS(); + + m_win.m_pos = { 212.f, 35.f }; + m_win.m_size = { 720.f, 480.f }; + m_win.m_name = "test_win"; + } + + void test_panel::on_detach() + { + + } + + void test_panel::gui_render() + { + ImGui::SetNextWindowPos(m_win.m_pos); + ImGui::SetNextWindowSize(m_win.m_size); + + BEGIN_IMGUI_WIN(); + { + if (ImGui::Button("RUN", ImVec2(28, 30))) + { + m_event_manager->execute(std::string("test signal key"), "value params run"); + } + + TR_PUSH_FONT(ICON, 18); + + if (ImGui::Button(try_engine::style::icon::ICON_STOP, ImVec2(28, 30))) + { + m_event_manager->execute(std::string("test signal key"), "value params stop"); + m_event_manager->execute(std::string("test signal win"), m_win); + } + + ImGui::Text(try_engine::style::icon::ICON_PAINT_BRUSH, " Paint" ); + ImGui::Text("\xef\x87\xbc"); + + TR_POP_FONT(); + } + + END_IMGUI_WIN(); + } + + void test_panel::on_event(system_event& e) + { + if (e.get_name() == try_engine::system_event::classificator::KEY_PRESSED()) + { + auto t = static_cast(e); + + if (t.get_keycode() == try_engine::key::J) + hack::log()("Ok this is J"); + } + } + + void test_panel::on_event(std::any e, std::any value) + { + auto b = std::any_cast(e); + hack::log()(b); + if (b == "test signal win") + { + auto w = std::any_cast(value); + hack::log()(w.m_name); + } + } +} + diff --git a/src/TMP/src/sandbox/layers/test_panel/test_panel.hpp b/src/TMP/src/sandbox/layers/test_panel/test_panel.hpp new file mode 100755 index 0000000..c836385 --- /dev/null +++ b/src/TMP/src/sandbox/layers/test_panel/test_panel.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "try_engine/try_engine.hpp" + +namespace tr::layers +{ + class test_panel : public try_engine::layer + { + BASE_IMPL(test_panel); + + private: + bool m_open = true; + }; +} + diff --git a/src/TMP/src/sandbox/meson.build b/src/TMP/src/sandbox/meson.build new file mode 100755 index 0000000..00ef7f4 --- /dev/null +++ b/src/TMP/src/sandbox/meson.build @@ -0,0 +1,23 @@ +headers = [ + 'sandbox.hpp', + + 'layers/test_panel/test_panel.hpp' +] +sources = [ + 'layers/test_panel/test_panel.cpp' +] + +lib = library( + 'sandbox', + include_directories : inc, + sources: [headers, sources], + dependencies : deps, + cpp_args: args +) + +sandbox_dep = declare_dependency( + include_directories: inc, + link_with: lib, +) + +deps += sandbox_dep diff --git a/src/TMP/src/sandbox/sandbox.hpp b/src/TMP/src/sandbox/sandbox.hpp new file mode 100755 index 0000000..47a9008 --- /dev/null +++ b/src/TMP/src/sandbox/sandbox.hpp @@ -0,0 +1,40 @@ +#include "layers/test_panel/test_panel.hpp" + +namespace try_engine_sandbox +{ + class sandbox : public try_engine::application + { + using event_manager = try_engine::app_event::event; + + public: + sandbox(std::string app_name) : try_engine::application{ app_name } {}; + ~sandbox() = default; + + public: + template + void push_layer(Args... args) + { + (args->set_event_manager(&m_event_manager), ...); + try_engine::application::push_layer(args...); + } + + private: + event_manager m_event_manager; + }; +} + +namespace try_engine +{ + inline application& create() + { + static try_engine_sandbox::sandbox e{ "sandbox" }; + + e.push_layer( + new tr::layers::test_panel{} + ); + + e.attach_layers(); + + return e; + } +} diff --git a/src/TMP/src/try_engine/application/application.cpp b/src/TMP/src/try_engine/application/application.cpp new file mode 100755 index 0000000..7e9063c --- /dev/null +++ b/src/TMP/src/try_engine/application/application.cpp @@ -0,0 +1,51 @@ +#include "application.hpp" + +#include "try_engine/utils/utils.hpp" + +namespace try_engine +{ + application::application(std::string app_name) + { + instance = std::unique_ptr(this); + + m_win = std::make_unique(app_name); + m_win->set_event_callback(BIND_EVENT_FN(application, on_event)); + + m_gui = std::make_unique(); + } + + void application::run() + { + while(!glfwWindowShouldClose(m_win->glfw_window())) + { + m_win->clear(); + + m_gui->begin_frame(); + for (auto l : m_layers_stack) + l->gui_render(); + m_gui->end_frame(); + + m_win->update(); + } + } + + std::unique_ptr& application::get_window() + { + return m_win; + } + + std::unique_ptr& application::get() + { + return instance; + } + + void application::attach_layers() + { + for (auto l : m_layers_stack) l->on_attach(); + } + + void application::on_event(system_event::event& e) + { + for(const auto l : m_layers_stack) l->on_event(e); + } +} diff --git a/src/TMP/src/try_engine/application/application.hpp b/src/TMP/src/try_engine/application/application.hpp new file mode 100755 index 0000000..b4e1b38 --- /dev/null +++ b/src/TMP/src/try_engine/application/application.hpp @@ -0,0 +1,41 @@ +#pragma once + +#include "try_engine/window/window.hpp" +#include "try_engine/gui/gui.hpp" +#include "try_engine/layer/layer.hpp" + +namespace try_engine +{ + class application + { + using layers_stack = std::vector; + + public: + application(std::string); + virtual ~application() = default; + + private: + inline static std::unique_ptr instance = nullptr; + std::unique_ptr m_win; + layers_stack m_layers_stack; + std::unique_ptr m_gui; + + + public: + void run(); + void attach_layers(); + std::unique_ptr& get_window(); + static std::unique_ptr& get(); + + public: + template + void push_layer(Args*... args) { (m_layers_stack.push_back(args), ...); } + + private: + void clear(); + void on_event(system_event::event& e); + }; + + // реализация см. в проекте + application& create(); +} diff --git a/src/TMP/src/try_engine/event/app_event/event.hpp b/src/TMP/src/try_engine/event/app_event/event.hpp new file mode 100755 index 0000000..928e747 --- /dev/null +++ b/src/TMP/src/try_engine/event/app_event/event.hpp @@ -0,0 +1,49 @@ +#pragma once + +#include + +#include "try_engine/layer/layer.hpp" + +namespace try_engine::app_event +{ + using layers_stack = std::vector; + + class event + { + public: + void set_event_callback(layer* l) + { + l_stack.push_back(l); + }; + + void execute(std::any type, std::any value) + { + for (const auto layer : l_stack) + { + std::thread th { + [=]() { + layer->on_event(type, value); + } + }; + th.detach(); + } + + // tbb::parallel_for(tbb::blocked_range(0, l_stack.size()), [&](tbb::blocked_range r) { + // for (int i = r.begin(); i < r.end(); ++i) + // l_stack[i]->on_event(type, value); + // }); + } + + // когда нужно выполнение именно по очередности + void execute_queue(std::any type, std::any value) + { + for (const auto layer : l_stack) + layer->on_event(type, value); + } + + void print_size(); + + private: + layers_stack l_stack; + }; +} diff --git a/src/TMP/src/try_engine/event/system_event/category/key_event.hpp b/src/TMP/src/try_engine/event/system_event/category/key_event.hpp new file mode 100755 index 0000000..eb200c8 --- /dev/null +++ b/src/TMP/src/try_engine/event/system_event/category/key_event.hpp @@ -0,0 +1,40 @@ +#pragma once + +#include "try_engine/utils/utils.hpp" +#include "try_engine/event/system_event/event.hpp" +#include "try_engine/event/system_event/classificator.hpp" + +namespace try_engine::system_event +{ + class key_event : public event + { + // HERE + // ??? + protected: + key_event(int kc) : m_keycode { kc } {} + + protected: + int m_keycode; + + public: + inline int get_keycode() const { return m_keycode; } + }; + + class key_pressed_event : public key_event + { + public: + key_pressed_event(int keycode) : key_event(keycode) {} + + public: + EVENT_CLASS_TYPE_FN(classificator::KEY_PRESSED()) + }; + + class key_released_event : public key_event + { + public: + key_released_event(int keycode) : key_event(keycode) {} + + public: + EVENT_CLASS_TYPE_FN(classificator::KEY_RELEASED()) + }; +} diff --git a/src/TMP/src/try_engine/event/system_event/category/mouse_event.hpp b/src/TMP/src/try_engine/event/system_event/category/mouse_event.hpp new file mode 100755 index 0000000..854312f --- /dev/null +++ b/src/TMP/src/try_engine/event/system_event/category/mouse_event.hpp @@ -0,0 +1,94 @@ +#pragma once + +#include "try_engine/utils/utils.hpp" +#include "try_engine/event/system_event/event.hpp" +#include "try_engine/event/system_event/classificator.hpp" + +namespace try_engine::system_event +{ + // class MouseMovedEvent : public Event + // { + // public: + // MouseMovedEvent(float x, float y) : m_MouseX(x), m_MouseY(y) {} + // + // inline float GetX() const { return m_MouseX; } + // inline float GetY() const { return m_MouseY; } + // + // std::string ToString() const override + // { + // std::stringstream ss; + // ss << "MouseMovedEvent: " << m_MouseX << ", " << m_MouseY; + // return ss.str(); + // } + // + // EVENT_CLASS_TYPE(MouseMoved) + // EVENT_CLASS_CATEGORY(EventCategoryMouse | EventCategoryInput) + // + // private: + // float m_MouseX, m_MouseY; + // }; + // + // class MouseScrolledEvent : public Event + // { + // public: + // MouseScrolledEvent(float xOffset, float yOffset) : m_XOffset(xOffset), m_YOffset(yOffset) {} + // + // inline float GetXOffset() const { return m_XOffset; } + // inline float GetYOffset() const { return m_YOffset; } + // + // std::string ToString() const override + // { + // std::stringstream ss; + // ss << "MouseScrolledEvent: " << GetXOffset() << ", " << GetYOffset(); + // return ss.str(); + // } + // + // EVENT_CLASS_TYPE(MouseScrolled) + // EVENT_CLASS_CATEGORY(EventCategoryMouse | EventCategoryInput) + // + // private: + // float m_XOffset, m_YOffset; + // }; + + // class MouseButtonEvent : public Event + // { + // public: + // inline int GetMouseButton() const { return m_Button; } + // EVENT_CLASS_CATEGORY(EventCategoryMouse | EventCategoryInput) + // + // protected: + // MouseButtonEvent(int button) : m_Button(button) {} + // int m_Button; + // }; + // + // class MouseButtonPressedEvent : public MouseButtonEvent + // { + // public: + // MouseButtonPressedEvent(int button) : MouseButtonEvent(button) {} + // + // std::string ToString() const override + // { + // std::stringstream ss; + // ss << "MouseButtonPressedEvent: " << m_Button; + // return ss.str(); + // } + // + // EVENT_CLASS_TYPE(MouseButtonPressed) + // }; + // + // class MouseButtonReleasedEvent : public MouseButtonEvent + // { + // public: + // MouseButtonReleasedEvent(int button) : MouseButtonEvent(button) {} + // + // std::string ToString() const override + // { + // std::stringstream ss; + // ss << "MouseButtonReleasedEvent: " << m_Button; + // return ss.str(); + // } + // + // EVENT_CLASS_TYPE(MouseButtonReleased) + // }; + +} diff --git a/src/TMP/src/try_engine/event/system_event/category/window_event.hpp b/src/TMP/src/try_engine/event/system_event/category/window_event.hpp new file mode 100755 index 0000000..94669ae --- /dev/null +++ b/src/TMP/src/try_engine/event/system_event/category/window_event.hpp @@ -0,0 +1,49 @@ +#pragma once + +#include "try_engine/utils/utils.hpp" +#include "try_engine/event/system_event/event.hpp" +#include "try_engine/event/system_event/classificator.hpp" + +namespace try_engine::system_event +{ + class window_resize_event : public event + { + public: + window_resize_event(int w, int h) : m_width { w }, m_height { h } {} + + private: + int m_width, m_height; + + public: + EVENT_CLASS_TYPE_FN(classificator::WINDOW_RESIZE()) + + public: + inline unsigned int get_width() const { return m_width; } + inline unsigned int get_height() const { return m_height; } + }; + + class window_close_event : public event + { + public: + window_close_event() = default; + + public: + EVENT_CLASS_TYPE_FN(classificator::WINDOW_CLOSE()) + }; + + class window_focus_event : public event + { + public: + window_focus_event(int f) : m_focused { f } {} + + private: + int m_focused; + + public: + EVENT_CLASS_TYPE_FN(classificator::WINDOW_FOCUS()) + + public: + inline int get_focused() { return m_focused; } + }; +} + diff --git a/src/TMP/src/try_engine/event/system_event/classificator.hpp b/src/TMP/src/try_engine/event/system_event/classificator.hpp new file mode 100755 index 0000000..5cb33ee --- /dev/null +++ b/src/TMP/src/try_engine/event/system_event/classificator.hpp @@ -0,0 +1,13 @@ +#pragma once + +#include "try_engine/utils/utils.hpp" + +namespace try_engine::system_event::classificator +{ + inline std::string WINDOW_RESIZE() { return "WINDOW_RESIZE"; } + inline std::string WINDOW_CLOSE() { return "WINDOW_CLOSE"; } + inline std::string WINDOW_FOCUS() { return "WINDOW_FOCUS"; } + + inline std::string KEY_PRESSED() { return "KEY_PRESSED"; } + inline std::string KEY_RELEASED() { return "KEY_RELEASED"; } +} diff --git a/src/TMP/src/try_engine/event/system_event/event.hpp b/src/TMP/src/try_engine/event/system_event/event.hpp new file mode 100755 index 0000000..050cef1 --- /dev/null +++ b/src/TMP/src/try_engine/event/system_event/event.hpp @@ -0,0 +1,13 @@ +#pragma once + +#include "hack/utils/utils.hpp" + +namespace try_engine::system_event +{ + struct event + { + event() = default; + virtual ~event() = default; + virtual std::string get_name() const = 0; + }; +} diff --git a/src/TMP/src/try_engine/gui/gui.cpp b/src/TMP/src/try_engine/gui/gui.cpp new file mode 100755 index 0000000..c9f624d --- /dev/null +++ b/src/TMP/src/try_engine/gui/gui.cpp @@ -0,0 +1,62 @@ +#include "gui.hpp" + +#include "style/style.hpp" +#include "try_engine/application/application.hpp" + +namespace try_engine +{ + gui::gui() + { + // HERE + // откуда она ??? + IMGUI_CHECKVERSION(); + + ImGui::CreateContext(); + ImGui::StyleColorsDark(); + + ImGuiIO& io = ImGui::GetIO(); (void)io; + io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; + io.IniFilename = nullptr; + + ImGuiStyle& style = ImGui::GetStyle(); + if (io.ConfigFlags) + { + style.WindowRounding = 0.0f; + style.Colors[ImGuiCol_WindowBg].w = 1.0f; + } + + auto& app = application::get(); + GLFWwindow* window = app->get_window()->glfw_window(); + + ImGui_ImplGlfw_InitForOpenGL(window, true); + ImGui_ImplOpenGL3_Init("#version 410"); + + style::init(); + } + + gui::~gui() + { + ImGui_ImplOpenGL3_Shutdown(); + ImGui_ImplGlfw_Shutdown(); + ImGui::DestroyContext(); + } + + void gui::begin_frame() + { + ImGui_ImplOpenGL3_NewFrame(); + ImGui_ImplGlfw_NewFrame(); + ImGui::NewFrame(); + } + + void gui::end_frame() + { + ImGuiIO& io = ImGui::GetIO(); + auto& app = application::get(); + io.DisplaySize = ImVec2((float)app->get_window()->width(), (float)app->get_window()->height()); + + ImGui::Render(); + ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData()); + } +} + + diff --git a/src/TMP/src/try_engine/gui/gui.hpp b/src/TMP/src/try_engine/gui/gui.hpp new file mode 100755 index 0000000..f5f4bba --- /dev/null +++ b/src/TMP/src/try_engine/gui/gui.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "try_engine/utils/utils.hpp" + +namespace try_engine +{ + struct win { ImVec2 m_pos { 0.f, 0.f }; ImVec2 m_size { 0.f, 0.f }; std::string m_name; }; + + class gui + { + public: + gui(); + ~gui(); + + public: + void begin_frame(); + void end_frame(); + }; +} diff --git a/src/TMP/src/try_engine/gui/style/fonts.hpp b/src/TMP/src/try_engine/gui/style/fonts.hpp new file mode 100755 index 0000000..1a1697a --- /dev/null +++ b/src/TMP/src/try_engine/gui/style/fonts.hpp @@ -0,0 +1,103 @@ +#pragma once + +#include +#include +#include + +#include "imgui.h" + +#include "icons.hpp" + +namespace try_engine::style::fonts +{ + inline std::string font_name = "Montserrat/Montserrat-"; + inline std::vector font_size = { 8.f, 9.f, 10.f, 11.f, 12.f, 13.f, 14.f, 15.f, 16.f, 17.f, 18.f, 19.f, 20.f, 21.f, 22.f }; + + enum font_type + { + BOLD, BOLD_ITALIC, EXTRA_BOLD, EXTRA_BOLD_ITALIC, EXTRA_LIGHT, EXTRA_LIGHT_ITALIC, + ITALIC, LIGHT, LIGHT_ITALIC, MEDIUM, MEDIUM_ITALIC, REGULAR, SEMI_BOLD, SEMI_BOLD_ITALIC, THIN, THIN_ITALIC, ICON + }; + + // HERE + // эту порнографию с путями нужно решить + inline const std::string ICONS_PATH = "/mnt/raid/projects/cpp/try_engine/src/try_engine/internal/fonts/FontAwesome/forkawesome-webfont.ttf"; + inline const std::string FONT_PATH = "/mnt/raid/projects/cpp/try_engine/src/try_engine/internal/fonts/"; + + inline std::vector fonts_path + { + + FONT_PATH + font_name + "Bold.ttf", + FONT_PATH + font_name + "BoldItalic.ttf", + + FONT_PATH + font_name + "ExtraBold.ttf", + FONT_PATH + font_name + "ExtraBoldItalic.ttf", + + FONT_PATH + font_name + "ExtraLight.ttf", + FONT_PATH + font_name + "ExtraLightItalic.ttf", + + FONT_PATH + font_name + "Italic.ttf", + + FONT_PATH + font_name + "Light.ttf", + FONT_PATH + font_name + "LightItalic.ttf", + + FONT_PATH + font_name + "Medium.ttf", + FONT_PATH + font_name + "MediumItalic.ttf", + + FONT_PATH + font_name + "Regular.ttf", + + FONT_PATH + font_name + "SemiBold.ttf", + FONT_PATH + font_name + "SemiBoldItalic.ttf", + + FONT_PATH + font_name + "Thin.ttf", + FONT_PATH + font_name + "ThinItalic.ttf" + }; + + inline std::map font_step + { + { font_type::BOLD, 0 }, + { font_type::BOLD_ITALIC, 15 }, + { font_type::EXTRA_BOLD, 30 }, + { font_type::EXTRA_BOLD_ITALIC, 45 }, + { font_type::EXTRA_LIGHT, 60 }, + { font_type::EXTRA_LIGHT_ITALIC, 75 }, + { font_type::ITALIC, 90 }, + { font_type::LIGHT, 105 }, + { font_type::LIGHT_ITALIC, 120 }, + { font_type::MEDIUM, 135 }, + { font_type::MEDIUM_ITALIC, 150 }, + { font_type::REGULAR, 165 }, + { font_type::SEMI_BOLD, 180 }, + { font_type::SEMI_BOLD_ITALIC, 195 }, + { font_type::THIN, 210 }, + { font_type::THIN_ITALIC, 225 }, + { font_type::ICON, 240 }, + }; + + inline void init() + { + ImGuiIO& io = ImGui::GetIO(); + + for (auto& p : fonts_path) + for (auto size : font_size) + io.Fonts->AddFontFromFileTTF(p.c_str(), size, NULL, io.Fonts->GetGlyphRangesCyrillic()); + + // add icon font size + static const ImWchar icon_ranges[] = { ICON_MIN_FK, ICON_MAX_FK, 0 }; + for (auto size : font_size) + io.Fonts->AddFontFromFileTTF(ICONS_PATH.c_str(), size, NULL, icon_ranges); + }; + + inline ImFont* get_font(font_type type = font_type::REGULAR, int size = 16) + { + if (size < 0) size = 8; + if (size > 33) size = 33; + size -= 8; // т.к. font_size начинается с 8.f + + ImGuiIO& io = ImGui::GetIO(); + ImFontAtlas* atlas = io.Fonts; + + auto pos = font_step[type] + size; + return atlas->Fonts[pos]; + }; +} diff --git a/src/TMP/src/try_engine/gui/style/icons.hpp b/src/TMP/src/try_engine/gui/style/icons.hpp new file mode 100755 index 0000000..a647e15 --- /dev/null +++ b/src/TMP/src/try_engine/gui/style/icons.hpp @@ -0,0 +1,719 @@ +#pragma once + +// for use with https://github.com/ForkAwesome/Fork-Awesome/blob/master/fonts/forkawesome-webfont.ttf +#define ICON_MIN_FK 0xf000 +#define ICON_MAX_FK 0xf307 + +namespace try_engine::style::icon +{ + inline const char* ICON_GLASS = "\uf000"; + inline const char* ICON_MUSIC = "\uf001"; + inline const char* ICON_SEARCH = "\uf002"; + inline const char* ICON_ENVELOPE_O = "\uf003"; + inline const char* ICON_HEART = "\uf004"; + inline const char* ICON_STAR = "\uf005"; + inline const char* ICON_STAR_O = "\uf006"; + inline const char* ICON_USER = "\uf007"; + inline const char* ICON_FILM = "\uf008"; + inline const char* ICON_TH_LARGE = "\uf009"; + inline const char* ICON_TH = "\uf00a"; + inline const char* ICON_TH_LIST = "\uf00b"; + inline const char* ICON_CHECK = "\uf00c"; + inline const char* ICON_TIMES = "\uf00d"; + inline const char* ICON_SEARCH_PLUS = "\uf00e"; + inline const char* ICON_SEARCH_MINUS = "\uf010"; + inline const char* ICON_POWER_OFF = "\uf011"; + inline const char* ICON_SIGNAL = "\uf012"; + inline const char* ICON_COG = "\uf013"; + inline const char* ICON_TRASH_O = "\uf014"; + inline const char* ICON_HOME = "\uf015"; + inline const char* ICON_FILE_O = "\uf016"; + inline const char* ICON_CLOCK_O = "\uf017"; + inline const char* ICON_ROAD = "\uf018"; + inline const char* ICON_DOWNLOAD = "\uf019"; + inline const char* ICON_ARROW_CIRCLE_O_DOWN = "\uf01a"; + inline const char* ICON_ARROW_CIRCLE_O_UP = "\uf01b"; + inline const char* ICON_INBOX = "\uf01c"; + inline const char* ICON_PLAY_CIRCLE_O = "\uf01d"; + inline const char* ICON_REPEAT = "\uf01e"; + inline const char* ICON_REFRESH = "\uf021"; + inline const char* ICON_LIST_ALT = "\uf022"; + inline const char* ICON_LOCK = "\uf023"; + inline const char* ICON_FLAG = "\uf024"; + inline const char* ICON_HEADPHONES = "\uf025"; + inline const char* ICON_VOLUME_OFF = "\uf026"; + inline const char* ICON_VOLUME_DOWN = "\uf027"; + inline const char* ICON_VOLUME_UP = "\uf028"; + inline const char* ICON_QRCODE = "\uf029"; + inline const char* ICON_BARCODE = "\uf02a"; + inline const char* ICON_TAG = "\uf02b"; + inline const char* ICON_TAGS = "\uf02c"; + inline const char* ICON_BOOK = "\uf02d"; + inline const char* ICON_BOOKMARK = "\uf02e"; + inline const char* ICON_PRINT = "\uf02f"; + inline const char* ICON_CAMERA = "\uf030"; + inline const char* ICON_FONT = "\uf031"; + inline const char* ICON_BOLD = "\uf032"; + inline const char* ICON_ITALIC = "\uf033"; + inline const char* ICON_TEXT_HEIGHT = "\uf034"; + inline const char* ICON_TEXT_WIDTH = "\uf035"; + inline const char* ICON_ALIGN_LEFT = "\uf036"; + inline const char* ICON_ALIGN_CENTER = "\uf037"; + inline const char* ICON_ALIGN_RIGHT = "\uf038"; + inline const char* ICON_ALIGN_JUSTIFY = "\uf039"; + inline const char* ICON_LIST = "\uf03a"; + inline const char* ICON_OUTDENT = "\uf03b"; + inline const char* ICON_INDENT = "\uf03c"; + inline const char* ICON_VIDEO_CAMERA = "\uf03d"; + inline const char* ICON_PICTURE_O = "\uf03e"; + inline const char* ICON_PENCIL = "\uf040"; + inline const char* ICON_MAP_MARKER = "\uf041"; + inline const char* ICON_ADJUST = "\uf042"; + inline const char* ICON_TINT = "\uf043"; + inline const char* ICON_PENCIL_SQUARE_O = "\uf044"; + inline const char* ICON_SHARE_SQUARE_O = "\uf045"; + inline const char* ICON_CHECK_SQUARE_O = "\uf046"; + inline const char* ICON_ARROWS = "\uf047"; + inline const char* ICON_STEP_BACKWARD = "\uf048"; + inline const char* ICON_FAST_BACKWARD = "\uf049"; + inline const char* ICON_BACKWARD = "\uf04a"; + inline const char* ICON_PLAY = "\uf04b"; + inline const char* ICON_PAUSE = "\uf04c"; + inline const char* ICON_STOP = "\uf04d"; + inline const char* ICON_FORWARD = "\uf04e"; + inline const char* ICON_FAST_FORWARD = "\uf050"; + inline const char* ICON_STEP_FORWARD = "\uf051"; + inline const char* ICON_EJECT = "\uf052"; + inline const char* ICON_CHEVRON_LEFT = "\uf053"; + inline const char* ICON_CHEVRON_RIGHT = "\uf054"; + inline const char* ICON_PLUS_CIRCLE = "\uf055"; + inline const char* ICON_MINUS_CIRCLE = "\uf056"; + inline const char* ICON_TIMES_CIRCLE = "\uf057"; + inline const char* ICON_CHECK_CIRCLE = "\uf058"; + inline const char* ICON_QUESTION_CIRCLE = "\uf059"; + inline const char* ICON_INFO_CIRCLE = "\uf05a"; + inline const char* ICON_CROSSHAIRS = "\uf05b"; + inline const char* ICON_TIMES_CIRCLE_O = "\uf05c"; + inline const char* ICON_CHECK_CIRCLE_O = "\uf05d"; + inline const char* ICON_BAN = "\uf05e"; + inline const char* ICON_ARROW_LEFT = "\uf060"; + inline const char* ICON_ARROW_RIGHT = "\uf061"; + inline const char* ICON_ARROW_UP = "\uf062"; + inline const char* ICON_ARROW_DOWN = "\uf063"; + inline const char* ICON_SHARE = "\uf064"; + inline const char* ICON_EXPAND = "\uf065"; + inline const char* ICON_COMPRESS = "\uf066"; + inline const char* ICON_PLUS = "\uf067"; + inline const char* ICON_MINUS = "\uf068"; + inline const char* ICON_ASTERISK = "\uf069"; + inline const char* ICON_EXCLAMATION_CIRCLE = "\uf06a"; + inline const char* ICON_GIFT = "\uf06b"; + inline const char* ICON_LEAF = "\uf06c"; + inline const char* ICON_FIRE = "\uf06d"; + inline const char* ICON_EYE = "\uf06e"; + inline const char* ICON_EYE_SLASH = "\uf070"; + inline const char* ICON_EXCLAMATION_TRIANGLE = "\uf071"; + inline const char* ICON_PLANE = "\uf072"; + inline const char* ICON_CALENDAR = "\uf073"; + inline const char* ICON_RANDOM = "\uf074"; + inline const char* ICON_COMMENT = "\uf075"; + inline const char* ICON_MAGNET = "\uf076"; + inline const char* ICON_CHEVRON_UP = "\uf077"; + inline const char* ICON_CHEVRON_DOWN = "\uf078"; + inline const char* ICON_RETWEET = "\uf079"; + inline const char* ICON_SHOPPING_CART = "\uf07a"; + inline const char* ICON_FOLDER = "\uf07b"; + inline const char* ICON_FOLDER_OPEN = "\uf07c"; + inline const char* ICON_ARROWS_V = "\uf07d"; + inline const char* ICON_ARROWS_H = "\uf07e"; + inline const char* ICON_BAR_CHART = "\uf080"; + inline const char* ICON_TWITTER_SQUARE = "\uf081"; + inline const char* ICON_FACEBOOK_SQUARE = "\uf082"; + inline const char* ICON_CAMERA_RETRO = "\uf083"; + inline const char* ICON_KEY = "\uf084"; + inline const char* ICON_COGS = "\uf085"; + inline const char* ICON_COMMENTS = "\uf086"; + inline const char* ICON_THUMBS_O_UP = "\uf087"; + inline const char* ICON_THUMBS_O_DOWN = "\uf088"; + inline const char* ICON_STAR_HALF = "\uf089"; + inline const char* ICON_HEART_O = "\uf08a"; + inline const char* ICON_SIGN_OUT = "\uf08b"; + inline const char* ICON_LINKEDIN_SQUARE = "\uf08c"; + inline const char* ICON_THUMB_TACK = "\uf08d"; + inline const char* ICON_INLINEAL_LINK = "\uf08e"; + inline const char* ICON_SIGN_IN = "\uf090"; + inline const char* ICON_TROPHY = "\uf091"; + inline const char* ICON_GITHUB_SQUARE = "\uf092"; + inline const char* ICON_UPLOAD = "\uf093"; + inline const char* ICON_LEMON_O = "\uf094"; + inline const char* ICON_PHONE = "\uf095"; + inline const char* ICON_SQUARE_O = "\uf096"; + inline const char* ICON_BOOKMARK_O = "\uf097"; + inline const char* ICON_PHONE_SQUARE = "\uf098"; + inline const char* ICON_TWITTER = "\uf099"; + inline const char* ICON_FACEBOOK = "\uf09a"; + inline const char* ICON_GITHUB = "\uf09b"; + inline const char* ICON_UNLOCK = "\uf09c"; + inline const char* ICON_CREDIT_CARD = "\uf09d"; + inline const char* ICON_RSS = "\uf09e"; + inline const char* ICON_HDD_O = "\uf0a0"; + inline const char* ICON_BULLHORN = "\uf0a1"; + inline const char* ICON_BELL = "\uf0f3"; + inline const char* ICON_CERTIFICATE = "\uf0a3"; + inline const char* ICON_HAND_O_RIGHT = "\uf0a4"; + inline const char* ICON_HAND_O_LEFT = "\uf0a5"; + inline const char* ICON_HAND_O_UP = "\uf0a6"; + inline const char* ICON_HAND_O_DOWN = "\uf0a7"; + inline const char* ICON_ARROW_CIRCLE_LEFT = "\uf0a8"; + inline const char* ICON_ARROW_CIRCLE_RIGHT = "\uf0a9"; + inline const char* ICON_ARROW_CIRCLE_UP = "\uf0aa"; + inline const char* ICON_ARROW_CIRCLE_DOWN = "\uf0ab"; + inline const char* ICON_GLOBE = "\uf0ac"; + inline const char* ICON_GLOBE_E = "\uf304"; + inline const char* ICON_GLOBE_W = "\uf305"; + inline const char* ICON_WRENCH = "\uf0ad"; + inline const char* ICON_TASKS = "\uf0ae"; + inline const char* ICON_FILTER = "\uf0b0"; + inline const char* ICON_BRIEFCASE = "\uf0b1"; + inline const char* ICON_ARROWS_ALT = "\uf0b2"; + inline const char* ICON_USERS = "\uf0c0"; + inline const char* ICON_LINK = "\uf0c1"; + inline const char* ICON_CLOUD = "\uf0c2"; + inline const char* ICON_FLASK = "\uf0c3"; + inline const char* ICON_SCISSORS = "\uf0c4"; + inline const char* ICON_FILES_O = "\uf0c5"; + inline const char* ICON_PAPERCLIP = "\uf0c6"; + inline const char* ICON_FLOPPY_O = "\uf0c7"; + inline const char* ICON_SQUARE = "\uf0c8"; + inline const char* ICON_BARS = "\uf0c9"; + inline const char* ICON_LIST_UL = "\uf0ca"; + inline const char* ICON_LIST_OL = "\uf0cb"; + inline const char* ICON_STRIKETHROUGH = "\uf0cc"; + inline const char* ICON_UNDERLINE = "\uf0cd"; + inline const char* ICON_TABLE = "\uf0ce"; + inline const char* ICON_MAGIC = "\uf0d0"; + inline const char* ICON_TRUCK = "\uf0d1"; + inline const char* ICON_PINTEREST = "\uf0d2"; + inline const char* ICON_PINTEREST_SQUARE = "\uf0d3"; + inline const char* ICON_GOOGLE_PLUS_SQUARE = "\uf0d4"; + inline const char* ICON_GOOGLE_PLUS = "\uf0d5"; + inline const char* ICON_MONEY = "\uf0d6"; + inline const char* ICON_CARET_DOWN = "\uf0d7"; + inline const char* ICON_CARET_UP = "\uf0d8"; + inline const char* ICON_CARET_LEFT = "\uf0d9"; + inline const char* ICON_CARET_RIGHT = "\uf0da"; + inline const char* ICON_COLUMNS = "\uf0db"; + inline const char* ICON_SORT = "\uf0dc"; + inline const char* ICON_SORT_DESC = "\uf0dd"; + inline const char* ICON_SORT_ASC = "\uf0de"; + inline const char* ICON_ENVELOPE = "\uf0e0"; + inline const char* ICON_LINKEDIN = "\uf0e1"; + inline const char* ICON_UNDO = "\uf0e2"; + inline const char* ICON_GAVEL = "\uf0e3"; + inline const char* ICON_TACHOMETER = "\uf0e4"; + inline const char* ICON_COMMENT_O = "\uf0e5"; + inline const char* ICON_COMMENTS_O = "\uf0e6"; + inline const char* ICON_BOLT = "\uf0e7"; + inline const char* ICON_SITEMAP = "\uf0e8"; + inline const char* ICON_UMBRELLA = "\uf0e9"; + inline const char* ICON_CLIPBOARD = "\uf0ea"; + inline const char* ICON_LIGHTBULB_O = "\uf0eb"; + inline const char* ICON_EXCHANGE = "\uf0ec"; + inline const char* ICON_CLOUD_DOWNLOAD = "\uf0ed"; + inline const char* ICON_CLOUD_UPLOAD = "\uf0ee"; + inline const char* ICON_USER_MD = "\uf0f0"; + inline const char* ICON_STETHOSCOPE = "\uf0f1"; + inline const char* ICON_SUITCASE = "\uf0f2"; + inline const char* ICON_BELL_O = "\uf0a2"; + inline const char* ICON_COFFEE = "\uf0f4"; + inline const char* ICON_CUTLERY = "\uf0f5"; + inline const char* ICON_FILE_TEXT_O = "\uf0f6"; + inline const char* ICON_BUILDING_O = "\uf0f7"; + inline const char* ICON_HOSPITAL_O = "\uf0f8"; + inline const char* ICON_AMBULANCE = "\uf0f9"; + inline const char* ICON_MEDKIT = "\uf0fa"; + inline const char* ICON_FIGHTER_JET = "\uf0fb"; + inline const char* ICON_BEER = "\uf0fc"; + inline const char* ICON_H_SQUARE = "\uf0fd"; + inline const char* ICON_PLUS_SQUARE = "\uf0fe"; + inline const char* ICON_ANGLE_DOUBLE_LEFT = "\uf100"; + inline const char* ICON_ANGLE_DOUBLE_RIGHT = "\uf101"; + inline const char* ICON_ANGLE_DOUBLE_UP = "\uf102"; + inline const char* ICON_ANGLE_DOUBLE_DOWN = "\uf103"; + inline const char* ICON_ANGLE_LEFT = "\uf104"; + inline const char* ICON_ANGLE_RIGHT = "\uf105"; + inline const char* ICON_ANGLE_UP = "\uf106"; + inline const char* ICON_ANGLE_DOWN = "\uf107"; + inline const char* ICON_DESKTOP = "\uf108"; + inline const char* ICON_LAPTOP = "\uf109"; + inline const char* ICON_TABLET = "\uf10a"; + inline const char* ICON_MOBILE = "\uf10b"; + inline const char* ICON_CIRCLE_O = "\uf10c"; + inline const char* ICON_QUOTE_LEFT = "\uf10d"; + inline const char* ICON_QUOTE_RIGHT = "\uf10e"; + inline const char* ICON_SPINNER = "\uf110"; + inline const char* ICON_CIRCLE = "\uf111"; + inline const char* ICON_REPLY = "\uf112"; + inline const char* ICON_GITHUB_ALT = "\uf113"; + inline const char* ICON_FOLDER_O = "\uf114"; + inline const char* ICON_FOLDER_OPEN_O = "\uf115"; + inline const char* ICON_SMILE_O = "\uf118"; + inline const char* ICON_FROWN_O = "\uf119"; + inline const char* ICON_MEH_O = "\uf11a"; + inline const char* ICON_GAMEPAD = "\uf11b"; + inline const char* ICON_KEYBOARD_O = "\uf11c"; + inline const char* ICON_FLAG_O = "\uf11d"; + inline const char* ICON_FLAG_CHECKERED = "\uf11e"; + inline const char* ICON_TERMINAL = "\uf120"; + inline const char* ICON_CODE = "\uf121"; + inline const char* ICON_REPLY_ALL = "\uf122"; + inline const char* ICON_STAR_HALF_O = "\uf123"; + inline const char* ICON_LOCATION_ARROW = "\uf124"; + inline const char* ICON_CROP = "\uf125"; + inline const char* ICON_CODE_FORK = "\uf126"; + inline const char* ICON_CHAIN_BROKEN = "\uf127"; + inline const char* ICON_QUESTION = "\uf128"; + inline const char* ICON_INFO = "\uf129"; + inline const char* ICON_EXCLAMATION = "\uf12a"; + inline const char* ICON_SUPERSCRIPT = "\uf12b"; + inline const char* ICON_SUBSCRIPT = "\uf12c"; + inline const char* ICON_ERASER = "\uf12d"; + inline const char* ICON_PUZZLE_PIECE = "\uf12e"; + inline const char* ICON_MICROPHONE = "\uf130"; + inline const char* ICON_MICROPHONE_SLASH = "\uf131"; + inline const char* ICON_SHIELD = "\uf132"; + inline const char* ICON_CALENDAR_O = "\uf133"; + inline const char* ICON_FIRE_EXTINGUISHER = "\uf134"; + inline const char* ICON_ROCKET = "\uf135"; + inline const char* ICON_MAXCDN = "\uf136"; + inline const char* ICON_CHEVRON_CIRCLE_LEFT = "\uf137"; + inline const char* ICON_CHEVRON_CIRCLE_RIGHT = "\uf138"; + inline const char* ICON_CHEVRON_CIRCLE_UP = "\uf139"; + inline const char* ICON_CHEVRON_CIRCLE_DOWN = "\uf13a"; + inline const char* ICON_HTML5 = "\uf13b"; + inline const char* ICON_CSS3 = "\uf13c"; + inline const char* ICON_ANCHOR = "\uf13d"; + inline const char* ICON_UNLOCK_ALT = "\uf13e"; + inline const char* ICON_BULLSEYE = "\uf140"; + inline const char* ICON_ELLIPSIS_H = "\uf141"; + inline const char* ICON_ELLIPSIS_V = "\uf142"; + inline const char* ICON_RSS_SQUARE = "\uf143"; + inline const char* ICON_PLAY_CIRCLE = "\uf144"; + inline const char* ICON_TICKET = "\uf145"; + inline const char* ICON_MINUS_SQUARE = "\uf146"; + inline const char* ICON_MINUS_SQUARE_O = "\uf147"; + inline const char* ICON_LEVEL_UP = "\uf148"; + inline const char* ICON_LEVEL_DOWN = "\uf149"; + inline const char* ICON_CHECK_SQUARE = "\uf14a"; + inline const char* ICON_PENCIL_SQUARE = "\uf14b"; + inline const char* ICON_inlineAL_LINK_SQUARE = "\uf14c"; + inline const char* ICON_SHARE_SQUARE = "\uf14d"; + inline const char* ICON_COMPASS = "\uf14e"; + inline const char* ICON_CARET_SQUARE_O_DOWN = "\uf150"; + inline const char* ICON_CARET_SQUARE_O_UP = "\uf151"; + inline const char* ICON_CARET_SQUARE_O_RIGHT = "\uf152"; + inline const char* ICON_EUR = "\uf153"; + inline const char* ICON_GBP = "\uf154"; + inline const char* ICON_USD = "\uf155"; + inline const char* ICON_INR = "\uf156"; + inline const char* ICON_JPY = "\uf157"; + inline const char* ICON_RUB = "\uf158"; + inline const char* ICON_KRW = "\uf159"; + inline const char* ICON_BTC = "\uf15a"; + inline const char* ICON_FILE = "\uf15b"; + inline const char* ICON_FILE_TEXT = "\uf15c"; + inline const char* ICON_SORT_ALPHA_ASC = "\uf15d"; + inline const char* ICON_SORT_ALPHA_DESC = "\uf15e"; + inline const char* ICON_SORT_AMOUNT_ASC = "\uf160"; + inline const char* ICON_SORT_AMOUNT_DESC = "\uf161"; + inline const char* ICON_SORT_NUMERIC_ASC = "\uf162"; + inline const char* ICON_SORT_NUMERIC_DESC = "\uf163"; + inline const char* ICON_THUMBS_UP = "\uf164"; + inline const char* ICON_THUMBS_DOWN = "\uf165"; + inline const char* ICON_YOUTUBE_SQUARE = "\uf166"; + inline const char* ICON_YOUTUBE = "\uf167"; + inline const char* ICON_XING = "\uf168"; + inline const char* ICON_XING_SQUARE = "\uf169"; + inline const char* ICON_YOUTUBE_PLAY = "\uf16a"; + inline const char* ICON_DROPBOX = "\uf16b"; + inline const char* ICON_STACK_OVERFLOW = "\uf16c"; + inline const char* ICON_INSTAGRAM = "\uf16d"; + inline const char* ICON_FLICKR = "\uf16e"; + inline const char* ICON_ADN = "\uf170"; + inline const char* ICON_BITBUCKET = "\uf171"; + inline const char* ICON_BITBUCKET_SQUARE = "\uf172"; + inline const char* ICON_TUMBLR = "\uf173"; + inline const char* ICON_TUMBLR_SQUARE = "\uf174"; + inline const char* ICON_LONG_ARROW_DOWN = "\uf175"; + inline const char* ICON_LONG_ARROW_UP = "\uf176"; + inline const char* ICON_LONG_ARROW_LEFT = "\uf177"; + inline const char* ICON_LONG_ARROW_RIGHT = "\uf178"; + inline const char* ICON_APPLE = "\uf179"; + inline const char* ICON_PROJECTS = "\uf17a"; + inline const char* ICON_ANDROID = "\uf17b"; + inline const char* ICON_LINUX = "\uf17c"; + inline const char* ICON_DRIBBBLE = "\uf17d"; + inline const char* ICON_SKYPE = "\uf17e"; + inline const char* ICON_FOURSQUARE = "\uf180"; + inline const char* ICON_TRELLO = "\uf181"; + inline const char* ICON_FEMALE = "\uf182"; + inline const char* ICON_MALE = "\uf183"; + inline const char* ICON_GRATIPAY = "\uf184"; + inline const char* ICON_SUN_O = "\uf185"; + inline const char* ICON_MOON_O = "\uf186"; + inline const char* ICON_ARCHIVE = "\uf187"; + inline const char* ICON_BUG = "\uf188"; + inline const char* ICON_VK = "\uf189"; + inline const char* ICON_WEIBO = "\uf18a"; + inline const char* ICON_RENREN = "\uf18b"; + inline const char* ICON_PAGELINES = "\uf18c"; + inline const char* ICON_STACK_EXCHANGE = "\uf18d"; + inline const char* ICON_ARROW_CIRCLE_O_RIGHT = "\uf18e"; + inline const char* ICON_ARROW_CIRCLE_O_LEFT = "\uf190"; + inline const char* ICON_CARET_SQUARE_O_LEFT = "\uf191"; + inline const char* ICON_DOT_CIRCLE_O = "\uf192"; + inline const char* ICON_WHEELCHAIR = "\uf193"; + inline const char* ICON_VIMEO_SQUARE = "\uf194"; + inline const char* ICON_TRY = "\uf195"; + inline const char* ICON_PLUS_SQUARE_O = "\uf196"; + inline const char* ICON_SPACE_SHUTTLE = "\uf197"; + inline const char* ICON_SLACK = "\uf198"; + inline const char* ICON_ENVELOPE_SQUARE = "\uf199"; + inline const char* ICON_WORDPRESS = "\uf19a"; + inline const char* ICON_OPENID = "\uf19b"; + inline const char* ICON_UNIVERSITY = "\uf19c"; + inline const char* ICON_GRADUATION_CAP = "\uf19d"; + inline const char* ICON_YAHOO = "\uf19e"; + inline const char* ICON_GOOGLE = "\uf1a0"; + inline const char* ICON_REDDIT = "\uf1a1"; + inline const char* ICON_REDDIT_SQUARE = "\uf1a2"; + inline const char* ICON_STUMBLEUPON_CIRCLE = "\uf1a3"; + inline const char* ICON_STUMBLEUPON = "\uf1a4"; + inline const char* ICON_DELICIOUS = "\uf1a5"; + inline const char* ICON_DIGG = "\uf1a6"; + inline const char* ICON_DRUPAL = "\uf1a9"; + inline const char* ICON_JOOMLA = "\uf1aa"; + inline const char* ICON_LANGUAGE = "\uf1ab"; + inline const char* ICON_FAX = "\uf1ac"; + inline const char* ICON_BUILDING = "\uf1ad"; + inline const char* ICON_CHILD = "\uf1ae"; + inline const char* ICON_PAW = "\uf1b0"; + inline const char* ICON_SPOON = "\uf1b1"; + inline const char* ICON_CUBE = "\uf1b2"; + inline const char* ICON_CUBES = "\uf1b3"; + inline const char* ICON_BEHANCE = "\uf1b4"; + inline const char* ICON_BEHANCE_SQUARE = "\uf1b5"; + inline const char* ICON_STEAM = "\uf1b6"; + inline const char* ICON_STEAM_SQUARE = "\uf1b7"; + inline const char* ICON_RECYCLE = "\uf1b8"; + inline const char* ICON_CAR = "\uf1b9"; + inline const char* ICON_TAXI = "\uf1ba"; + inline const char* ICON_TREE = "\uf1bb"; + inline const char* ICON_SPOTIFY = "\uf1bc"; + inline const char* ICON_DEVIANTART = "\uf1bd"; + inline const char* ICON_SOUNDCLOUD = "\uf1be"; + inline const char* ICON_DATABASE = "\uf1c0"; + inline const char* ICON_FILE_PDF_O = "\uf1c1"; + inline const char* ICON_FILE_WORD_O = "\uf1c2"; + inline const char* ICON_FILE_EXCEL_O = "\uf1c3"; + inline const char* ICON_FILE_POWERPOINT_O = "\uf1c4"; + inline const char* ICON_SAVE = "\uf0c7"; + inline const char* ICON_FILE_IMAGE_O = "\uf1c5"; + inline const char* ICON_FILE_ARCHIVE_O = "\uf1c6"; + inline const char* ICON_FILE_AUDIO_O = "\uf1c7"; + inline const char* ICON_FILE_VIDEO_O = "\uf1c8"; + inline const char* ICON_FILE_CODE_O = "\uf1c9"; + inline const char* ICON_VINE = "\uf1ca"; + inline const char* ICON_CODEPEN = "\uf1cb"; + inline const char* ICON_JSFIDDLE = "\uf1cc"; + inline const char* ICON_LIFE_RING = "\uf1cd"; + inline const char* ICON_CIRCLE_O_NOTCH = "\uf1ce"; + inline const char* ICON_REBEL = "\uf1d0"; + inline const char* ICON_EMPIRE = "\uf1d1"; + inline const char* ICON_GIT_SQUARE = "\uf1d2"; + inline const char* ICON_GIT = "\uf1d3"; + inline const char* ICON_HACKER_NEWS = "\uf1d4"; + inline const char* ICON_TENCENT_WEIBO = "\uf1d5"; + inline const char* ICON_QQ = "\uf1d6"; + inline const char* ICON_WEIXIN = "\uf1d7"; + inline const char* ICON_PAPER_PLANE = "\uf1d8"; + inline const char* ICON_PAPER_PLANE_O = "\uf1d9"; + inline const char* ICON_HISTORY = "\uf1da"; + inline const char* ICON_CIRCLE_THIN = "\uf1db"; + inline const char* ICON_HEADER = "\uf1dc"; + inline const char* ICON_PARAGRAPH = "\uf1dd"; + inline const char* ICON_SLIDERS = "\uf1de"; + inline const char* ICON_SHARE_ALT = "\uf1e0"; + inline const char* ICON_SHARE_ALT_SQUARE = "\uf1e1"; + inline const char* ICON_BOMB = "\uf1e2"; + inline const char* ICON_FUTBOL_O = "\uf1e3"; + inline const char* ICON_TTY = "\uf1e4"; + inline const char* ICON_BINOCULARS = "\uf1e5"; + inline const char* ICON_PLUG = "\uf1e6"; + inline const char* ICON_SLIDESHARE = "\uf1e7"; + inline const char* ICON_TWITCH = "\uf1e8"; + inline const char* ICON_YELP = "\uf1e9"; + inline const char* ICON_NEWSPAPER_O = "\uf1ea"; + inline const char* ICON_WIFI = "\uf1eb"; + inline const char* ICON_CALCULATOR = "\uf1ec"; + inline const char* ICON_PAYPAL = "\uf1ed"; + inline const char* ICON_GOOGLE_WALLET = "\uf1ee"; + inline const char* ICON_CC_VISA = "\uf1f0"; + inline const char* ICON_CC_MASTERCARD = "\uf1f1"; + inline const char* ICON_CC_DISCOVER = "\uf1f2"; + inline const char* ICON_CC_AMEX = "\uf1f3"; + inline const char* ICON_CC_PAYPAL = "\uf1f4"; + inline const char* ICON_CC_STRIPE = "\uf1f5"; + inline const char* ICON_BELL_SLASH = "\uf1f6"; + inline const char* ICON_BELL_SLASH_O = "\uf1f7"; + inline const char* ICON_TRASH = "\uf1f8"; + inline const char* ICON_COPYRIGHT = "\uf1f9"; + inline const char* ICON_AT = "\uf1fa"; + inline const char* ICON_EYEDROPPER = "\uf1fb"; + inline const char* ICON_PAINT_BRUSH = "\uf1fc"; + inline const char* ICON_BIRTHDAY_CAKE = "\uf1fd"; + inline const char* ICON_AREA_CHART = "\uf1fe"; + inline const char* ICON_PIE_CHART = "\uf200"; + inline const char* ICON_LINE_CHART = "\uf201"; + inline const char* ICON_LASTFM = "\uf202"; + inline const char* ICON_LASTFM_SQUARE = "\uf203"; + inline const char* ICON_TOGGLE_OFF = "\uf204"; + inline const char* ICON_TOGGLE_ON = "\uf205"; + inline const char* ICON_BICYCLE = "\uf206"; + inline const char* ICON_BUS = "\uf207"; + inline const char* ICON_IOXHOST = "\uf208"; + inline const char* ICON_ANGELLIST = "\uf209"; + inline const char* ICON_CC = "\uf20a"; + inline const char* ICON_ILS = "\uf20b"; + inline const char* ICON_MEANPATH = "\uf20c"; + inline const char* ICON_BUYSELLADS = "\uf20d"; + inline const char* ICON_CONNECTDEVELOP = "\uf20e"; + inline const char* ICON_DASHCUBE = "\uf210"; + inline const char* ICON_FORUMBEE = "\uf211"; + inline const char* ICON_LEANPUB = "\uf212"; + inline const char* ICON_SELLSY = "\uf213"; + inline const char* ICON_SHIRTSINBULK = "\uf214"; + inline const char* ICON_SIMPLYBUILT = "\uf215"; + inline const char* ICON_SKYATLAS = "\uf216"; + inline const char* ICON_CART_PLUS = "\uf217"; + inline const char* ICON_CART_ARROW_DOWN = "\uf218"; + inline const char* ICON_DIAMOND = "\uf219"; + inline const char* ICON_SHIP = "\uf21a"; + inline const char* ICON_USER_SECRET = "\uf21b"; + inline const char* ICON_MOTORCYCLE = "\uf21c"; + inline const char* ICON_STREET_VIEW = "\uf21d"; + inline const char* ICON_HEARTBEAT = "\uf21e"; + inline const char* ICON_VENUS = "\uf221"; + inline const char* ICON_MARS = "\uf222"; + inline const char* ICON_MERCURY = "\uf223"; + inline const char* ICON_TRANSGENDER = "\uf224"; + inline const char* ICON_TRANSGENDER_ALT = "\uf225"; + inline const char* ICON_VENUS_DOUBLE = "\uf226"; + inline const char* ICON_MARS_DOUBLE = "\uf227"; + inline const char* ICON_VENUS_MARS = "\uf228"; + inline const char* ICON_MARS_STROKE = "\uf229"; + inline const char* ICON_MARS_STROKE_V = "\uf22a"; + inline const char* ICON_MARS_STROKE_H = "\uf22b"; + inline const char* ICON_NEUTER = "\uf22c"; + inline const char* ICON_GENDERLESS = "\uf22d"; + inline const char* ICON_FACEBOOK_OFFICIAL = "\uf230"; + inline const char* ICON_PINTEREST_P = "\uf231"; + inline const char* ICON_WHATSAPP = "\uf232"; + inline const char* ICON_SERVER = "\uf233"; + inline const char* ICON_USER_PLUS = "\uf234"; + inline const char* ICON_USER_TIMES = "\uf235"; + inline const char* ICON_BED = "\uf236"; + inline const char* ICON_VIACOIN = "\uf237"; + inline const char* ICON_TRAIN = "\uf238"; + inline const char* ICON_SUBWAY = "\uf239"; + inline const char* ICON_MEDIUM = "\uf23a"; + inline const char* ICON_MEDIUM_SQUARE = "\uf2f8"; + inline const char* ICON_Y_COMBINATOR = "\uf23b"; + inline const char* ICON_OPTIN_MONSTER = "\uf23c"; + inline const char* ICON_OPENCART = "\uf23d"; + inline const char* ICON_EXPEDITEDSSL = "\uf23e"; + inline const char* ICON_BATTERY_FULL = "\uf240"; + inline const char* ICON_BATTERY_THREE_QUARTERS = "\uf241"; + inline const char* ICON_BATTERY_HALF = "\uf242"; + inline const char* ICON_BATTERY_QUARTER = "\uf243"; + inline const char* ICON_BATTERY_EMPTY = "\uf244"; + inline const char* ICON_MOUSE_POINTER = "\uf245"; + inline const char* ICON_I_CURSOR = "\uf246"; + inline const char* ICON_OBJECT_GROUP = "\uf247"; + inline const char* ICON_OBJECT_UNGROUP = "\uf248"; + inline const char* ICON_STICKY_NOTE = "\uf249"; + inline const char* ICON_STICKY_NOTE_O = "\uf24a"; + inline const char* ICON_CC_JCB = "\uf24b"; + inline const char* ICON_CC_DINERS_CLUB = "\uf24c"; + inline const char* ICON_CLONE = "\uf24d"; + inline const char* ICON_BALANCE_SCALE = "\uf24e"; + inline const char* ICON_HOURGLASS_O = "\uf250"; + inline const char* ICON_HOURGLASS_START = "\uf251"; + inline const char* ICON_HOURGLASS_HALF = "\uf252"; + inline const char* ICON_HOURGLASS_END = "\uf253"; + inline const char* ICON_HOURGLASS = "\uf254"; + inline const char* ICON_HAND_ROCK_O = "\uf255"; + inline const char* ICON_HAND_PAPER_O = "\uf256"; + inline const char* ICON_HAND_SCISSORS_O = "\uf257"; + inline const char* ICON_HAND_LIZARD_O = "\uf258"; + inline const char* ICON_HAND_SPOCK_O = "\uf259"; + inline const char* ICON_HAND_POINTER_O = "\uf25a"; + inline const char* ICON_HAND_PEACE_O = "\uf25b"; + inline const char* ICON_TRADEMARK = "\uf25c"; + inline const char* ICON_REGISTERED = "\uf25d"; + inline const char* ICON_CREATIVE_COMMONS = "\uf25e"; + inline const char* ICON_GG = "\uf260"; + inline const char* ICON_GG_CIRCLE = "\uf261"; + inline const char* ICON_TRIPADVISOR = "\uf262"; + inline const char* ICON_ODNOKLASSNIKI = "\uf263"; + inline const char* ICON_ODNOKLASSNIKI_SQUARE = "\uf264"; + inline const char* ICON_GET_POCKET = "\uf265"; + inline const char* ICON_WIKIPEDIA_W = "\uf266"; + inline const char* ICON_SAFARI = "\uf267"; + inline const char* ICON_CHROME = "\uf268"; + inline const char* ICON_FIREFOX = "\uf269"; + inline const char* ICON_OPERA = "\uf26a"; + inline const char* ICON_INTERNET_EXPLORER = "\uf26b"; + inline const char* ICON_TELEVISION = "\uf26c"; + inline const char* ICON_CONTAO = "\uf26d"; + inline const char* ICON_500PX = "\uf26e"; + inline const char* ICON_AMAZON = "\uf270"; + inline const char* ICON_CALENDAR_PLUS_O = "\uf271"; + inline const char* ICON_CALENDAR_MINUS_O = "\uf272"; + inline const char* ICON_CALENDAR_TIMES_O = "\uf273"; + inline const char* ICON_CALENDAR_CHECK_O = "\uf274"; + inline const char* ICON_INDUSTRY = "\uf275"; + inline const char* ICON_MAP_PIN = "\uf276"; + inline const char* ICON_MAP_SIGNS = "\uf277"; + inline const char* ICON_MAP_O = "\uf278"; + inline const char* ICON_MAP = "\uf279"; + inline const char* ICON_COMMENTING = "\uf27a"; + inline const char* ICON_COMMENTING_O = "\uf27b"; + inline const char* ICON_HOUZZ = "\uf27c"; + inline const char* ICON_VIMEO = "\uf27d"; + inline const char* ICON_BLACK_TIE = "\uf27e"; + inline const char* ICON_FONTICONS = "\uf280"; + inline const char* ICON_REDDIT_ALIEN = "\uf281"; + inline const char* ICON_EDGE = "\uf282"; + inline const char* ICON_CREDIT_CARD_ALT = "\uf283"; + inline const char* ICON_CODIEPIE = "\uf284"; + inline const char* ICON_MODX = "\uf285"; + inline const char* ICON_FORT_AWESOME = "\uf286"; + inline const char* ICON_USB = "\uf287"; + inline const char* ICON_PRODUCT_HUNT = "\uf288"; + inline const char* ICON_MIXCLOUD = "\uf289"; + inline const char* ICON_SCRIBD = "\uf28a"; + inline const char* ICON_PAUSE_CIRCLE = "\uf28b"; + inline const char* ICON_PAUSE_CIRCLE_O = "\uf28c"; + inline const char* ICON_STOP_CIRCLE = "\uf28d"; + inline const char* ICON_STOP_CIRCLE_O = "\uf28e"; + inline const char* ICON_SHOPPING_BAG = "\uf290"; + inline const char* ICON_SHOPPING_BASKET = "\uf291"; + inline const char* ICON_HASHTAG = "\uf292"; + inline const char* ICON_BLUETOOTH = "\uf293"; + inline const char* ICON_BLUETOOTH_B = "\uf294"; + inline const char* ICON_PERCENT = "\uf295"; + inline const char* ICON_GITLAB = "\uf296"; + inline const char* ICON_WPBEGINNER = "\uf297"; + inline const char* ICON_WPFORMS = "\uf298"; + inline const char* ICON_ENVIRA = "\uf299"; + inline const char* ICON_UNIVERSAL_ACCESS = "\uf29a"; + inline const char* ICON_WHEELCHAIR_ALT = "\uf29b"; + inline const char* ICON_QUESTION_CIRCLE_O = "\uf29c"; + inline const char* ICON_BLIND = "\uf29d"; + inline const char* ICON_AUDIO_DESCRIPTION = "\uf29e"; + inline const char* ICON_VOLUME_CONTROL_PHONE = "\uf2a0"; + inline const char* ICON_BRAILLE = "\uf2a1"; + inline const char* ICON_ASSISTIVE_LISTENING_SYSTEMS = "\uf2a2"; + inline const char* ICON_AMERICAN_SIGN_LANGUAGE_INTERPRETING = "\uf2a3"; + inline const char* ICON_DEAF = "\uf2a4"; + inline const char* ICON_GLIDE = "\uf2a5"; + inline const char* ICON_GLIDE_G = "\uf2a6"; + inline const char* ICON_SIGN_LANGUAGE = "\uf2a7"; + inline const char* ICON_LOW_VISION = "\uf2a8"; + inline const char* ICON_VIADEO = "\uf2a9"; + inline const char* ICON_VIADEO_SQUARE = "\uf2aa"; + inline const char* ICON_SNAPCHAT = "\uf2ab"; + inline const char* ICON_SNAPCHAT_GHOST = "\uf2ac"; + inline const char* ICON_SNAPCHAT_SQUARE = "\uf2ad"; + inline const char* ICON_FIRST_ORDER = "\uf2b0"; + inline const char* ICON_YOAST = "\uf2b1"; + inline const char* ICON_THEMEISLE = "\uf2b2"; + inline const char* ICON_GOOGLE_PLUS_OFFICIAL = "\uf2b3"; + inline const char* ICON_FONT_AWESOME = "\uf2b4"; + inline const char* ICON_HANDSHAKE_O = "\uf2b5"; + inline const char* ICON_ENVELOPE_OPEN = "\uf2b6"; + inline const char* ICON_ENVELOPE_OPEN_O = "\uf2b7"; + inline const char* ICON_LINODE = "\uf2b8"; + inline const char* ICON_ADDRESS_BOOK = "\uf2b9"; + inline const char* ICON_ADDRESS_BOOK_O = "\uf2ba"; + inline const char* ICON_ADDRESS_CARD = "\uf2bb"; + inline const char* ICON_ADDRESS_CARD_O = "\uf2bc"; + inline const char* ICON_USER_CIRCLE = "\uf2bd"; + inline const char* ICON_USER_CIRCLE_O = "\uf2be"; + inline const char* ICON_USER_O = "\uf2c0"; + inline const char* ICON_ID_BADGE = "\uf2c1"; + inline const char* ICON_ID_CARD = "\uf2c2"; + inline const char* ICON_ID_CARD_O = "\uf2c3"; + inline const char* ICON_QUORA = "\uf2c4"; + inline const char* ICON_FREE_CODE_CAMP = "\uf2c5"; + inline const char* ICON_TELEGRAM = "\uf2c6"; + inline const char* ICON_THERMOMETER_FULL = "\uf2c7"; + inline const char* ICON_THERMOMETER_THREE_QUARTERS = "\uf2c8"; + inline const char* ICON_THERMOMETER_HALF = "\uf2c9"; + inline const char* ICON_THERMOMETER_QUARTER = "\uf2ca"; + inline const char* ICON_THERMOMETER_EMPTY = "\uf2cb"; + inline const char* ICON_SHOWER = "\uf2cc"; + inline const char* ICON_BATH = "\uf2cd"; + inline const char* ICON_PODCAST = "\uf2ce"; + inline const char* ICON_WINDOW_MAXIMIZE = "\uf2d0"; + inline const char* ICON_WINDOW_MINIMIZE = "\uf2d1"; + inline const char* ICON_WINDOW_RESTORE = "\uf2d2"; + inline const char* ICON_WINDOW_CLOSE = "\uf2d3"; + inline const char* ICON_WINDOW_CLOSE_O = "\uf2d4"; + inline const char* ICON_BANDCAMP = "\uf2d5"; + inline const char* ICON_GRAV = "\uf2d6"; + inline const char* ICON_ETSY = "\uf2d7"; + inline const char* ICON_IMDB = "\uf2d8"; + inline const char* ICON_RAVELRY = "\uf2d9"; + inline const char* ICON_EERCAST = "\uf2da"; + inline const char* ICON_MICROCHIP = "\uf2db"; + inline const char* ICON_SNOWFLAKE_O = "\uf2dc"; + inline const char* ICON_SUPERPOWERS = "\uf2dd"; + inline const char* ICON_WPEXPLORER = "\uf2de"; + inline const char* ICON_MEETUP = "\uf2e0"; + inline const char* ICON_MASTODON = "\uf2e1"; + inline const char* ICON_MASTODON_ALT = "\uf2e2"; + inline const char* ICON_FORK_AWESOME = "\uf2e3"; + inline const char* ICON_PEERTUBE = "\uf2e4"; + inline const char* ICON_DIASPORA = "\uf2e5"; + inline const char* ICON_FRIENDICA = "\uf2e6"; + inline const char* ICON_GNU_SOCIAL = "\uf2e7"; + inline const char* ICON_LIBERAPAY_SQUARE = "\uf2e8"; + inline const char* ICON_LIBERAPAY = "\uf2e9"; + inline const char* ICON_SCUTTLEBUTT = "\uf2ea"; + inline const char* ICON_HUBZILLA = "\uf2eb"; + inline const char* ICON_SOCIAL_HOME = "\uf2ec"; + inline const char* ICON_ARTSTATION = "\uf2ed"; + inline const char* ICON_DISCORD = "\uf2ee"; + inline const char* ICON_DISCORD_ALT = "\uf2ef"; + inline const char* ICON_PATREON = "\uf2f0"; + inline const char* ICON_SNOWDRIFT = "\uf2f1"; + inline const char* ICON_ACTIVITYPUB = "\uf2f2"; + inline const char* ICON_ETHEREUM = "\uf2f3"; + inline const char* ICON_KEYBASE = "\uf2f4"; + inline const char* ICON_SHAARLI = "\uf2f5"; + inline const char* ICON_SHAARLI_O = "\uf2f6"; + inline const char* ICON_KEY_MODERN = "\uf2f7"; + inline const char* ICON_XMPP = "\uf2f9"; + inline const char* ICON_ARCHIVE_ORG = "\uf2fc"; + inline const char* ICON_FREEDOMBOX = "\uf2fd"; + inline const char* ICON_FACEBOOK_MESSENGER = "\uf2fe"; + inline const char* ICON_DEBIAN = "\uf2ff"; + inline const char* ICON_MASTODON_SQUARE = "\uf300"; + inline const char* ICON_TIPEEE = "\uf301"; + inline const char* ICON_REACT = "\uf302"; + inline const char* ICON_DOGMAZIC = "\uf303"; + inline const char* ICON_NEXTCLOUD = "\uf306"; + inline const char* ICON_NEXTCLOUD_SQUARE = "\uf307"; +} // namespace Icon diff --git a/src/TMP/src/try_engine/gui/style/style.hpp b/src/TMP/src/try_engine/gui/style/style.hpp new file mode 100755 index 0000000..49d3090 --- /dev/null +++ b/src/TMP/src/try_engine/gui/style/style.hpp @@ -0,0 +1,82 @@ +#pragma once + +#include "imgui.h" + +#include "icons.hpp" +#include "fonts.hpp" + +namespace try_engine::style +{ + inline void init() + { + /* use this - https://www.unknowncheats.me/forum/c-and-c-/189635-imgui-style-settings.html */ + ImGuiStyle& st = ImGui::GetStyle(); + + st.WindowPadding = ImVec2(5.0f, 5.0f); + st.WindowRounding = 0.0f; + st.FramePadding = ImVec2(5.0f, 5.0f); + st.FrameRounding = 0.0f; + st.ItemSpacing = ImVec2(8.0f, 8.0f); + st.ItemInnerSpacing = ImVec2(8.0f, 6.0f); + st.IndentSpacing = 25.0f; + st.ScrollbarSize = 12.0f; + st.ScrollbarRounding = 0.0f; + st.GrabMinSize = 5.0f; + st.GrabRounding = 0.0f; + st.TabRounding = 0.0f; + st.WindowBorderSize = 0.0f; + st.ChildRounding = 0.0f; + st.PopupRounding = 0.0f; + st.PopupBorderSize = 0.0f; + st.WindowMenuButtonPosition = ImGuiDir_None; + + /* tab */ + st.Colors[ImGuiCol_Tab] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f); + st.Colors[ImGuiCol_TabHovered] = ImVec4(0.13f, 0.12f, 0.15f, 1.00f); + st.Colors[ImGuiCol_TabActive] = ImVec4(0.13f, 0.12f, 0.15f, 1.00f); + + /* title */ + st.Colors[ImGuiCol_TitleBg] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f); + st.Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f); + st.Colors[ImGuiCol_TitleBgActive] = ImVec4(0.07f, 0.07f, 0.09f, 1.00f); + + st.Colors[ImGuiCol_Text] = ImVec4(0.80f, 0.80f, 0.83f, 1.00f); + st.Colors[ImGuiCol_TextDisabled] = ImVec4(0.13f, 0.12f, 0.15f, 1.00f); + st.Colors[ImGuiCol_WindowBg] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f); + st.Colors[ImGuiCol_ChildBg] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f); + st.Colors[ImGuiCol_PopupBg] = ImVec4(0.07f, 0.07f, 0.09f, 1.00f); + st.Colors[ImGuiCol_Border] = ImVec4(0.80f, 0.80f, 0.83f, 0.88f); + st.Colors[ImGuiCol_BorderShadow] = ImVec4(0.92f, 0.91f, 0.88f, 0.00f); + st.Colors[ImGuiCol_FrameBg] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f); + st.Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.13f, 0.12f, 0.15f, 1.00f); + st.Colors[ImGuiCol_FrameBgActive] = ImVec4(0.13f, 0.12f, 0.15f, 1.00f); + st.Colors[ImGuiCol_MenuBarBg] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f); + st.Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f); + st.Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.80f, 0.80f, 0.83f, 0.31f); + st.Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.13f, 0.12f, 0.15f, 1.00f); + st.Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f); + st.Colors[ImGuiCol_CheckMark] = ImVec4(0.80f, 0.80f, 0.83f, 0.31f); + st.Colors[ImGuiCol_SliderGrab] = ImVec4(0.80f, 0.80f, 0.83f, 0.31f); + st.Colors[ImGuiCol_SliderGrabActive] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f); + st.Colors[ImGuiCol_Button] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f); + st.Colors[ImGuiCol_ButtonHovered] = ImVec4(0.13f, 0.12f, 0.15f, 1.00f); + st.Colors[ImGuiCol_ButtonActive] = ImVec4(0.13f, 0.12f, 0.15f, 1.00f); + st.Colors[ImGuiCol_Header] = ImVec4(0.13f, 0.12f, 0.15f, 1.00f); + st.Colors[ImGuiCol_HeaderActive] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f); + st.Colors[ImGuiCol_Separator] = ImVec4(0.13f, 0.12f, 0.15f, 1.00f); + st.Colors[ImGuiCol_SeparatorHovered] = ImVec4(0.13f, 0.12f, 0.15f, 1.00f); + st.Colors[ImGuiCol_SeparatorActive] = ImVec4(0.13f, 0.12f, 0.15f, 1.00f); + st.Colors[ImGuiCol_ResizeGrip] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f); + st.Colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.13f, 0.12f, 0.15f, 1.00f); + st.Colors[ImGuiCol_ResizeGripActive] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f); + st.Colors[ImGuiCol_PlotLines] = ImVec4(0.40f, 0.39f, 0.38f, 0.63f); + st.Colors[ImGuiCol_PlotLinesHovered] = ImVec4(0.25f, 1.00f, 0.00f, 1.00f); + st.Colors[ImGuiCol_PlotHistogram] = ImVec4(0.40f, 0.39f, 0.38f, 0.63f); + st.Colors[ImGuiCol_PlotHistogramHovered] = ImVec4(0.25f, 1.00f, 0.00f, 1.00f); + st.Colors[ImGuiCol_TextSelectedBg] = ImVec4(0.25f, 1.00f, 0.00f, 0.43f); + st.Colors[ImGuiCol_ModalWindowDimBg] = ImVec4(1.00f, 0.98f, 0.95f, 0.73f); + st.Colors[ImGuiCol_HeaderHovered] = ImVec4(0.13f, 0.12f, 0.15f, 1.00f); + + fonts::init(); + }; +}; diff --git a/src/TMP/src/try_engine/internal/fonts/FontAwesome/forkawesome-webfont.ttf b/src/TMP/src/try_engine/internal/fonts/FontAwesome/forkawesome-webfont.ttf new file mode 100755 index 0000000..42d2e35 Binary files /dev/null and b/src/TMP/src/try_engine/internal/fonts/FontAwesome/forkawesome-webfont.ttf differ diff --git a/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-Black.ttf b/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-Black.ttf new file mode 100755 index 0000000..7bb6575 Binary files /dev/null and b/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-Black.ttf differ diff --git a/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-BlackItalic.ttf b/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-BlackItalic.ttf new file mode 100755 index 0000000..172e249 Binary files /dev/null and b/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-BlackItalic.ttf differ diff --git a/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-Bold.ttf b/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-Bold.ttf new file mode 100755 index 0000000..efddc83 Binary files /dev/null and b/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-Bold.ttf differ diff --git a/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-BoldItalic.ttf b/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-BoldItalic.ttf new file mode 100755 index 0000000..b7d8031 Binary files /dev/null and b/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-BoldItalic.ttf differ diff --git a/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-ExtraBold.ttf b/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-ExtraBold.ttf new file mode 100755 index 0000000..3059507 Binary files /dev/null and b/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-ExtraBold.ttf differ diff --git a/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-ExtraBoldItalic.ttf b/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-ExtraBoldItalic.ttf new file mode 100755 index 0000000..c21a396 Binary files /dev/null and b/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-ExtraBoldItalic.ttf differ diff --git a/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-ExtraLight.ttf b/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-ExtraLight.ttf new file mode 100755 index 0000000..f1b405e Binary files /dev/null and b/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-ExtraLight.ttf differ diff --git a/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-ExtraLightItalic.ttf b/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-ExtraLightItalic.ttf new file mode 100755 index 0000000..382293d Binary files /dev/null and b/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-ExtraLightItalic.ttf differ diff --git a/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-Italic.ttf b/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-Italic.ttf new file mode 100755 index 0000000..eee45ba Binary files /dev/null and b/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-Italic.ttf differ diff --git a/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-Light.ttf b/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-Light.ttf new file mode 100755 index 0000000..c5dfdb7 Binary files /dev/null and b/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-Light.ttf differ diff --git a/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-LightItalic.ttf b/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-LightItalic.ttf new file mode 100755 index 0000000..5bdce7f Binary files /dev/null and b/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-LightItalic.ttf differ diff --git a/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-Medium.ttf b/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-Medium.ttf new file mode 100755 index 0000000..dfc7e2f Binary files /dev/null and b/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-Medium.ttf differ diff --git a/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-MediumItalic.ttf b/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-MediumItalic.ttf new file mode 100755 index 0000000..ce56883 Binary files /dev/null and b/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-MediumItalic.ttf differ diff --git a/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-Regular.ttf b/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-Regular.ttf new file mode 100755 index 0000000..aa9033a Binary files /dev/null and b/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-Regular.ttf differ diff --git a/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-SemiBold.ttf b/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-SemiBold.ttf new file mode 100755 index 0000000..cbf44db Binary files /dev/null and b/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-SemiBold.ttf differ diff --git a/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-SemiBoldItalic.ttf b/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-SemiBoldItalic.ttf new file mode 100755 index 0000000..7f9153d Binary files /dev/null and b/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-SemiBoldItalic.ttf differ diff --git a/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-Thin.ttf b/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-Thin.ttf new file mode 100755 index 0000000..7c90a54 Binary files /dev/null and b/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-Thin.ttf differ diff --git a/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-ThinItalic.ttf b/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-ThinItalic.ttf new file mode 100755 index 0000000..94bcf55 Binary files /dev/null and b/src/TMP/src/try_engine/internal/fonts/Montserrat/Montserrat-ThinItalic.ttf differ diff --git a/src/TMP/src/try_engine/layer/layer.hpp b/src/TMP/src/try_engine/layer/layer.hpp new file mode 100755 index 0000000..76f6f44 --- /dev/null +++ b/src/TMP/src/try_engine/layer/layer.hpp @@ -0,0 +1,27 @@ +#pragma once + +#include "try_engine/utils/utils.hpp" +#include "try_engine/event/system_event/event.hpp" + +namespace try_engine +{ + class layer + { + using time = time::timestep; + + public: + layer() = default; + virtual ~layer() = default; + + layer(const layer&) = delete; + layer(layer&) = delete; + + public: + virtual void on_attach() {}; + virtual void on_detach() {}; + virtual void gui_render() {}; + virtual void on_event(system_event::event&) {}; + virtual void on_event(std::any, std::any) {}; + }; +} + diff --git a/src/TMP/src/try_engine/meson.build b/src/TMP/src/try_engine/meson.build new file mode 100755 index 0000000..3f1cc93 --- /dev/null +++ b/src/TMP/src/try_engine/meson.build @@ -0,0 +1,32 @@ +headers = [ + 'application/application.hpp', + 'window/window.hpp', + 'window/graphic_context/graphic_context.hpp', + 'renderer/renderer.hpp', + 'renderer/texture/texture.hpp', + 'gui/gui.hpp', +] + +sources = [ + 'application/application.cpp', + 'window/window.cpp', + 'window/graphic_context/graphic_context.cpp', + 'renderer/renderer.cpp', + 'renderer/texture/texture.cpp', + 'gui/gui.cpp', +] + +lib = library( + 'try_engine', + include_directories : inc, + sources: [headers, sources], + dependencies : deps, + cpp_args: args +) + +try_engine_dep = declare_dependency( + include_directories: inc, + link_with: lib, +) + +deps += try_engine_dep diff --git a/src/TMP/src/try_engine/renderer/renderer.cpp b/src/TMP/src/try_engine/renderer/renderer.cpp new file mode 100755 index 0000000..1ea7107 --- /dev/null +++ b/src/TMP/src/try_engine/renderer/renderer.cpp @@ -0,0 +1,14 @@ +#include "renderer.hpp" + +namespace try_engine +{ + void renderer::set_color(const glm::vec4& color) + { + glClearColor(color.r, color.g, color.b, color.a); + } + + void renderer::clear() + { + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + } +} diff --git a/src/TMP/src/try_engine/renderer/renderer.hpp b/src/TMP/src/try_engine/renderer/renderer.hpp new file mode 100755 index 0000000..0ac941d --- /dev/null +++ b/src/TMP/src/try_engine/renderer/renderer.hpp @@ -0,0 +1,22 @@ +#pragma once + +#include "try_engine/utils/utils.hpp" + +/* +renderer - некий объект отрисовки и разукраски всей сцены. +Т.е. в нем все компоненты, которые нужны для создания на сцене чего-либо: +шейдера, шейдерные программы, буфера вершин, вспомогательные функции установки цвета и его очистки и т.п. + +Может использоваться в разных частях программы, где нужно что-то создать и отрисовать или перекрасить и удалить. +Относимся к этому, как к набору кисточек и ластиков при помощи которых что-то делаем на экране, рисуем или стираем. +*/ + +namespace try_engine +{ + class renderer + { + public: + static void set_color(const glm::vec4&); + static void clear(); + }; +} diff --git a/src/TMP/src/try_engine/renderer/texture/texture.cpp b/src/TMP/src/try_engine/renderer/texture/texture.cpp new file mode 100755 index 0000000..ad40785 --- /dev/null +++ b/src/TMP/src/try_engine/renderer/texture/texture.cpp @@ -0,0 +1,32 @@ +#include "texture.hpp" + +namespace try_engine +{ + texture::~texture() + { + glDeleteTextures(1, &m_texture_id); + } + + void texture::make() + { + if (!m_texture_id) + { + glGenTextures(1, &m_texture_id); + glBindTexture(GL_TEXTURE_2D, m_texture_id); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); + } + } + + void texture::clear() + { + glDeleteTextures(1, &m_texture_id); + } + + void texture::draw(ImVec2 pos, ImVec2 size) + { + // ImGui::Image(reinterpret_cast(static_cast(texture)), ImVec2(pos.x + 100, pos.y + 100)); + ImGui::GetWindowDrawList()->AddImage(reinterpret_cast(static_cast(m_texture_id)), pos, size); + } +} diff --git a/src/TMP/src/try_engine/renderer/texture/texture.hpp b/src/TMP/src/try_engine/renderer/texture/texture.hpp new file mode 100755 index 0000000..cdffce3 --- /dev/null +++ b/src/TMP/src/try_engine/renderer/texture/texture.hpp @@ -0,0 +1,31 @@ +#pragma once + +#include "try_engine/utils/utils.hpp" + +namespace try_engine +{ + class texture + { + public: + texture() = default; + ~texture(); + + private: + GLuint m_texture_id = 0; + + public: + template + void bind(Image& image) + { + // HERE наяинаем тут + // возможно эту штуку нужно делать сразу полсе make + // либо перенеси ее в make + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, image.cols, image.rows, 0, GL_RGBA, GL_UNSIGNED_BYTE, image.data); + } + + void draw(ImVec2 pos, ImVec2 size); + void make(); + void clear(); + }; +} + diff --git a/src/TMP/src/try_engine/try_engine.hpp b/src/TMP/src/try_engine/try_engine.hpp new file mode 100755 index 0000000..97bda57 --- /dev/null +++ b/src/TMP/src/try_engine/try_engine.hpp @@ -0,0 +1,17 @@ +#pragma once + +#include "try_engine/utils/utils.hpp" + +#include "try_engine/gui/gui.hpp" +#include "try_engine/gui/style/style.hpp" + +#include "try_engine/application/application.hpp" + +#include "try_engine/event/system_event/classificator.hpp" +#include "try_engine/event/system_event/event.hpp" +#include "try_engine/event/system_event/category/key_event.hpp" +#include "try_engine/event/system_event/category/window_event.hpp" +#include "try_engine/event/app_event/event.hpp" + +#include "try_engine/renderer/renderer.hpp" +#include "try_engine/renderer/texture/texture.hpp" diff --git a/src/TMP/src/try_engine/utils/define.hpp b/src/TMP/src/try_engine/utils/define.hpp new file mode 100755 index 0000000..8a8f1d0 --- /dev/null +++ b/src/TMP/src/try_engine/utils/define.hpp @@ -0,0 +1,85 @@ +#pragma once + +#define BIT(x)\ + (1 << x) + +#define EVENT_CLASS_TYPE_FN(type)\ + virtual std::string get_name() const override { return type; } + +#define BIND_EVENT_FN(app, x)\ + std::bind(&app::x, this, std::placeholders::_1) + +#define BASE_TYPE_DEFINE()\ + using time = try_engine::time::timestep;\ + using event_manager = try_engine::app_event::event;\ + using system_event = try_engine::system_event::event;\ + using win = try_engine::win + +#define BASE_WINDOW_FLAGS()\ + if (m_flags.m_no_titlebar) m_window_flags |= ImGuiWindowFlags_NoTitleBar;\ + if (m_flags.m_no_scrollbar) m_window_flags |= ImGuiWindowFlags_NoScrollbar;\ + if (!m_flags.m_no_menu) m_window_flags |= ImGuiWindowFlags_MenuBar;\ + if (m_flags.m_no_move) m_window_flags |= ImGuiWindowFlags_NoMove;\ + if (m_flags.m_no_resize) m_window_flags |= ImGuiWindowFlags_NoResize;\ + if (m_flags.m_no_collapse) m_window_flags |= ImGuiWindowFlags_NoCollapse;\ + if (m_flags.m_no_nav) m_window_flags |= ImGuiWindowFlags_NoNav;\ + if (m_flags.m_no_background) m_window_flags |= ImGuiWindowFlags_NoBackground;\ + if (m_flags.m_no_bring_to_front) m_window_flags |= ImGuiWindowFlags_NoBringToFrontOnFocus + +#define SET_EVENT_MANAGER_IMPL()\ + void set_event_manager(event_manager* in_event_manager)\ + {\ + m_event_manager = in_event_manager;\ + m_event_manager->set_event_callback(this);\ + } + +#define BASE_OVERIDE_IMPL()\ + void on_attach() override;\ + void on_detach() override;\ + void gui_render() override;\ + void on_event(system_event& e) override;\ + void on_event(std::any type, std::any value) override + +#define CONSTRUCT_IMPL(name)\ + name() : try_engine::layer() { BASE_WINDOW_FLAGS(); };\ + ~name() = default + +#define FLAGS_STRUCT_DEFINED()\ + struct flags\ + {\ + bool m_p_open = false;\ + bool m_no_titlebar = true;\ + bool m_no_scrollbar = true;\ + bool m_no_menu = true;\ + bool m_no_move = true;\ + bool m_no_resize = true;\ + bool m_no_collapse = true;\ + bool m_no_nav = false;\ + bool m_no_background = false;\ + bool m_no_bring_to_front = false;\ + bool m_no_docking = true;\ + } m_flags;\ + ImGuiWindowFlags m_window_flags = 0 + + +#define BASE_IMPL(name)\ + BASE_TYPE_DEFINE();\ + public:\ + CONSTRUCT_IMPL(name);\ + public:\ + BASE_OVERIDE_IMPL();\ + public:\ + SET_EVENT_MANAGER_IMPL();\ + private:\ + FLAGS_STRUCT_DEFINED();\ + private:\ + event_manager* m_event_manager;\ + win m_win + + +#define BEGIN_IMGUI_WIN() if (!ImGui::Begin(m_win.m_name.c_str(), &m_flags.m_p_open, m_window_flags)) ImGui::End() +#define END_IMGUI_WIN() ImGui::End() + +#define TR_PUSH_FONT(def_font, def_size)\ + ImGui::PushFont(try_engine::style::fonts::get_font(try_engine::style::fonts::font_type::def_font, def_size)) +#define TR_POP_FONT() ImGui::PopFont() diff --git a/src/TMP/src/try_engine/utils/include.hpp b/src/TMP/src/try_engine/utils/include.hpp new file mode 100755 index 0000000..58d2185 --- /dev/null +++ b/src/TMP/src/try_engine/utils/include.hpp @@ -0,0 +1,20 @@ +#pragma once + +#include +#include +#include +#include +#include +#include +#include + +#define GLFW_INCLUDE_NONE +#include "GLFW/glfw3.h" +#include "glad.h" +#include "glm/glm.hpp" +#include "hack/logger/logger.hpp" +#include "imgui.h" +#include "imgui_impl_glfw.h" +#include "imgui_impl_opengl3.h" + +#include "nlohmann/json.hpp" diff --git a/src/TMP/src/try_engine/utils/keycode.hpp b/src/TMP/src/try_engine/utils/keycode.hpp new file mode 100755 index 0000000..f4675f2 --- /dev/null +++ b/src/TMP/src/try_engine/utils/keycode.hpp @@ -0,0 +1,122 @@ +#pragma once + +#include + +namespace try_engine::key +{ + enum : uint16_t + { + // из glfw3.h + SPACE = 32, + APOSTROPHE = 39, /* ' */ + COMMA = 44, /* , */ + MINUS = 45, /* - */ + PERIOD = 46, /* . */ + SLASH = 47, /* / */ + + D0 = 48, /* 0 */ + D1 = 49, /* 1 */ + D2 = 50, /* 2 */ + D3 = 51, /* 3 */ + D4 = 52, /* 4 */ + D5 = 53, /* 5 */ + D6 = 54, /* 6 */ + D7 = 55, /* 7 */ + D8 = 56, /* 8 */ + D9 = 57, /* 9 */ + + SEMICOLON = 59, /* ; */ + EQUAL = 61, /* = */ + + A = 65, + B = 66, + C = 67, + D = 68, + E = 69, + F = 70, + G = 71, + H = 72, + I = 73, + J = 74, + K = 75, + L = 76, + M = 77, + N = 78, + O = 79, + P = 80, + Q = 81, + R = 82, + S = 83, + T = 84, + U = 85, + V = 86, + W = 87, + X = 88, + Y = 89, + Z = 90, + + LEFTBRACKET = 91, /* [ */ + BACKSLASH = 92, /* \ */ + RIGHTBRACKET = 93, /* ] */ + GRAVEACCENT = 96, /* ` */ + + WORLD1 = 161, /* non-US #1 */ + WORLD2 = 162, /* non-US #2 */ + + ESCAPE = 256, + ENTER = 257, + TAB = 258, + BACKSPACE = 259, + INSERT = 260, + DELETE = 261, + RIGHT = 262, + LEFT = 263, + DOWN = 264, + UP = 265, + PAGEUP = 266, + PAGEDOWN = 267, + HOME = 268, + END = 269, + CAPSLOCK = 280, + SCROLLLOCK = 281, + NUMLOCK = 282, + PRINTSCREEN = 283, + PAUSE = 284, + F1 = 290, + F2 = 291, + F3 = 292, + F4 = 293, + F5 = 294, + F6 = 295, + F7 = 296, + F8 = 297, + F9 = 298, + F10 = 299, + F11 = 300, + F12 = 301, + F13 = 302, + F14 = 303, + F15 = 304, + F16 = 305, + F17 = 306, + F18 = 307, + F19 = 308, + F20 = 309, + F21 = 310, + F22 = 311, + F23 = 312, + F24 = 313, + F25 = 314, + + LEFTSHIFT = 340, + LEFTCONTROL = 341, + LEFTALT = 342, + LEFTSUPER = 343, + RIGHTSHIFT = 344, + RIGHTCONTROL = 345, + RIGHTALT = 346, + RIGHTSUPER = 347, + MENU = 348 + }; +} + diff --git a/src/TMP/src/try_engine/utils/time.hpp b/src/TMP/src/try_engine/utils/time.hpp new file mode 100644 index 0000000..7058edf --- /dev/null +++ b/src/TMP/src/try_engine/utils/time.hpp @@ -0,0 +1,35 @@ +#pragma once + +#include "using.hpp" + +namespace try_engine::time +{ + template + class timestep + { + public: + timestep(Time data_ = 0.0f) : data { data_ } {} + + operator Time() const { return data; } + + Time get_seconds() const { return data; } + Time get_milliseconds() const { return data * 1000.0f; } + + private: + Time data; + }; +} + +namespace try_engine::time +{ + inline timestep get_time() + { + static float frame_time = 0.0f; + float t = (float)glfwGetTime(); + timestep ts = t - frame_time; + frame_time = t; + + return ts; + } +} + diff --git a/src/TMP/src/try_engine/utils/using.hpp b/src/TMP/src/try_engine/utils/using.hpp new file mode 100644 index 0000000..be81501 --- /dev/null +++ b/src/TMP/src/try_engine/utils/using.hpp @@ -0,0 +1,14 @@ +#pragma once + +#include "include.hpp" + +namespace try_engine +{ + template + using event_callback = std::function; + + using JSON = nlohmann::json; +} + + + diff --git a/src/TMP/src/try_engine/utils/utils.hpp b/src/TMP/src/try_engine/utils/utils.hpp new file mode 100644 index 0000000..096df16 --- /dev/null +++ b/src/TMP/src/try_engine/utils/utils.hpp @@ -0,0 +1,5 @@ +#pragma once + +#include "keycode.hpp" +#include "define.hpp" +#include "time.hpp" diff --git a/src/TMP/src/try_engine/window/graphic_context/graphic_context.cpp b/src/TMP/src/try_engine/window/graphic_context/graphic_context.cpp new file mode 100755 index 0000000..310e52c --- /dev/null +++ b/src/TMP/src/try_engine/window/graphic_context/graphic_context.cpp @@ -0,0 +1,27 @@ +#include "graphic_context.hpp" + +namespace try_engine +{ + graphic_context::graphic_context(GLFWwindow* w) : m_win { w } {} + + void graphic_context::init() + { + glfwMakeContextCurrent(m_win); + int status = gladLoadGLLoader((GLADloadproc)glfwGetProcAddress); + + hack::log(": ")("Glad loader status", status == 1 ? "true" : "false"); + hack::log(": ")("OpenGL Info"); + hack::log(": ")(" Vendor", glGetString(GL_VENDOR)); + hack::log(": ")(" Renderer", glGetString(GL_RENDERER)); + hack::log(": ")(" Version", glGetString(GL_VERSION)); + hack::log(": ")(" GLSL Version", glGetString(GL_SHADING_LANGUAGE_VERSION)); + + glfwSwapInterval(1); + } + + void graphic_context::swap_buffers() + { + glfwSwapBuffers(m_win); + } +} + diff --git a/src/TMP/src/try_engine/window/graphic_context/graphic_context.hpp b/src/TMP/src/try_engine/window/graphic_context/graphic_context.hpp new file mode 100755 index 0000000..b846097 --- /dev/null +++ b/src/TMP/src/try_engine/window/graphic_context/graphic_context.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "try_engine/utils/utils.hpp" + +namespace try_engine +{ + class graphic_context + { + public: + graphic_context(GLFWwindow*); + + private: + GLFWwindow* m_win; + + public: + void init(); + void swap_buffers(); + }; +} diff --git a/src/TMP/src/try_engine/window/window.cpp b/src/TMP/src/try_engine/window/window.cpp new file mode 100755 index 0000000..e382706 --- /dev/null +++ b/src/TMP/src/try_engine/window/window.cpp @@ -0,0 +1,205 @@ +#include "window.hpp" + +#include "renderer/renderer.hpp" +#include "event/system_event/category/key_event.hpp" +#include "event/system_event/category/window_event.hpp" + +namespace try_engine +{ + window::window(std::string app_name) + { + if (!glfwInit()) + exit(EXIT_FAILURE); + + m_window_data.m_name = app_name; + + set_hint(); + set_window(); + set_context(); + set_pointer(); + set_key_callback(); + set_window_callback(); + + hack::log(": ")("Creating window", m_window_data.m_name); + hack::log(" = ")("w", m_window_data.m_width); + hack::log(" = ")("h", m_window_data.m_height); + } + + window::~window() + { + glfwDestroyWindow(m_win); + glfwTerminate(); + hack::warn(": ")("destroy", "window", m_window_data.m_name); + } + + void window::set_hint() + { + glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4); + glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 5); + glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); + glfwWindowHint(GLFW_SAMPLES, 4); + } + + void window::set_window() + { + m_win = glfwCreateWindow( + glfwGetVideoMode(glfwGetPrimaryMonitor())->width, + glfwGetVideoMode(glfwGetPrimaryMonitor())->height, + m_window_data.m_name.c_str(), + nullptr, nullptr + ); + + if(m_win == NULL) + { + hack::error()("Failed to create GLFW window"); + glfwTerminate(); + exit(EXIT_FAILURE); + } + + glfwGetWindowSize(m_win, &m_window_data.m_width, &m_window_data.m_height); + } + + void window::set_context() + { + m_graphic_context = std::make_unique(m_win); + m_graphic_context->init(); + } + + void window::set_pointer() + { + glfwSetWindowUserPointer(m_win, &m_window_data); + } + + void window::set_event_callback(const event_callback& cb) + { + m_window_data.on_callback = cb; + } + + GLFWwindow* window::glfw_window() const + { + return m_win; + } + + int window::width() const + { + return m_window_data.m_width; + } + + int window::height() const + { + return m_window_data.m_height; + } + + void window::update() + { + glfwPollEvents(); + m_graphic_context->swap_buffers(); + } + + void window::clear() const + { + renderer::set_color({ 0.1f, 0.1f, 0.1f, 1 }); + renderer::clear(); + } + + void window::set_key_callback() + { + glfwSetKeyCallback(m_win, [](GLFWwindow* w, int key, int scancode, int action, int mods) + { + auto data = static_cast(glfwGetWindowUserPointer(w)); + + switch (action) + { + case GLFW_PRESS: + { + system_event::key_pressed_event e { key }; + data->on_callback(e); + break; + } + case GLFW_RELEASE: + { + system_event::key_released_event e { key }; + data->on_callback(e); + break; + } + case GLFW_REPEAT: + { + system_event::key_pressed_event e { key }; + data->on_callback(e); + break; + } + } + }); + + // HERE + // это нужнореализовать и в событиях + // там есть классы которые нужно разобрать и привести в порядок + // + // glfwSetMouseButtonCallback(win, [](GLFWwindow* window, int button, int action, int mods) + // { + // auto data = static_cast(glfwGetWindowUserPointer(w)); + // + // switch (action) + // { + // case GLFW_PRESS: + // { + // system_event::mouse_button_pressed_event e { button }; + // data->callback(e); + // break; + // } + // case GLFW_RELEASE: + // { + // MouseButtonReleasedEvent event{button}; + // data.EventCallback(event); + // break; + // } + // } + // }); + + // glfwSetScrollCallback(win, [](GLFWwindow* window, double xOffset, double yOffset) + // { + // WindowData& data = *(WindowData*)glfwGetWindowUserPointer(window); + // + // MouseScrolledEvent event{(float)xOffset, (float)yOffset}; + // data.EventCallback(event); + // }); + // + // glfwSetCursorPosCallback(win, [](GLFWwindow* window, double xPos, double yPos) + // { + // WindowData& data = *(WindowData*)glfwGetWindowUserPointer(window); + // + // MouseMovedEvent event{(float)xPos, (float)yPos}; + // data.EventCallback(event); + // }); + } + + void window::set_window_callback() + { + glfwSetWindowSizeLimits(m_win, m_window_data.m_width, m_window_data.m_height, GLFW_DONT_CARE, GLFW_DONT_CARE); + + glfwSetWindowSizeCallback(m_win, [](GLFWwindow* w, int width, int height) + { + auto data = static_cast(glfwGetWindowUserPointer(w)); + data->m_width = width; + data->m_height = height; + + system_event::window_resize_event e { width, height }; + data->on_callback(e); + }); + + glfwSetWindowCloseCallback(m_win, [](GLFWwindow* w) + { + auto data = static_cast(glfwGetWindowUserPointer(w)); + system_event::window_close_event e; + data->on_callback(e); + }); + + glfwSetWindowFocusCallback(m_win, [](GLFWwindow* w, int focused) + { + auto data = static_cast(glfwGetWindowUserPointer(w)); + system_event::window_focus_event e { focused }; + data->on_callback(e); + }); + } +} diff --git a/src/TMP/src/try_engine/window/window.hpp b/src/TMP/src/try_engine/window/window.hpp new file mode 100755 index 0000000..c6c0f5d --- /dev/null +++ b/src/TMP/src/try_engine/window/window.hpp @@ -0,0 +1,50 @@ +#pragma once + +#include "try_engine/utils/utils.hpp" +#include "graphic_context/graphic_context.hpp" +#include "try_engine/event/system_event/event.hpp" + +namespace try_engine +{ + class window + { + public: + window(std::string); + ~window(); + + // HERE + // реализовать остальные конструкторы + + private: + // ни каких unique_ptr тут неполучится + // т.к. glfwCreateWindow maloc-ом выделяет память + // что не есть хорошо для умных указателей + GLFWwindow* m_win; + std::unique_ptr m_graphic_context; + + struct window_data + { + std::string m_name; + int m_width, m_height; + event_callback on_callback; + } m_window_data; + + + public: + void update(); + GLFWwindow* glfw_window() const; + void clear() const ; + int width() const; + int height() const; + void set_event_callback(const event_callback&); + void set_window_callback(); + + private: + void set_hint(); + void set_window(); + void set_context(); + void set_pointer(); + void set_key_callback(); + }; +} + diff --git a/src/TMP/tests/meson.build b/src/TMP/tests/meson.build new file mode 100755 index 0000000..286efd7 --- /dev/null +++ b/src/TMP/tests/meson.build @@ -0,0 +1,11 @@ +# gtest_proj = subproject('gtest') +# gtest_dep = gtest_proj.get_variable('gtest_main_dep') +# +# test( +# 'hello', +# executable( +# 'hello', +# 'hello.cpp', +# dependencies: [ hello_dep, gtest_dep ] +# ) +# ) diff --git a/src/VE.hpp b/src/VE.hpp new file mode 100755 index 0000000..0d502b8 --- /dev/null +++ b/src/VE.hpp @@ -0,0 +1,14 @@ +#pragma once + +#include "utils/utils.hpp" + +#include "application/application.hpp" +#include "event/event.hpp" +#include "layer/layer.hpp" +#include "glfw/glfw.hpp" +#include "gui/gui.hpp" + +#include "gui/style/icons.hpp" +#include "gui/style/fonts.hpp" + +#include "opengl/opengl.hpp" diff --git a/src/application/application.cpp b/src/application/application.cpp new file mode 100755 index 0000000..d1a3091 --- /dev/null +++ b/src/application/application.cpp @@ -0,0 +1,55 @@ +#include "application.hpp" + +#include "utils/utils.hpp" + +namespace VE +{ + application::application(std::string app_name) : m_glfw{ std::make_unique() } + { + m_glfw->init(app_name); + m_glfw->set_event_fn(VE_EVENT_FN); + + m_gui = std::make_unique(m_glfw); + } + + void application::run() + { + glEnable(GL_DEPTH_TEST); + glClearColor(0.07f, 0.13f, 0.17f, 1.0f); + glViewport(0, 0, m_glfw->width(), m_glfw->height()); + + while(!glfwWindowShouldClose(m_glfw->get_win())) + { + m_glfw->clear(); + + m_gui->begin_frame(); + for (auto l : m_layers_stack) l->render(); + m_gui->end_frame(); + + m_glfw->update(); + } + } + + std::unique_ptr& application::get_glfw() + { + return m_glfw; + } + + void application::attach_layers() + { + for (auto l : m_layers_stack) l->on_attach(); + } + + void application::set_event_fn() + { + for (const auto l : m_layers_stack) l->set_event_fn(VE_EVENT_FN); + } + + void application::on_event(event& e) + { + if (e.is_parallele) + for (auto l : m_layers_stack) auto future = std::async(std::launch::async, [&]() { l->on_event(e); }); + else + for (auto l : m_layers_stack) l->on_event(e); + } +} diff --git a/src/application/application.hpp b/src/application/application.hpp new file mode 100755 index 0000000..16b8f93 --- /dev/null +++ b/src/application/application.hpp @@ -0,0 +1,42 @@ +#pragma once + +#include "glfw/glfw.hpp" +#include "gui/gui.hpp" +#include "layer/layer.hpp" + +namespace VE +{ + class application + { + public: + application(std::string app_name); + virtual ~application() = default; + + private: + std::unique_ptr m_glfw; + std::unique_ptr m_gui; + layers_stack m_layers_stack; + + public: + void run(); + std::unique_ptr& get_glfw(); + + public: + template + void push_layer(Args*... args) + { + (m_layers_stack.push_back(args), ...); + attach_layers(); + set_event_fn(); + } + + private: + void clear(); + void attach_layers(); + void set_event_fn(); + void on_event(event& e); + }; + + // реализация см. в проекте + application& create(); +} diff --git a/src/event/event.hpp b/src/event/event.hpp new file mode 100755 index 0000000..067f791 --- /dev/null +++ b/src/event/event.hpp @@ -0,0 +1,32 @@ +#pragma once + +#include "utils/utils.hpp" + +namespace VE +{ + enum class event_type + { + KEY_PRESSED, + KEY_RELEASED, + KEY_REPEATE, + + MOUSE_BUTTON_PRESSED, + MOUSE_BUTTON_RELEASED, + + MOUSE_CURSOR_POSITION, + MOUSE_SCROLL, + + WINDOW_RESIZE, + WINDOW_CLOSE, + WINDOW_FOCUS, + }; + + struct event + { + event(std::any t, std::any d) : m_type{ t }, m_data{ d } {} + ~event() = default; + std::any m_type; + std::any m_data; + bool is_parallele{ false }; + }; +} diff --git a/src/glfw/context/context.cpp b/src/glfw/context/context.cpp new file mode 100755 index 0000000..ed4b56d --- /dev/null +++ b/src/glfw/context/context.cpp @@ -0,0 +1,26 @@ +#include "context.hpp" + +namespace VE +{ + context::context(GLFWwindow* w) : m_win { w } + { + glfwMakeContextCurrent(m_win); + int status = gladLoadGLLoader((GLADloadproc)glfwGetProcAddress); + + hack::log(": ")("Glad loader status", status == 1 ? "Load" : "UNLOAD"); + hack::log(": ")("OpenGL Info"); + hack::log(": ")(" Vendor", glGetString(GL_VENDOR)); + hack::log(": ")(" Renderer", glGetString(GL_RENDERER)); + hack::log(": ")(" Version", glGetString(GL_VERSION)); + hack::log(": ")(" GLSL Version", glGetString(GL_SHADING_LANGUAGE_VERSION)); + + glfwSwapInterval(1); + + } + + void context::swap_buffers() + { + glfwSwapBuffers(m_win); + } +} + diff --git a/src/glfw/context/context.hpp b/src/glfw/context/context.hpp new file mode 100755 index 0000000..2ea952e --- /dev/null +++ b/src/glfw/context/context.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "utils/utils.hpp" + +namespace VE +{ + class context + { + public: + context(GLFWwindow* w); + + private: + GLFWwindow* m_win; + + public: + void init(); + void swap_buffers(); + }; +} diff --git a/src/glfw/glfw.cpp b/src/glfw/glfw.cpp new file mode 100755 index 0000000..9a761ff --- /dev/null +++ b/src/glfw/glfw.cpp @@ -0,0 +1,215 @@ +#include "glfw.hpp" + +// #include "renderer/renderer.hpp" +// #include "event/system_event/category/key_event.hpp" +// #include "event/system_event/category/window_event.hpp" + +namespace VE +{ + glfw::glfw() + { + if (!glfwInit()) + { + hack::error()("Not glfw window init"); + std::terminate(); + } + } + + glfw::~glfw() + { + hack::warn(": ")("Destroy glfw window", m_win_data.m_name); + glfwDestroyWindow(m_win); + glfwTerminate(); + } + + void glfw::init(std::string win_name) + { + m_win_data.m_name = win_name; + + set_hint(); + set_window(); + set_graphic_context(); + set_pointer(); + set_key_callback(); + set_mouse_callback(); + set_window_callback(); + + } + + void glfw::set_hint() + { + glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4); + glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 5); + glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); + glfwWindowHint(GLFW_SAMPLES, 4); + hack::log()("Set glfw window hint"); + } + + void glfw::set_window() + { + // два полследних nullptr + // первый - устанавливает монитор на ктором будетоткрытие(основной, дополнительнй) + // второй - делиться ли ресурсами с кем-то + m_win = glfwCreateWindow( + glfwGetVideoMode(glfwGetPrimaryMonitor())->width, + glfwGetVideoMode(glfwGetPrimaryMonitor())->height, + m_win_data.m_name.c_str(), + nullptr, nullptr + ); + + if(m_win == NULL) + { + hack::error()("Failed to create GLFW window"); + glfwTerminate(); + std::terminate(); + } + + glfwGetWindowSize(m_win, &m_win_data.m_width, &m_win_data.m_height); + + hack::log(": ")("Created glfw window", m_win_data.m_name); + hack::log(" = ")(" width", m_win_data.m_width); + hack::log(" = ")(" height", m_win_data.m_height); + } + + void glfw::set_graphic_context() + { + m_context = std::make_unique(m_win); + hack::log()("Set context"); + } + + void glfw::set_pointer() + { + glfwSetWindowUserPointer(m_win, &m_win_data); + } + + GLFWwindow* glfw::get_win() const + { + return m_win; + } + + int glfw::width() const + { + return m_win_data.m_width; + } + + int glfw::height() const + { + return m_win_data.m_height; + } + + void glfw::update() + { + glfwPollEvents(); + m_context->swap_buffers(); + } + + void glfw::clear() const + { + glClearColor(m_bgcolor.r, m_bgcolor.g, m_bgcolor.b, m_bgcolor.a); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + } + + void glfw::set_event_fn(const event_fn& fn) + { + m_win_data.execute = fn; + } + + void glfw::set_key_callback() + { + glfwSetKeyCallback(m_win, [](GLFWwindow* w, int key, int scancode, int action, int mods) + { + auto d = static_cast(glfwGetWindowUserPointer(w)); + event e{ action, key }; + + switch (action) + { + case GLFW_PRESS: + { + e.m_type = event_type::KEY_PRESSED; + break; + } + case GLFW_RELEASE: + { + e.m_type = event_type::KEY_RELEASED; + break; + } + case GLFW_REPEAT: + { + e.m_type = event_type::KEY_REPEATE; + break; + } + } + + d->execute(e); + }); + } + + void glfw::set_mouse_callback() + { + glfwSetMouseButtonCallback(m_win, [](GLFWwindow* w, int button, int action, int mods) + { + auto d = static_cast(glfwGetWindowUserPointer(w)); + event e{ action, button }; + + switch (action) + { + case GLFW_PRESS: + { + e.m_type = event_type::MOUSE_BUTTON_PRESSED; + break; + } + case GLFW_RELEASE: + { + e.m_type = event_type::MOUSE_BUTTON_RELEASED; + break; + } + } + + d->execute(e); + }); + + glfwSetScrollCallback(m_win, [](GLFWwindow* w, double xOffset, double yOffset) + { + auto d = static_cast(glfwGetWindowUserPointer(w)); + event e{ event_type::MOUSE_SCROLL, std::pair{ static_cast(xOffset), static_cast(yOffset) } }; + d->execute(e); + }); + + glfwSetCursorPosCallback(m_win, [](GLFWwindow* w, double xPos, double yPos) + { + auto d = static_cast(glfwGetWindowUserPointer(w)); + event e{ event_type::MOUSE_CURSOR_POSITION, std::pair{ static_cast(xPos), static_cast(yPos) } }; + d->execute(e); + }); + } + + void glfw::set_window_callback() + { + glfwSetWindowSizeLimits(m_win, m_win_data.m_width, m_win_data.m_height, GLFW_DONT_CARE, GLFW_DONT_CARE); + + glfwSetWindowSizeCallback(m_win, [](GLFWwindow* w, int width, int height) + { + auto d = static_cast(glfwGetWindowUserPointer(w)); + d->m_width = width; + d->m_height = height; + + event e{ event_type::WINDOW_RESIZE, std::pair{ static_cast(width), static_cast(height) } }; + d->execute(e); + }); + + glfwSetWindowCloseCallback(m_win, [](GLFWwindow* w) + { + auto d = static_cast(glfwGetWindowUserPointer(w)); + event e{ event_type::WINDOW_CLOSE, nullptr }; + d->execute(e); + }); + + glfwSetWindowFocusCallback(m_win, [](GLFWwindow* w, int focused) + { + auto d = static_cast(glfwGetWindowUserPointer(w)); + event e{ event_type::WINDOW_FOCUS, focused }; + d->execute(e); + }); + } +} diff --git a/src/glfw/glfw.hpp b/src/glfw/glfw.hpp new file mode 100755 index 0000000..752faf4 --- /dev/null +++ b/src/glfw/glfw.hpp @@ -0,0 +1,55 @@ +#pragma once + +#include "utils/utils.hpp" +#include "context/context.hpp" +#include "event/event.hpp" + +namespace VE +{ + class glfw + { + public: + // HERE + // реализовать остальные конструкторы + glfw(); + ~glfw(); + + + private: + // ни каких unique_ptr тут не получится + // т.к. glfwCreateWindow maloc-ом выделяет память + // что не есть хорошо для умных указателей + GLFWwindow* m_win; + std::unique_ptr m_context; + mt::vec4 m_bgcolor = { 0.1f, 0.1f, 0.1f, 1.f }; + + struct win_data + { + std::string m_name; + int m_width, m_height; + event_fn execute; // в using.hpp + } m_win_data; + + public: + void init(std::string win_name); + + GLFWwindow* get_win() const; + int width() const; + int height() const; + + void update(); + void clear() const; + + void set_event_fn(const event_fn& fn); + + private: + void set_hint(); + void set_window(); + void set_graphic_context(); + void set_pointer(); + void set_key_callback(); + void set_mouse_callback(); + void set_window_callback(); + }; +} + diff --git a/src/gui/flags.hpp b/src/gui/flags.hpp new file mode 100644 index 0000000..483bcc5 --- /dev/null +++ b/src/gui/flags.hpp @@ -0,0 +1,38 @@ +#pragma once + +#include "utils/utils.hpp" + +namespace VE +{ + struct flags + { + flags() + { + if (m_no_titlebar) m_window_flags |= ImGuiWindowFlags_NoTitleBar; + if (m_no_scrollbar) m_window_flags |= ImGuiWindowFlags_NoScrollbar; + if (!m_no_menu) m_window_flags |= ImGuiWindowFlags_MenuBar; + if (m_no_move) m_window_flags |= ImGuiWindowFlags_NoMove; + if (m_no_resize) m_window_flags |= ImGuiWindowFlags_NoResize; + if (m_no_collapse) m_window_flags |= ImGuiWindowFlags_NoCollapse; + if (m_no_nav) m_window_flags |= ImGuiWindowFlags_NoNav; + if (m_no_background) m_window_flags |= ImGuiWindowFlags_NoBackground; + if (m_no_bring_to_front) m_window_flags |= ImGuiWindowFlags_NoBringToFrontOnFocus; + } + + virtual ~flags() = default; + + bool m_p_open = false; + bool m_no_titlebar = true; + bool m_no_scrollbar = true; + bool m_no_menu = true; + bool m_no_move = true; + bool m_no_resize = true; + bool m_no_collapse = true; + bool m_no_nav = false; + bool m_no_background = false; + bool m_no_bring_to_front = false; + bool m_no_docking = true; + + ImGuiWindowFlags m_window_flags = 0; + }; +} diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp new file mode 100755 index 0000000..0b03c78 --- /dev/null +++ b/src/gui/gui.cpp @@ -0,0 +1,54 @@ +#include "gui.hpp" + +#include "style/style.hpp" + +namespace VE +{ + gui::gui(std::unique_ptr& g) : m_glfw { g } + { + ImGui::CreateContext(); + ImGui::StyleColorsDark(); + + ImGuiIO& io = ImGui::GetIO(); (void)io; + io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; + io.IniFilename = nullptr; + + ImGuiStyle& style = ImGui::GetStyle(); + if (io.ConfigFlags) + { + style.WindowRounding = 0.0f; + style.Colors[ImGuiCol_WindowBg].w = 1.0f; + } + + GLFWwindow* window = m_glfw->get_win(); + ImGui_ImplGlfw_InitForOpenGL(window, true); + ImGui_ImplOpenGL3_Init("#version 410"); + + style::init(); + } + + gui::~gui() + { + ImGui_ImplOpenGL3_Shutdown(); + ImGui_ImplGlfw_Shutdown(); + ImGui::DestroyContext(); + } + + void gui::begin_frame() + { + ImGui_ImplOpenGL3_NewFrame(); + ImGui_ImplGlfw_NewFrame(); + ImGui::NewFrame(); + } + + void gui::end_frame() + { + ImGuiIO& io = ImGui::GetIO(); + io.DisplaySize = ImVec2((float)m_glfw->width(), (float)m_glfw->height()); + + ImGui::Render(); + ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData()); + } +} + + diff --git a/src/gui/gui.hpp b/src/gui/gui.hpp new file mode 100755 index 0000000..490e124 --- /dev/null +++ b/src/gui/gui.hpp @@ -0,0 +1,21 @@ +#pragma once + +#include "utils/utils.hpp" +#include "glfw/glfw.hpp" + +namespace VE +{ + class gui + { + public: + gui(std::unique_ptr& g); + ~gui(); + + public: + void begin_frame(); + void end_frame(); + + private: + std::unique_ptr& m_glfw; + }; +} diff --git a/src/gui/style/fonts.hpp b/src/gui/style/fonts.hpp new file mode 100755 index 0000000..4b1e8a0 --- /dev/null +++ b/src/gui/style/fonts.hpp @@ -0,0 +1,99 @@ +#pragma once + +#include +#include +#include + +#include "imgui.h" + +#include "icons.hpp" + +#include "utils/utils.hpp" + +namespace VE::style::fonts +{ + inline std::string font_name = "/Montserrat/Montserrat-"; + inline std::vector font_size = { 8.f, 9.f, 10.f, 11.f, 12.f, 13.f, 14.f, 15.f, 16.f, 17.f, 18.f, 19.f, 20.f, 21.f, 22.f }; + + enum font_type + { + BOLD, BOLD_ITALIC, EXTRA_BOLD, EXTRA_BOLD_ITALIC, EXTRA_LIGHT, EXTRA_LIGHT_ITALIC, + ITALIC, LIGHT, LIGHT_ITALIC, MEDIUM, MEDIUM_ITALIC, REGULAR, SEMI_BOLD, SEMI_BOLD_ITALIC, THIN, THIN_ITALIC, ICON + }; + + inline std::vector fonts_path + { + var::FONT_PATH + font_name + "Bold.ttf", + var::FONT_PATH + font_name + "BoldItalic.ttf", + + var::FONT_PATH + font_name + "ExtraBold.ttf", + var::FONT_PATH + font_name + "ExtraBoldItalic.ttf", + + var::FONT_PATH + font_name + "ExtraLight.ttf", + var::FONT_PATH + font_name + "ExtraLightItalic.ttf", + + var::FONT_PATH + font_name + "Italic.ttf", + + var::FONT_PATH + font_name + "Light.ttf", + var::FONT_PATH + font_name + "LightItalic.ttf", + + var::FONT_PATH + font_name + "Medium.ttf", + var::FONT_PATH + font_name + "MediumItalic.ttf", + + var::FONT_PATH + font_name + "Regular.ttf", + + var::FONT_PATH + font_name + "SemiBold.ttf", + var::FONT_PATH + font_name + "SemiBoldItalic.ttf", + + var::FONT_PATH + font_name + "Thin.ttf", + var::FONT_PATH + font_name + "ThinItalic.ttf" + }; + + inline std::map font_step + { + { font_type::BOLD, 0 }, + { font_type::BOLD_ITALIC, 15 }, + { font_type::EXTRA_BOLD, 30 }, + { font_type::EXTRA_BOLD_ITALIC, 45 }, + { font_type::EXTRA_LIGHT, 60 }, + { font_type::EXTRA_LIGHT_ITALIC, 75 }, + { font_type::ITALIC, 90 }, + { font_type::LIGHT, 105 }, + { font_type::LIGHT_ITALIC, 120 }, + { font_type::MEDIUM, 135 }, + { font_type::MEDIUM_ITALIC, 150 }, + { font_type::REGULAR, 165 }, + { font_type::SEMI_BOLD, 180 }, + { font_type::SEMI_BOLD_ITALIC, 195 }, + { font_type::THIN, 210 }, + { font_type::THIN_ITALIC, 225 }, + { font_type::ICON, 240 }, + }; + + inline void init() + { + ImGuiIO& io = ImGui::GetIO(); + + for (auto& p : fonts_path) + for (auto size : font_size) + io.Fonts->AddFontFromFileTTF(p.c_str(), size, NULL, io.Fonts->GetGlyphRangesCyrillic()); + + // add icon font size + static const ImWchar icon_ranges[] = { ICON_MIN_FK, ICON_MAX_FK, 0 }; + for (auto size : font_size) + io.Fonts->AddFontFromFileTTF(var::ICONS_PATH.c_str(), size, NULL, icon_ranges); + }; + + inline ImFont* get_font(font_type type = font_type::REGULAR, int size = 16) + { + if (size < 0) size = 8; + if (size > 33) size = 33; + size -= 8; // т.к. font_size начинается с 8.f + + ImGuiIO& io = ImGui::GetIO(); + ImFontAtlas* atlas = io.Fonts; + + auto pos = font_step[type] + size; + return atlas->Fonts[pos]; + }; +} diff --git a/src/gui/style/fonts/FontAwesome/forkawesome-webfont.ttf b/src/gui/style/fonts/FontAwesome/forkawesome-webfont.ttf new file mode 100755 index 0000000..42d2e35 Binary files /dev/null and b/src/gui/style/fonts/FontAwesome/forkawesome-webfont.ttf differ diff --git a/src/gui/style/fonts/Montserrat/Montserrat-Black.ttf b/src/gui/style/fonts/Montserrat/Montserrat-Black.ttf new file mode 100755 index 0000000..7bb6575 Binary files /dev/null and b/src/gui/style/fonts/Montserrat/Montserrat-Black.ttf differ diff --git a/src/gui/style/fonts/Montserrat/Montserrat-BlackItalic.ttf b/src/gui/style/fonts/Montserrat/Montserrat-BlackItalic.ttf new file mode 100755 index 0000000..172e249 Binary files /dev/null and b/src/gui/style/fonts/Montserrat/Montserrat-BlackItalic.ttf differ diff --git a/src/gui/style/fonts/Montserrat/Montserrat-Bold.ttf b/src/gui/style/fonts/Montserrat/Montserrat-Bold.ttf new file mode 100755 index 0000000..efddc83 Binary files /dev/null and b/src/gui/style/fonts/Montserrat/Montserrat-Bold.ttf differ diff --git a/src/gui/style/fonts/Montserrat/Montserrat-BoldItalic.ttf b/src/gui/style/fonts/Montserrat/Montserrat-BoldItalic.ttf new file mode 100755 index 0000000..b7d8031 Binary files /dev/null and b/src/gui/style/fonts/Montserrat/Montserrat-BoldItalic.ttf differ diff --git a/src/gui/style/fonts/Montserrat/Montserrat-ExtraBold.ttf b/src/gui/style/fonts/Montserrat/Montserrat-ExtraBold.ttf new file mode 100755 index 0000000..3059507 Binary files /dev/null and b/src/gui/style/fonts/Montserrat/Montserrat-ExtraBold.ttf differ diff --git a/src/gui/style/fonts/Montserrat/Montserrat-ExtraBoldItalic.ttf b/src/gui/style/fonts/Montserrat/Montserrat-ExtraBoldItalic.ttf new file mode 100755 index 0000000..c21a396 Binary files /dev/null and b/src/gui/style/fonts/Montserrat/Montserrat-ExtraBoldItalic.ttf differ diff --git a/src/gui/style/fonts/Montserrat/Montserrat-ExtraLight.ttf b/src/gui/style/fonts/Montserrat/Montserrat-ExtraLight.ttf new file mode 100755 index 0000000..f1b405e Binary files /dev/null and b/src/gui/style/fonts/Montserrat/Montserrat-ExtraLight.ttf differ diff --git a/src/gui/style/fonts/Montserrat/Montserrat-ExtraLightItalic.ttf b/src/gui/style/fonts/Montserrat/Montserrat-ExtraLightItalic.ttf new file mode 100755 index 0000000..382293d Binary files /dev/null and b/src/gui/style/fonts/Montserrat/Montserrat-ExtraLightItalic.ttf differ diff --git a/src/gui/style/fonts/Montserrat/Montserrat-Italic.ttf b/src/gui/style/fonts/Montserrat/Montserrat-Italic.ttf new file mode 100755 index 0000000..eee45ba Binary files /dev/null and b/src/gui/style/fonts/Montserrat/Montserrat-Italic.ttf differ diff --git a/src/gui/style/fonts/Montserrat/Montserrat-Light.ttf b/src/gui/style/fonts/Montserrat/Montserrat-Light.ttf new file mode 100755 index 0000000..c5dfdb7 Binary files /dev/null and b/src/gui/style/fonts/Montserrat/Montserrat-Light.ttf differ diff --git a/src/gui/style/fonts/Montserrat/Montserrat-LightItalic.ttf b/src/gui/style/fonts/Montserrat/Montserrat-LightItalic.ttf new file mode 100755 index 0000000..5bdce7f Binary files /dev/null and b/src/gui/style/fonts/Montserrat/Montserrat-LightItalic.ttf differ diff --git a/src/gui/style/fonts/Montserrat/Montserrat-Medium.ttf b/src/gui/style/fonts/Montserrat/Montserrat-Medium.ttf new file mode 100755 index 0000000..dfc7e2f Binary files /dev/null and b/src/gui/style/fonts/Montserrat/Montserrat-Medium.ttf differ diff --git a/src/gui/style/fonts/Montserrat/Montserrat-MediumItalic.ttf b/src/gui/style/fonts/Montserrat/Montserrat-MediumItalic.ttf new file mode 100755 index 0000000..ce56883 Binary files /dev/null and b/src/gui/style/fonts/Montserrat/Montserrat-MediumItalic.ttf differ diff --git a/src/gui/style/fonts/Montserrat/Montserrat-Regular.ttf b/src/gui/style/fonts/Montserrat/Montserrat-Regular.ttf new file mode 100755 index 0000000..aa9033a Binary files /dev/null and b/src/gui/style/fonts/Montserrat/Montserrat-Regular.ttf differ diff --git a/src/gui/style/fonts/Montserrat/Montserrat-SemiBold.ttf b/src/gui/style/fonts/Montserrat/Montserrat-SemiBold.ttf new file mode 100755 index 0000000..cbf44db Binary files /dev/null and b/src/gui/style/fonts/Montserrat/Montserrat-SemiBold.ttf differ diff --git a/src/gui/style/fonts/Montserrat/Montserrat-SemiBoldItalic.ttf b/src/gui/style/fonts/Montserrat/Montserrat-SemiBoldItalic.ttf new file mode 100755 index 0000000..7f9153d Binary files /dev/null and b/src/gui/style/fonts/Montserrat/Montserrat-SemiBoldItalic.ttf differ diff --git a/src/gui/style/fonts/Montserrat/Montserrat-Thin.ttf b/src/gui/style/fonts/Montserrat/Montserrat-Thin.ttf new file mode 100755 index 0000000..7c90a54 Binary files /dev/null and b/src/gui/style/fonts/Montserrat/Montserrat-Thin.ttf differ diff --git a/src/gui/style/fonts/Montserrat/Montserrat-ThinItalic.ttf b/src/gui/style/fonts/Montserrat/Montserrat-ThinItalic.ttf new file mode 100755 index 0000000..94bcf55 Binary files /dev/null and b/src/gui/style/fonts/Montserrat/Montserrat-ThinItalic.ttf differ diff --git a/src/gui/style/icons.hpp b/src/gui/style/icons.hpp new file mode 100755 index 0000000..77d2dd3 --- /dev/null +++ b/src/gui/style/icons.hpp @@ -0,0 +1,719 @@ +#pragma once + +// for use with https://github.com/ForkAwesome/Fork-Awesome/blob/master/fonts/forkawesome-webfont.ttf +#define ICON_MIN_FK 0xf000 +#define ICON_MAX_FK 0xf307 + +namespace VE::style::icon +{ + inline const char* ICON_GLASS = "\uf000"; + inline const char* ICON_MUSIC = "\uf001"; + inline const char* ICON_SEARCH = "\uf002"; + inline const char* ICON_ENVELOPE_O = "\uf003"; + inline const char* ICON_HEART = "\uf004"; + inline const char* ICON_STAR = "\uf005"; + inline const char* ICON_STAR_O = "\uf006"; + inline const char* ICON_USER = "\uf007"; + inline const char* ICON_FILM = "\uf008"; + inline const char* ICON_TH_LARGE = "\uf009"; + inline const char* ICON_TH = "\uf00a"; + inline const char* ICON_TH_LIST = "\uf00b"; + inline const char* ICON_CHECK = "\uf00c"; + inline const char* ICON_TIMES = "\uf00d"; + inline const char* ICON_SEARCH_PLUS = "\uf00e"; + inline const char* ICON_SEARCH_MINUS = "\uf010"; + inline const char* ICON_POWER_OFF = "\uf011"; + inline const char* ICON_SIGNAL = "\uf012"; + inline const char* ICON_COG = "\uf013"; + inline const char* ICON_TRASH_O = "\uf014"; + inline const char* ICON_HOME = "\uf015"; + inline const char* ICON_FILE_O = "\uf016"; + inline const char* ICON_CLOCK_O = "\uf017"; + inline const char* ICON_ROAD = "\uf018"; + inline const char* ICON_DOWNLOAD = "\uf019"; + inline const char* ICON_ARROW_CIRCLE_O_DOWN = "\uf01a"; + inline const char* ICON_ARROW_CIRCLE_O_UP = "\uf01b"; + inline const char* ICON_INBOX = "\uf01c"; + inline const char* ICON_PLAY_CIRCLE_O = "\uf01d"; + inline const char* ICON_REPEAT = "\uf01e"; + inline const char* ICON_REFRESH = "\uf021"; + inline const char* ICON_LIST_ALT = "\uf022"; + inline const char* ICON_LOCK = "\uf023"; + inline const char* ICON_FLAG = "\uf024"; + inline const char* ICON_HEADPHONES = "\uf025"; + inline const char* ICON_VOLUME_OFF = "\uf026"; + inline const char* ICON_VOLUME_DOWN = "\uf027"; + inline const char* ICON_VOLUME_UP = "\uf028"; + inline const char* ICON_QRCODE = "\uf029"; + inline const char* ICON_BARCODE = "\uf02a"; + inline const char* ICON_TAG = "\uf02b"; + inline const char* ICON_TAGS = "\uf02c"; + inline const char* ICON_BOOK = "\uf02d"; + inline const char* ICON_BOOKMARK = "\uf02e"; + inline const char* ICON_PRINT = "\uf02f"; + inline const char* ICON_CAMERA = "\uf030"; + inline const char* ICON_FONT = "\uf031"; + inline const char* ICON_BOLD = "\uf032"; + inline const char* ICON_ITALIC = "\uf033"; + inline const char* ICON_TEXT_HEIGHT = "\uf034"; + inline const char* ICON_TEXT_WIDTH = "\uf035"; + inline const char* ICON_ALIGN_LEFT = "\uf036"; + inline const char* ICON_ALIGN_CENTER = "\uf037"; + inline const char* ICON_ALIGN_RIGHT = "\uf038"; + inline const char* ICON_ALIGN_JUSTIFY = "\uf039"; + inline const char* ICON_LIST = "\uf03a"; + inline const char* ICON_OUTDENT = "\uf03b"; + inline const char* ICON_INDENT = "\uf03c"; + inline const char* ICON_VIDEO_CAMERA = "\uf03d"; + inline const char* ICON_PICTURE_O = "\uf03e"; + inline const char* ICON_PENCIL = "\uf040"; + inline const char* ICON_MAP_MARKER = "\uf041"; + inline const char* ICON_ADJUST = "\uf042"; + inline const char* ICON_TINT = "\uf043"; + inline const char* ICON_PENCIL_SQUARE_O = "\uf044"; + inline const char* ICON_SHARE_SQUARE_O = "\uf045"; + inline const char* ICON_CHECK_SQUARE_O = "\uf046"; + inline const char* ICON_ARROWS = "\uf047"; + inline const char* ICON_STEP_BACKWARD = "\uf048"; + inline const char* ICON_FAST_BACKWARD = "\uf049"; + inline const char* ICON_BACKWARD = "\uf04a"; + inline const char* ICON_PLAY = "\uf04b"; + inline const char* ICON_PAUSE = "\uf04c"; + inline const char* ICON_STOP = "\uf04d"; + inline const char* ICON_FORWARD = "\uf04e"; + inline const char* ICON_FAST_FORWARD = "\uf050"; + inline const char* ICON_STEP_FORWARD = "\uf051"; + inline const char* ICON_EJECT = "\uf052"; + inline const char* ICON_CHEVRON_LEFT = "\uf053"; + inline const char* ICON_CHEVRON_RIGHT = "\uf054"; + inline const char* ICON_PLUS_CIRCLE = "\uf055"; + inline const char* ICON_MINUS_CIRCLE = "\uf056"; + inline const char* ICON_TIMES_CIRCLE = "\uf057"; + inline const char* ICON_CHECK_CIRCLE = "\uf058"; + inline const char* ICON_QUESTION_CIRCLE = "\uf059"; + inline const char* ICON_INFO_CIRCLE = "\uf05a"; + inline const char* ICON_CROSSHAIRS = "\uf05b"; + inline const char* ICON_TIMES_CIRCLE_O = "\uf05c"; + inline const char* ICON_CHECK_CIRCLE_O = "\uf05d"; + inline const char* ICON_BAN = "\uf05e"; + inline const char* ICON_ARROW_LEFT = "\uf060"; + inline const char* ICON_ARROW_RIGHT = "\uf061"; + inline const char* ICON_ARROW_UP = "\uf062"; + inline const char* ICON_ARROW_DOWN = "\uf063"; + inline const char* ICON_SHARE = "\uf064"; + inline const char* ICON_EXPAND = "\uf065"; + inline const char* ICON_COMPRESS = "\uf066"; + inline const char* ICON_PLUS = "\uf067"; + inline const char* ICON_MINUS = "\uf068"; + inline const char* ICON_ASTERISK = "\uf069"; + inline const char* ICON_EXCLAMATION_CIRCLE = "\uf06a"; + inline const char* ICON_GIFT = "\uf06b"; + inline const char* ICON_LEAF = "\uf06c"; + inline const char* ICON_FIRE = "\uf06d"; + inline const char* ICON_EYE = "\uf06e"; + inline const char* ICON_EYE_SLASH = "\uf070"; + inline const char* ICON_EXCLAMATION_TRIANGLE = "\uf071"; + inline const char* ICON_PLANE = "\uf072"; + inline const char* ICON_CALENDAR = "\uf073"; + inline const char* ICON_RANDOM = "\uf074"; + inline const char* ICON_COMMENT = "\uf075"; + inline const char* ICON_MAGNET = "\uf076"; + inline const char* ICON_CHEVRON_UP = "\uf077"; + inline const char* ICON_CHEVRON_DOWN = "\uf078"; + inline const char* ICON_RETWEET = "\uf079"; + inline const char* ICON_SHOPPING_CART = "\uf07a"; + inline const char* ICON_FOLDER = "\uf07b"; + inline const char* ICON_FOLDER_OPEN = "\uf07c"; + inline const char* ICON_ARROWS_V = "\uf07d"; + inline const char* ICON_ARROWS_H = "\uf07e"; + inline const char* ICON_BAR_CHART = "\uf080"; + inline const char* ICON_TWITTER_SQUARE = "\uf081"; + inline const char* ICON_FACEBOOK_SQUARE = "\uf082"; + inline const char* ICON_CAMERA_RETRO = "\uf083"; + inline const char* ICON_KEY = "\uf084"; + inline const char* ICON_COGS = "\uf085"; + inline const char* ICON_COMMENTS = "\uf086"; + inline const char* ICON_THUMBS_O_UP = "\uf087"; + inline const char* ICON_THUMBS_O_DOWN = "\uf088"; + inline const char* ICON_STAR_HALF = "\uf089"; + inline const char* ICON_HEART_O = "\uf08a"; + inline const char* ICON_SIGN_OUT = "\uf08b"; + inline const char* ICON_LINKEDIN_SQUARE = "\uf08c"; + inline const char* ICON_THUMB_TACK = "\uf08d"; + inline const char* ICON_INLINEAL_LINK = "\uf08e"; + inline const char* ICON_SIGN_IN = "\uf090"; + inline const char* ICON_TROPHY = "\uf091"; + inline const char* ICON_GITHUB_SQUARE = "\uf092"; + inline const char* ICON_UPLOAD = "\uf093"; + inline const char* ICON_LEMON_O = "\uf094"; + inline const char* ICON_PHONE = "\uf095"; + inline const char* ICON_SQUARE_O = "\uf096"; + inline const char* ICON_BOOKMARK_O = "\uf097"; + inline const char* ICON_PHONE_SQUARE = "\uf098"; + inline const char* ICON_TWITTER = "\uf099"; + inline const char* ICON_FACEBOOK = "\uf09a"; + inline const char* ICON_GITHUB = "\uf09b"; + inline const char* ICON_UNLOCK = "\uf09c"; + inline const char* ICON_CREDIT_CARD = "\uf09d"; + inline const char* ICON_RSS = "\uf09e"; + inline const char* ICON_HDD_O = "\uf0a0"; + inline const char* ICON_BULLHORN = "\uf0a1"; + inline const char* ICON_BELL = "\uf0f3"; + inline const char* ICON_CERTIFICATE = "\uf0a3"; + inline const char* ICON_HAND_O_RIGHT = "\uf0a4"; + inline const char* ICON_HAND_O_LEFT = "\uf0a5"; + inline const char* ICON_HAND_O_UP = "\uf0a6"; + inline const char* ICON_HAND_O_DOWN = "\uf0a7"; + inline const char* ICON_ARROW_CIRCLE_LEFT = "\uf0a8"; + inline const char* ICON_ARROW_CIRCLE_RIGHT = "\uf0a9"; + inline const char* ICON_ARROW_CIRCLE_UP = "\uf0aa"; + inline const char* ICON_ARROW_CIRCLE_DOWN = "\uf0ab"; + inline const char* ICON_GLOBE = "\uf0ac"; + inline const char* ICON_GLOBE_E = "\uf304"; + inline const char* ICON_GLOBE_W = "\uf305"; + inline const char* ICON_WRENCH = "\uf0ad"; + inline const char* ICON_TASKS = "\uf0ae"; + inline const char* ICON_FILTER = "\uf0b0"; + inline const char* ICON_BRIEFCASE = "\uf0b1"; + inline const char* ICON_ARROWS_ALT = "\uf0b2"; + inline const char* ICON_USERS = "\uf0c0"; + inline const char* ICON_LINK = "\uf0c1"; + inline const char* ICON_CLOUD = "\uf0c2"; + inline const char* ICON_FLASK = "\uf0c3"; + inline const char* ICON_SCISSORS = "\uf0c4"; + inline const char* ICON_FILES_O = "\uf0c5"; + inline const char* ICON_PAPERCLIP = "\uf0c6"; + inline const char* ICON_FLOPPY_O = "\uf0c7"; + inline const char* ICON_SQUARE = "\uf0c8"; + inline const char* ICON_BARS = "\uf0c9"; + inline const char* ICON_LIST_UL = "\uf0ca"; + inline const char* ICON_LIST_OL = "\uf0cb"; + inline const char* ICON_STRIKETHROUGH = "\uf0cc"; + inline const char* ICON_UNDERLINE = "\uf0cd"; + inline const char* ICON_TABLE = "\uf0ce"; + inline const char* ICON_MAGIC = "\uf0d0"; + inline const char* ICON_TRUCK = "\uf0d1"; + inline const char* ICON_PINTEREST = "\uf0d2"; + inline const char* ICON_PINTEREST_SQUARE = "\uf0d3"; + inline const char* ICON_GOOGLE_PLUS_SQUARE = "\uf0d4"; + inline const char* ICON_GOOGLE_PLUS = "\uf0d5"; + inline const char* ICON_MONEY = "\uf0d6"; + inline const char* ICON_CARET_DOWN = "\uf0d7"; + inline const char* ICON_CARET_UP = "\uf0d8"; + inline const char* ICON_CARET_LEFT = "\uf0d9"; + inline const char* ICON_CARET_RIGHT = "\uf0da"; + inline const char* ICON_COLUMNS = "\uf0db"; + inline const char* ICON_SORT = "\uf0dc"; + inline const char* ICON_SORT_DESC = "\uf0dd"; + inline const char* ICON_SORT_ASC = "\uf0de"; + inline const char* ICON_ENVELOPE = "\uf0e0"; + inline const char* ICON_LINKEDIN = "\uf0e1"; + inline const char* ICON_UNDO = "\uf0e2"; + inline const char* ICON_GAVEL = "\uf0e3"; + inline const char* ICON_TACHOMETER = "\uf0e4"; + inline const char* ICON_COMMENT_O = "\uf0e5"; + inline const char* ICON_COMMENTS_O = "\uf0e6"; + inline const char* ICON_BOLT = "\uf0e7"; + inline const char* ICON_SITEMAP = "\uf0e8"; + inline const char* ICON_UMBRELLA = "\uf0e9"; + inline const char* ICON_CLIPBOARD = "\uf0ea"; + inline const char* ICON_LIGHTBULB_O = "\uf0eb"; + inline const char* ICON_EXCHANGE = "\uf0ec"; + inline const char* ICON_CLOUD_DOWNLOAD = "\uf0ed"; + inline const char* ICON_CLOUD_UPLOAD = "\uf0ee"; + inline const char* ICON_USER_MD = "\uf0f0"; + inline const char* ICON_STETHOSCOPE = "\uf0f1"; + inline const char* ICON_SUITCASE = "\uf0f2"; + inline const char* ICON_BELL_O = "\uf0a2"; + inline const char* ICON_COFFEE = "\uf0f4"; + inline const char* ICON_CUTLERY = "\uf0f5"; + inline const char* ICON_FILE_TEXT_O = "\uf0f6"; + inline const char* ICON_BUILDING_O = "\uf0f7"; + inline const char* ICON_HOSPITAL_O = "\uf0f8"; + inline const char* ICON_AMBULANCE = "\uf0f9"; + inline const char* ICON_MEDKIT = "\uf0fa"; + inline const char* ICON_FIGHTER_JET = "\uf0fb"; + inline const char* ICON_BEER = "\uf0fc"; + inline const char* ICON_H_SQUARE = "\uf0fd"; + inline const char* ICON_PLUS_SQUARE = "\uf0fe"; + inline const char* ICON_ANGLE_DOUBLE_LEFT = "\uf100"; + inline const char* ICON_ANGLE_DOUBLE_RIGHT = "\uf101"; + inline const char* ICON_ANGLE_DOUBLE_UP = "\uf102"; + inline const char* ICON_ANGLE_DOUBLE_DOWN = "\uf103"; + inline const char* ICON_ANGLE_LEFT = "\uf104"; + inline const char* ICON_ANGLE_RIGHT = "\uf105"; + inline const char* ICON_ANGLE_UP = "\uf106"; + inline const char* ICON_ANGLE_DOWN = "\uf107"; + inline const char* ICON_DESKTOP = "\uf108"; + inline const char* ICON_LAPTOP = "\uf109"; + inline const char* ICON_TABLET = "\uf10a"; + inline const char* ICON_MOBILE = "\uf10b"; + inline const char* ICON_CIRCLE_O = "\uf10c"; + inline const char* ICON_QUOTE_LEFT = "\uf10d"; + inline const char* ICON_QUOTE_RIGHT = "\uf10e"; + inline const char* ICON_SPINNER = "\uf110"; + inline const char* ICON_CIRCLE = "\uf111"; + inline const char* ICON_REPLY = "\uf112"; + inline const char* ICON_GITHUB_ALT = "\uf113"; + inline const char* ICON_FOLDER_O = "\uf114"; + inline const char* ICON_FOLDER_OPEN_O = "\uf115"; + inline const char* ICON_SMILE_O = "\uf118"; + inline const char* ICON_FROWN_O = "\uf119"; + inline const char* ICON_MEH_O = "\uf11a"; + inline const char* ICON_GAMEPAD = "\uf11b"; + inline const char* ICON_KEYBOARD_O = "\uf11c"; + inline const char* ICON_FLAG_O = "\uf11d"; + inline const char* ICON_FLAG_CHECKERED = "\uf11e"; + inline const char* ICON_TERMINAL = "\uf120"; + inline const char* ICON_CODE = "\uf121"; + inline const char* ICON_REPLY_ALL = "\uf122"; + inline const char* ICON_STAR_HALF_O = "\uf123"; + inline const char* ICON_LOCATION_ARROW = "\uf124"; + inline const char* ICON_CROP = "\uf125"; + inline const char* ICON_CODE_FORK = "\uf126"; + inline const char* ICON_CHAIN_BROKEN = "\uf127"; + inline const char* ICON_QUESTION = "\uf128"; + inline const char* ICON_INFO = "\uf129"; + inline const char* ICON_EXCLAMATION = "\uf12a"; + inline const char* ICON_SUPERSCRIPT = "\uf12b"; + inline const char* ICON_SUBSCRIPT = "\uf12c"; + inline const char* ICON_ERASER = "\uf12d"; + inline const char* ICON_PUZZLE_PIECE = "\uf12e"; + inline const char* ICON_MICROPHONE = "\uf130"; + inline const char* ICON_MICROPHONE_SLASH = "\uf131"; + inline const char* ICON_SHIELD = "\uf132"; + inline const char* ICON_CALENDAR_O = "\uf133"; + inline const char* ICON_FIRE_EXTINGUISHER = "\uf134"; + inline const char* ICON_ROCKET = "\uf135"; + inline const char* ICON_MAXCDN = "\uf136"; + inline const char* ICON_CHEVRON_CIRCLE_LEFT = "\uf137"; + inline const char* ICON_CHEVRON_CIRCLE_RIGHT = "\uf138"; + inline const char* ICON_CHEVRON_CIRCLE_UP = "\uf139"; + inline const char* ICON_CHEVRON_CIRCLE_DOWN = "\uf13a"; + inline const char* ICON_HTML5 = "\uf13b"; + inline const char* ICON_CSS3 = "\uf13c"; + inline const char* ICON_ANCHOR = "\uf13d"; + inline const char* ICON_UNLOCK_ALT = "\uf13e"; + inline const char* ICON_BULLSEYE = "\uf140"; + inline const char* ICON_ELLIPSIS_H = "\uf141"; + inline const char* ICON_ELLIPSIS_V = "\uf142"; + inline const char* ICON_RSS_SQUARE = "\uf143"; + inline const char* ICON_PLAY_CIRCLE = "\uf144"; + inline const char* ICON_TICKET = "\uf145"; + inline const char* ICON_MINUS_SQUARE = "\uf146"; + inline const char* ICON_MINUS_SQUARE_O = "\uf147"; + inline const char* ICON_LEVEL_UP = "\uf148"; + inline const char* ICON_LEVEL_DOWN = "\uf149"; + inline const char* ICON_CHECK_SQUARE = "\uf14a"; + inline const char* ICON_PENCIL_SQUARE = "\uf14b"; + inline const char* ICON_inlineAL_LINK_SQUARE = "\uf14c"; + inline const char* ICON_SHARE_SQUARE = "\uf14d"; + inline const char* ICON_COMPASS = "\uf14e"; + inline const char* ICON_CARET_SQUARE_O_DOWN = "\uf150"; + inline const char* ICON_CARET_SQUARE_O_UP = "\uf151"; + inline const char* ICON_CARET_SQUARE_O_RIGHT = "\uf152"; + inline const char* ICON_EUR = "\uf153"; + inline const char* ICON_GBP = "\uf154"; + inline const char* ICON_USD = "\uf155"; + inline const char* ICON_INR = "\uf156"; + inline const char* ICON_JPY = "\uf157"; + inline const char* ICON_RUB = "\uf158"; + inline const char* ICON_KRW = "\uf159"; + inline const char* ICON_BTC = "\uf15a"; + inline const char* ICON_FILE = "\uf15b"; + inline const char* ICON_FILE_TEXT = "\uf15c"; + inline const char* ICON_SORT_ALPHA_ASC = "\uf15d"; + inline const char* ICON_SORT_ALPHA_DESC = "\uf15e"; + inline const char* ICON_SORT_AMOUNT_ASC = "\uf160"; + inline const char* ICON_SORT_AMOUNT_DESC = "\uf161"; + inline const char* ICON_SORT_NUMERIC_ASC = "\uf162"; + inline const char* ICON_SORT_NUMERIC_DESC = "\uf163"; + inline const char* ICON_THUMBS_UP = "\uf164"; + inline const char* ICON_THUMBS_DOWN = "\uf165"; + inline const char* ICON_YOUTUBE_SQUARE = "\uf166"; + inline const char* ICON_YOUTUBE = "\uf167"; + inline const char* ICON_XING = "\uf168"; + inline const char* ICON_XING_SQUARE = "\uf169"; + inline const char* ICON_YOUTUBE_PLAY = "\uf16a"; + inline const char* ICON_DROPBOX = "\uf16b"; + inline const char* ICON_STACK_OVERFLOW = "\uf16c"; + inline const char* ICON_INSTAGRAM = "\uf16d"; + inline const char* ICON_FLICKR = "\uf16e"; + inline const char* ICON_ADN = "\uf170"; + inline const char* ICON_BITBUCKET = "\uf171"; + inline const char* ICON_BITBUCKET_SQUARE = "\uf172"; + inline const char* ICON_TUMBLR = "\uf173"; + inline const char* ICON_TUMBLR_SQUARE = "\uf174"; + inline const char* ICON_LONG_ARROW_DOWN = "\uf175"; + inline const char* ICON_LONG_ARROW_UP = "\uf176"; + inline const char* ICON_LONG_ARROW_LEFT = "\uf177"; + inline const char* ICON_LONG_ARROW_RIGHT = "\uf178"; + inline const char* ICON_APPLE = "\uf179"; + inline const char* ICON_PROJECTS = "\uf17a"; + inline const char* ICON_ANDROID = "\uf17b"; + inline const char* ICON_LINUX = "\uf17c"; + inline const char* ICON_DRIBBBLE = "\uf17d"; + inline const char* ICON_SKYPE = "\uf17e"; + inline const char* ICON_FOURSQUARE = "\uf180"; + inline const char* ICON_TRELLO = "\uf181"; + inline const char* ICON_FEMALE = "\uf182"; + inline const char* ICON_MALE = "\uf183"; + inline const char* ICON_GRATIPAY = "\uf184"; + inline const char* ICON_SUN_O = "\uf185"; + inline const char* ICON_MOON_O = "\uf186"; + inline const char* ICON_ARCHIVE = "\uf187"; + inline const char* ICON_BUG = "\uf188"; + inline const char* ICON_VK = "\uf189"; + inline const char* ICON_WEIBO = "\uf18a"; + inline const char* ICON_RENREN = "\uf18b"; + inline const char* ICON_PAGELINES = "\uf18c"; + inline const char* ICON_STACK_EXCHANGE = "\uf18d"; + inline const char* ICON_ARROW_CIRCLE_O_RIGHT = "\uf18e"; + inline const char* ICON_ARROW_CIRCLE_O_LEFT = "\uf190"; + inline const char* ICON_CARET_SQUARE_O_LEFT = "\uf191"; + inline const char* ICON_DOT_CIRCLE_O = "\uf192"; + inline const char* ICON_WHEELCHAIR = "\uf193"; + inline const char* ICON_VIMEO_SQUARE = "\uf194"; + inline const char* ICON_TRY = "\uf195"; + inline const char* ICON_PLUS_SQUARE_O = "\uf196"; + inline const char* ICON_SPACE_SHUTTLE = "\uf197"; + inline const char* ICON_SLACK = "\uf198"; + inline const char* ICON_ENVELOPE_SQUARE = "\uf199"; + inline const char* ICON_WORDPRESS = "\uf19a"; + inline const char* ICON_OPENID = "\uf19b"; + inline const char* ICON_UNIVERSITY = "\uf19c"; + inline const char* ICON_GRADUATION_CAP = "\uf19d"; + inline const char* ICON_YAHOO = "\uf19e"; + inline const char* ICON_GOOGLE = "\uf1a0"; + inline const char* ICON_REDDIT = "\uf1a1"; + inline const char* ICON_REDDIT_SQUARE = "\uf1a2"; + inline const char* ICON_STUMBLEUPON_CIRCLE = "\uf1a3"; + inline const char* ICON_STUMBLEUPON = "\uf1a4"; + inline const char* ICON_DELICIOUS = "\uf1a5"; + inline const char* ICON_DIGG = "\uf1a6"; + inline const char* ICON_DRUPAL = "\uf1a9"; + inline const char* ICON_JOOMLA = "\uf1aa"; + inline const char* ICON_LANGUAGE = "\uf1ab"; + inline const char* ICON_FAX = "\uf1ac"; + inline const char* ICON_BUILDING = "\uf1ad"; + inline const char* ICON_CHILD = "\uf1ae"; + inline const char* ICON_PAW = "\uf1b0"; + inline const char* ICON_SPOON = "\uf1b1"; + inline const char* ICON_CUBE = "\uf1b2"; + inline const char* ICON_CUBES = "\uf1b3"; + inline const char* ICON_BEHANCE = "\uf1b4"; + inline const char* ICON_BEHANCE_SQUARE = "\uf1b5"; + inline const char* ICON_STEAM = "\uf1b6"; + inline const char* ICON_STEAM_SQUARE = "\uf1b7"; + inline const char* ICON_RECYCLE = "\uf1b8"; + inline const char* ICON_CAR = "\uf1b9"; + inline const char* ICON_TAXI = "\uf1ba"; + inline const char* ICON_TREE = "\uf1bb"; + inline const char* ICON_SPOTIFY = "\uf1bc"; + inline const char* ICON_DEVIANTART = "\uf1bd"; + inline const char* ICON_SOUNDCLOUD = "\uf1be"; + inline const char* ICON_DATABASE = "\uf1c0"; + inline const char* ICON_FILE_PDF_O = "\uf1c1"; + inline const char* ICON_FILE_WORD_O = "\uf1c2"; + inline const char* ICON_FILE_EXCEL_O = "\uf1c3"; + inline const char* ICON_FILE_POWERPOINT_O = "\uf1c4"; + inline const char* ICON_SAVE = "\uf0c7"; + inline const char* ICON_FILE_IMAGE_O = "\uf1c5"; + inline const char* ICON_FILE_ARCHIVE_O = "\uf1c6"; + inline const char* ICON_FILE_AUDIO_O = "\uf1c7"; + inline const char* ICON_FILE_VIDEO_O = "\uf1c8"; + inline const char* ICON_FILE_CODE_O = "\uf1c9"; + inline const char* ICON_VINE = "\uf1ca"; + inline const char* ICON_CODEPEN = "\uf1cb"; + inline const char* ICON_JSFIDDLE = "\uf1cc"; + inline const char* ICON_LIFE_RING = "\uf1cd"; + inline const char* ICON_CIRCLE_O_NOTCH = "\uf1ce"; + inline const char* ICON_REBEL = "\uf1d0"; + inline const char* ICON_EMPIRE = "\uf1d1"; + inline const char* ICON_GIT_SQUARE = "\uf1d2"; + inline const char* ICON_GIT = "\uf1d3"; + inline const char* ICON_HACKER_NEWS = "\uf1d4"; + inline const char* ICON_TENCENT_WEIBO = "\uf1d5"; + inline const char* ICON_QQ = "\uf1d6"; + inline const char* ICON_WEIXIN = "\uf1d7"; + inline const char* ICON_PAPER_PLANE = "\uf1d8"; + inline const char* ICON_PAPER_PLANE_O = "\uf1d9"; + inline const char* ICON_HISTORY = "\uf1da"; + inline const char* ICON_CIRCLE_THIN = "\uf1db"; + inline const char* ICON_HEADER = "\uf1dc"; + inline const char* ICON_PARAGRAPH = "\uf1dd"; + inline const char* ICON_SLIDERS = "\uf1de"; + inline const char* ICON_SHARE_ALT = "\uf1e0"; + inline const char* ICON_SHARE_ALT_SQUARE = "\uf1e1"; + inline const char* ICON_BOMB = "\uf1e2"; + inline const char* ICON_FUTBOL_O = "\uf1e3"; + inline const char* ICON_TTY = "\uf1e4"; + inline const char* ICON_BINOCULARS = "\uf1e5"; + inline const char* ICON_PLUG = "\uf1e6"; + inline const char* ICON_SLIDESHARE = "\uf1e7"; + inline const char* ICON_TWITCH = "\uf1e8"; + inline const char* ICON_YELP = "\uf1e9"; + inline const char* ICON_NEWSPAPER_O = "\uf1ea"; + inline const char* ICON_WIFI = "\uf1eb"; + inline const char* ICON_CALCULATOR = "\uf1ec"; + inline const char* ICON_PAYPAL = "\uf1ed"; + inline const char* ICON_GOOGLE_WALLET = "\uf1ee"; + inline const char* ICON_CC_VISA = "\uf1f0"; + inline const char* ICON_CC_MASTERCARD = "\uf1f1"; + inline const char* ICON_CC_DISCOVER = "\uf1f2"; + inline const char* ICON_CC_AMEX = "\uf1f3"; + inline const char* ICON_CC_PAYPAL = "\uf1f4"; + inline const char* ICON_CC_STRIPE = "\uf1f5"; + inline const char* ICON_BELL_SLASH = "\uf1f6"; + inline const char* ICON_BELL_SLASH_O = "\uf1f7"; + inline const char* ICON_TRASH = "\uf1f8"; + inline const char* ICON_COPYRIGHT = "\uf1f9"; + inline const char* ICON_AT = "\uf1fa"; + inline const char* ICON_EYEDROPPER = "\uf1fb"; + inline const char* ICON_PAINT_BRUSH = "\uf1fc"; + inline const char* ICON_BIRTHDAY_CAKE = "\uf1fd"; + inline const char* ICON_AREA_CHART = "\uf1fe"; + inline const char* ICON_PIE_CHART = "\uf200"; + inline const char* ICON_LINE_CHART = "\uf201"; + inline const char* ICON_LASTFM = "\uf202"; + inline const char* ICON_LASTFM_SQUARE = "\uf203"; + inline const char* ICON_TOGGLE_OFF = "\uf204"; + inline const char* ICON_TOGGLE_ON = "\uf205"; + inline const char* ICON_BICYCLE = "\uf206"; + inline const char* ICON_BUS = "\uf207"; + inline const char* ICON_IOXHOST = "\uf208"; + inline const char* ICON_ANGELLIST = "\uf209"; + inline const char* ICON_CC = "\uf20a"; + inline const char* ICON_ILS = "\uf20b"; + inline const char* ICON_MEANPATH = "\uf20c"; + inline const char* ICON_BUYSELLADS = "\uf20d"; + inline const char* ICON_CONNECTDEVELOP = "\uf20e"; + inline const char* ICON_DASHCUBE = "\uf210"; + inline const char* ICON_FORUMBEE = "\uf211"; + inline const char* ICON_LEANPUB = "\uf212"; + inline const char* ICON_SELLSY = "\uf213"; + inline const char* ICON_SHIRTSINBULK = "\uf214"; + inline const char* ICON_SIMPLYBUILT = "\uf215"; + inline const char* ICON_SKYATLAS = "\uf216"; + inline const char* ICON_CART_PLUS = "\uf217"; + inline const char* ICON_CART_ARROW_DOWN = "\uf218"; + inline const char* ICON_DIAMOND = "\uf219"; + inline const char* ICON_SHIP = "\uf21a"; + inline const char* ICON_USER_SECRET = "\uf21b"; + inline const char* ICON_MOTORCYCLE = "\uf21c"; + inline const char* ICON_STREET_VIEW = "\uf21d"; + inline const char* ICON_HEARTBEAT = "\uf21e"; + inline const char* ICON_VENUS = "\uf221"; + inline const char* ICON_MARS = "\uf222"; + inline const char* ICON_MERCURY = "\uf223"; + inline const char* ICON_TRANSGENDER = "\uf224"; + inline const char* ICON_TRANSGENDER_ALT = "\uf225"; + inline const char* ICON_VENUS_DOUBLE = "\uf226"; + inline const char* ICON_MARS_DOUBLE = "\uf227"; + inline const char* ICON_VENUS_MARS = "\uf228"; + inline const char* ICON_MARS_STROKE = "\uf229"; + inline const char* ICON_MARS_STROKE_V = "\uf22a"; + inline const char* ICON_MARS_STROKE_H = "\uf22b"; + inline const char* ICON_NEUTER = "\uf22c"; + inline const char* ICON_GENDERLESS = "\uf22d"; + inline const char* ICON_FACEBOOK_OFFICIAL = "\uf230"; + inline const char* ICON_PINTEREST_P = "\uf231"; + inline const char* ICON_WHATSAPP = "\uf232"; + inline const char* ICON_SERVER = "\uf233"; + inline const char* ICON_USER_PLUS = "\uf234"; + inline const char* ICON_USER_TIMES = "\uf235"; + inline const char* ICON_BED = "\uf236"; + inline const char* ICON_VIACOIN = "\uf237"; + inline const char* ICON_TRAIN = "\uf238"; + inline const char* ICON_SUBWAY = "\uf239"; + inline const char* ICON_MEDIUM = "\uf23a"; + inline const char* ICON_MEDIUM_SQUARE = "\uf2f8"; + inline const char* ICON_Y_COMBINATOR = "\uf23b"; + inline const char* ICON_OPTIN_MONSTER = "\uf23c"; + inline const char* ICON_OPENCART = "\uf23d"; + inline const char* ICON_EXPEDITEDSSL = "\uf23e"; + inline const char* ICON_BATTERY_FULL = "\uf240"; + inline const char* ICON_BATTERY_THREE_QUARTERS = "\uf241"; + inline const char* ICON_BATTERY_HALF = "\uf242"; + inline const char* ICON_BATTERY_QUARTER = "\uf243"; + inline const char* ICON_BATTERY_EMPTY = "\uf244"; + inline const char* ICON_MOUSE_POINTER = "\uf245"; + inline const char* ICON_I_CURSOR = "\uf246"; + inline const char* ICON_OBJECT_GROUP = "\uf247"; + inline const char* ICON_OBJECT_UNGROUP = "\uf248"; + inline const char* ICON_STICKY_NOTE = "\uf249"; + inline const char* ICON_STICKY_NOTE_O = "\uf24a"; + inline const char* ICON_CC_JCB = "\uf24b"; + inline const char* ICON_CC_DINERS_CLUB = "\uf24c"; + inline const char* ICON_CLONE = "\uf24d"; + inline const char* ICON_BALANCE_SCALE = "\uf24e"; + inline const char* ICON_HOURGLASS_O = "\uf250"; + inline const char* ICON_HOURGLASS_START = "\uf251"; + inline const char* ICON_HOURGLASS_HALF = "\uf252"; + inline const char* ICON_HOURGLASS_END = "\uf253"; + inline const char* ICON_HOURGLASS = "\uf254"; + inline const char* ICON_HAND_ROCK_O = "\uf255"; + inline const char* ICON_HAND_PAPER_O = "\uf256"; + inline const char* ICON_HAND_SCISSORS_O = "\uf257"; + inline const char* ICON_HAND_LIZARD_O = "\uf258"; + inline const char* ICON_HAND_SPOCK_O = "\uf259"; + inline const char* ICON_HAND_POINTER_O = "\uf25a"; + inline const char* ICON_HAND_PEACE_O = "\uf25b"; + inline const char* ICON_TRADEMARK = "\uf25c"; + inline const char* ICON_REGISTERED = "\uf25d"; + inline const char* ICON_CREATIVE_COMMONS = "\uf25e"; + inline const char* ICON_GG = "\uf260"; + inline const char* ICON_GG_CIRCLE = "\uf261"; + inline const char* ICON_TRIPADVISOR = "\uf262"; + inline const char* ICON_ODNOKLASSNIKI = "\uf263"; + inline const char* ICON_ODNOKLASSNIKI_SQUARE = "\uf264"; + inline const char* ICON_GET_POCKET = "\uf265"; + inline const char* ICON_WIKIPEDIA_W = "\uf266"; + inline const char* ICON_SAFARI = "\uf267"; + inline const char* ICON_CHROME = "\uf268"; + inline const char* ICON_FIREFOX = "\uf269"; + inline const char* ICON_OPERA = "\uf26a"; + inline const char* ICON_INTERNET_EXPLORER = "\uf26b"; + inline const char* ICON_TELEVISION = "\uf26c"; + inline const char* ICON_CONTAO = "\uf26d"; + inline const char* ICON_500PX = "\uf26e"; + inline const char* ICON_AMAZON = "\uf270"; + inline const char* ICON_CALENDAR_PLUS_O = "\uf271"; + inline const char* ICON_CALENDAR_MINUS_O = "\uf272"; + inline const char* ICON_CALENDAR_TIMES_O = "\uf273"; + inline const char* ICON_CALENDAR_CHECK_O = "\uf274"; + inline const char* ICON_INDUSTRY = "\uf275"; + inline const char* ICON_MAP_PIN = "\uf276"; + inline const char* ICON_MAP_SIGNS = "\uf277"; + inline const char* ICON_MAP_O = "\uf278"; + inline const char* ICON_MAP = "\uf279"; + inline const char* ICON_COMMENTING = "\uf27a"; + inline const char* ICON_COMMENTING_O = "\uf27b"; + inline const char* ICON_HOUZZ = "\uf27c"; + inline const char* ICON_VIMEO = "\uf27d"; + inline const char* ICON_BLACK_TIE = "\uf27e"; + inline const char* ICON_FONTICONS = "\uf280"; + inline const char* ICON_REDDIT_ALIEN = "\uf281"; + inline const char* ICON_EDGE = "\uf282"; + inline const char* ICON_CREDIT_CARD_ALT = "\uf283"; + inline const char* ICON_CODIEPIE = "\uf284"; + inline const char* ICON_MODX = "\uf285"; + inline const char* ICON_FORT_AWESOME = "\uf286"; + inline const char* ICON_USB = "\uf287"; + inline const char* ICON_PRODUCT_HUNT = "\uf288"; + inline const char* ICON_MIXCLOUD = "\uf289"; + inline const char* ICON_SCRIBD = "\uf28a"; + inline const char* ICON_PAUSE_CIRCLE = "\uf28b"; + inline const char* ICON_PAUSE_CIRCLE_O = "\uf28c"; + inline const char* ICON_STOP_CIRCLE = "\uf28d"; + inline const char* ICON_STOP_CIRCLE_O = "\uf28e"; + inline const char* ICON_SHOPPING_BAG = "\uf290"; + inline const char* ICON_SHOPPING_BASKET = "\uf291"; + inline const char* ICON_HASHTAG = "\uf292"; + inline const char* ICON_BLUETOOTH = "\uf293"; + inline const char* ICON_BLUETOOTH_B = "\uf294"; + inline const char* ICON_PERCENT = "\uf295"; + inline const char* ICON_GITLAB = "\uf296"; + inline const char* ICON_WPBEGINNER = "\uf297"; + inline const char* ICON_WPFORMS = "\uf298"; + inline const char* ICON_ENVIRA = "\uf299"; + inline const char* ICON_UNIVERSAL_ACCESS = "\uf29a"; + inline const char* ICON_WHEELCHAIR_ALT = "\uf29b"; + inline const char* ICON_QUESTION_CIRCLE_O = "\uf29c"; + inline const char* ICON_BLIND = "\uf29d"; + inline const char* ICON_AUDIO_DESCRIPTION = "\uf29e"; + inline const char* ICON_VOLUME_CONTROL_PHONE = "\uf2a0"; + inline const char* ICON_BRAILLE = "\uf2a1"; + inline const char* ICON_ASSISTIVE_LISTENING_SYSTEMS = "\uf2a2"; + inline const char* ICON_AMERICAN_SIGN_LANGUAGE_INTERPRETING = "\uf2a3"; + inline const char* ICON_DEAF = "\uf2a4"; + inline const char* ICON_GLIDE = "\uf2a5"; + inline const char* ICON_GLIDE_G = "\uf2a6"; + inline const char* ICON_SIGN_LANGUAGE = "\uf2a7"; + inline const char* ICON_LOW_VISION = "\uf2a8"; + inline const char* ICON_VIADEO = "\uf2a9"; + inline const char* ICON_VIADEO_SQUARE = "\uf2aa"; + inline const char* ICON_SNAPCHAT = "\uf2ab"; + inline const char* ICON_SNAPCHAT_GHOST = "\uf2ac"; + inline const char* ICON_SNAPCHAT_SQUARE = "\uf2ad"; + inline const char* ICON_FIRST_ORDER = "\uf2b0"; + inline const char* ICON_YOAST = "\uf2b1"; + inline const char* ICON_THEMEISLE = "\uf2b2"; + inline const char* ICON_GOOGLE_PLUS_OFFICIAL = "\uf2b3"; + inline const char* ICON_FONT_AWESOME = "\uf2b4"; + inline const char* ICON_HANDSHAKE_O = "\uf2b5"; + inline const char* ICON_ENVELOPE_OPEN = "\uf2b6"; + inline const char* ICON_ENVELOPE_OPEN_O = "\uf2b7"; + inline const char* ICON_LINODE = "\uf2b8"; + inline const char* ICON_ADDRESS_BOOK = "\uf2b9"; + inline const char* ICON_ADDRESS_BOOK_O = "\uf2ba"; + inline const char* ICON_ADDRESS_CARD = "\uf2bb"; + inline const char* ICON_ADDRESS_CARD_O = "\uf2bc"; + inline const char* ICON_USER_CIRCLE = "\uf2bd"; + inline const char* ICON_USER_CIRCLE_O = "\uf2be"; + inline const char* ICON_USER_O = "\uf2c0"; + inline const char* ICON_ID_BADGE = "\uf2c1"; + inline const char* ICON_ID_CARD = "\uf2c2"; + inline const char* ICON_ID_CARD_O = "\uf2c3"; + inline const char* ICON_QUORA = "\uf2c4"; + inline const char* ICON_FREE_CODE_CAMP = "\uf2c5"; + inline const char* ICON_TELEGRAM = "\uf2c6"; + inline const char* ICON_THERMOMETER_FULL = "\uf2c7"; + inline const char* ICON_THERMOMETER_THREE_QUARTERS = "\uf2c8"; + inline const char* ICON_THERMOMETER_HALF = "\uf2c9"; + inline const char* ICON_THERMOMETER_QUARTER = "\uf2ca"; + inline const char* ICON_THERMOMETER_EMPTY = "\uf2cb"; + inline const char* ICON_SHOWER = "\uf2cc"; + inline const char* ICON_BATH = "\uf2cd"; + inline const char* ICON_PODCAST = "\uf2ce"; + inline const char* ICON_WINDOW_MAXIMIZE = "\uf2d0"; + inline const char* ICON_WINDOW_MINIMIZE = "\uf2d1"; + inline const char* ICON_WINDOW_RESTORE = "\uf2d2"; + inline const char* ICON_WINDOW_CLOSE = "\uf2d3"; + inline const char* ICON_WINDOW_CLOSE_O = "\uf2d4"; + inline const char* ICON_BANDCAMP = "\uf2d5"; + inline const char* ICON_GRAV = "\uf2d6"; + inline const char* ICON_ETSY = "\uf2d7"; + inline const char* ICON_IMDB = "\uf2d8"; + inline const char* ICON_RAVELRY = "\uf2d9"; + inline const char* ICON_EERCAST = "\uf2da"; + inline const char* ICON_MICROCHIP = "\uf2db"; + inline const char* ICON_SNOWFLAKE_O = "\uf2dc"; + inline const char* ICON_SUPERPOWERS = "\uf2dd"; + inline const char* ICON_WPEXPLORER = "\uf2de"; + inline const char* ICON_MEETUP = "\uf2e0"; + inline const char* ICON_MASTODON = "\uf2e1"; + inline const char* ICON_MASTODON_ALT = "\uf2e2"; + inline const char* ICON_FORK_AWESOME = "\uf2e3"; + inline const char* ICON_PEERTUBE = "\uf2e4"; + inline const char* ICON_DIASPORA = "\uf2e5"; + inline const char* ICON_FRIENDICA = "\uf2e6"; + inline const char* ICON_GNU_SOCIAL = "\uf2e7"; + inline const char* ICON_LIBERAPAY_SQUARE = "\uf2e8"; + inline const char* ICON_LIBERAPAY = "\uf2e9"; + inline const char* ICON_SCUTTLEBUTT = "\uf2ea"; + inline const char* ICON_HUBZILLA = "\uf2eb"; + inline const char* ICON_SOCIAL_HOME = "\uf2ec"; + inline const char* ICON_ARTSTATION = "\uf2ed"; + inline const char* ICON_DISCORD = "\uf2ee"; + inline const char* ICON_DISCORD_ALT = "\uf2ef"; + inline const char* ICON_PATREON = "\uf2f0"; + inline const char* ICON_SNOWDRIFT = "\uf2f1"; + inline const char* ICON_ACTIVITYPUB = "\uf2f2"; + inline const char* ICON_ETHEREUM = "\uf2f3"; + inline const char* ICON_KEYBASE = "\uf2f4"; + inline const char* ICON_SHAARLI = "\uf2f5"; + inline const char* ICON_SHAARLI_O = "\uf2f6"; + inline const char* ICON_KEY_MODERN = "\uf2f7"; + inline const char* ICON_XMPP = "\uf2f9"; + inline const char* ICON_ARCHIVE_ORG = "\uf2fc"; + inline const char* ICON_FREEDOMBOX = "\uf2fd"; + inline const char* ICON_FACEBOOK_MESSENGER = "\uf2fe"; + inline const char* ICON_DEBIAN = "\uf2ff"; + inline const char* ICON_MASTODON_SQUARE = "\uf300"; + inline const char* ICON_TIPEEE = "\uf301"; + inline const char* ICON_REACT = "\uf302"; + inline const char* ICON_DOGMAZIC = "\uf303"; + inline const char* ICON_NEXTCLOUD = "\uf306"; + inline const char* ICON_NEXTCLOUD_SQUARE = "\uf307"; +} // namespace Icon diff --git a/src/gui/style/style.hpp b/src/gui/style/style.hpp new file mode 100755 index 0000000..66e4985 --- /dev/null +++ b/src/gui/style/style.hpp @@ -0,0 +1,82 @@ +#pragma once + +#include "imgui.h" + +#include "icons.hpp" +#include "fonts.hpp" + +namespace VE::style +{ + inline void init() + { + /* use this - https://www.unknowncheats.me/forum/c-and-c-/189635-imgui-style-settings.html */ + ImGuiStyle& st = ImGui::GetStyle(); + + st.WindowPadding = ImVec2(5.0f, 5.0f); + st.WindowRounding = 0.0f; + st.FramePadding = ImVec2(5.0f, 5.0f); + st.FrameRounding = 0.0f; + st.ItemSpacing = ImVec2(8.0f, 8.0f); + st.ItemInnerSpacing = ImVec2(8.0f, 6.0f); + st.IndentSpacing = 25.0f; + st.ScrollbarSize = 12.0f; + st.ScrollbarRounding = 0.0f; + st.GrabMinSize = 5.0f; + st.GrabRounding = 0.0f; + st.TabRounding = 0.0f; + st.WindowBorderSize = 0.0f; + st.ChildRounding = 0.0f; + st.PopupRounding = 0.0f; + st.PopupBorderSize = 0.0f; + st.WindowMenuButtonPosition = ImGuiDir_None; + + /* tab */ + st.Colors[ImGuiCol_Tab] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f); + st.Colors[ImGuiCol_TabHovered] = ImVec4(0.13f, 0.12f, 0.15f, 1.00f); + st.Colors[ImGuiCol_TabActive] = ImVec4(0.13f, 0.12f, 0.15f, 1.00f); + + /* title */ + st.Colors[ImGuiCol_TitleBg] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f); + st.Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f); + st.Colors[ImGuiCol_TitleBgActive] = ImVec4(0.07f, 0.07f, 0.09f, 1.00f); + + st.Colors[ImGuiCol_Text] = ImVec4(0.80f, 0.80f, 0.83f, 1.00f); + st.Colors[ImGuiCol_TextDisabled] = ImVec4(0.13f, 0.12f, 0.15f, 1.00f); + st.Colors[ImGuiCol_WindowBg] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f); + st.Colors[ImGuiCol_ChildBg] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f); + st.Colors[ImGuiCol_PopupBg] = ImVec4(0.07f, 0.07f, 0.09f, 1.00f); + st.Colors[ImGuiCol_Border] = ImVec4(0.80f, 0.80f, 0.83f, 0.88f); + st.Colors[ImGuiCol_BorderShadow] = ImVec4(0.92f, 0.91f, 0.88f, 0.00f); + st.Colors[ImGuiCol_FrameBg] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f); + st.Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.13f, 0.12f, 0.15f, 1.00f); + st.Colors[ImGuiCol_FrameBgActive] = ImVec4(0.13f, 0.12f, 0.15f, 1.00f); + st.Colors[ImGuiCol_MenuBarBg] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f); + st.Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f); + st.Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.80f, 0.80f, 0.83f, 0.31f); + st.Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.13f, 0.12f, 0.15f, 1.00f); + st.Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f); + st.Colors[ImGuiCol_CheckMark] = ImVec4(0.80f, 0.80f, 0.83f, 0.31f); + st.Colors[ImGuiCol_SliderGrab] = ImVec4(0.80f, 0.80f, 0.83f, 0.31f); + st.Colors[ImGuiCol_SliderGrabActive] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f); + st.Colors[ImGuiCol_Button] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f); + st.Colors[ImGuiCol_ButtonHovered] = ImVec4(0.13f, 0.12f, 0.15f, 1.00f); + st.Colors[ImGuiCol_ButtonActive] = ImVec4(0.13f, 0.12f, 0.15f, 1.00f); + st.Colors[ImGuiCol_Header] = ImVec4(0.13f, 0.12f, 0.15f, 1.00f); + st.Colors[ImGuiCol_HeaderActive] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f); + st.Colors[ImGuiCol_Separator] = ImVec4(0.13f, 0.12f, 0.15f, 1.00f); + st.Colors[ImGuiCol_SeparatorHovered] = ImVec4(0.13f, 0.12f, 0.15f, 1.00f); + st.Colors[ImGuiCol_SeparatorActive] = ImVec4(0.13f, 0.12f, 0.15f, 1.00f); + st.Colors[ImGuiCol_ResizeGrip] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f); + st.Colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.13f, 0.12f, 0.15f, 1.00f); + st.Colors[ImGuiCol_ResizeGripActive] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f); + st.Colors[ImGuiCol_PlotLines] = ImVec4(0.40f, 0.39f, 0.38f, 0.63f); + st.Colors[ImGuiCol_PlotLinesHovered] = ImVec4(0.25f, 1.00f, 0.00f, 1.00f); + st.Colors[ImGuiCol_PlotHistogram] = ImVec4(0.40f, 0.39f, 0.38f, 0.63f); + st.Colors[ImGuiCol_PlotHistogramHovered] = ImVec4(0.25f, 1.00f, 0.00f, 1.00f); + st.Colors[ImGuiCol_TextSelectedBg] = ImVec4(0.25f, 1.00f, 0.00f, 0.43f); + st.Colors[ImGuiCol_ModalWindowDimBg] = ImVec4(1.00f, 0.98f, 0.95f, 0.73f); + st.Colors[ImGuiCol_HeaderHovered] = ImVec4(0.13f, 0.12f, 0.15f, 1.00f); + + fonts::init(); + }; +}; diff --git a/src/layer/layer.hpp b/src/layer/layer.hpp new file mode 100755 index 0000000..d54d21e --- /dev/null +++ b/src/layer/layer.hpp @@ -0,0 +1,51 @@ +#pragma once + +#include "hack/security/uuid.hpp" + +#include "event/event.hpp" +#include "gui/flags.hpp" + +namespace VE +{ + class layer : public flags + { + using time = time::timestep; + + public: + layer() = default; + virtual ~layer() = default; + + layer(const layer&) = delete; + void operator=(const layer&) = delete; + + public: + virtual void on_attach() {}; + virtual void on_detach() {}; + virtual void render() {}; + virtual void on_event(event e) {}; + + void set_event_fn(const event_fn& fn) { execute = fn; }; + + void begin() + { + ImGui::SetNextWindowPos(mt::convert(m_passport.m_pos)); + ImGui::SetNextWindowSize(mt::convert(m_passport.m_size)); + + if (m_passport.m_name.empty()) + m_passport.m_name = hack::security::generate_uuid(); + if (!ImGui::Begin(m_passport.m_name.c_str(), &m_p_open, m_window_flags)) end(); + } + + void end() { ImGui::End(); } + + protected: + event_fn execute; + struct passport + { + std::string m_name; + mt::vec2 m_pos; + mt::vec2 m_size; + } m_passport; + }; +} + diff --git a/src/meson.build b/src/meson.build new file mode 100755 index 0000000..c3b98fe --- /dev/null +++ b/src/meson.build @@ -0,0 +1,56 @@ +inc += include_directories('.') + +headers = [ + 'application/application.hpp', + 'event/event.hpp', + + 'glfw/context/context.hpp', + 'glfw/glfw.hpp', + + 'gui/style/fonts.hpp', + 'gui/style/icons.hpp', + 'gui/style/style.hpp', + 'gui/flags.hpp', + + 'layer/layer.hpp', + + 'utils/define.hpp', + 'utils/include.hpp', + 'utils/keycode.hpp', + 'utils/time.hpp', + 'utils/using.hpp', + 'utils/var.hpp', + 'utils/utils.hpp', + + 'opengl/buffer/buffer.hpp', + 'opengl/shader_program/shader_program.hpp', + 'opengl/opengl.hpp', + + 'VE.hpp' +] + +sources = [ + 'application/application.cpp', + + 'glfw/context/context.cpp', + 'glfw/glfw.cpp', + 'gui/gui.cpp', + + 'opengl/buffer/buffer.cpp', + 'opengl/shader_program/shader_program.cpp' +] + +lib = library( + meson.project_name(), + include_directories : inc, + sources: [headers, sources], + dependencies : deps, + cpp_args: args +) + +try_engine_dep = declare_dependency( + include_directories: inc, + link_with: lib, +) + +deps += try_engine_dep diff --git a/src/opengl/buffer/buffer.cpp b/src/opengl/buffer/buffer.cpp new file mode 100644 index 0000000..153c356 --- /dev/null +++ b/src/opengl/buffer/buffer.cpp @@ -0,0 +1,40 @@ +#include "buffer.hpp" + +namespace VE +{ + buffer::buffer() + { + hack::log()("create buffer"); + + glGenVertexArrays(1, &m_vao); + glGenBuffers(1, &m_vbo); + glGenBuffers(1, &m_ebo); + } + + buffer::~buffer() + { + glDeleteVertexArrays(1, &m_vao); + glDeleteBuffers(1, &m_vbo); + glDeleteBuffers(1, &m_ebo); + } + + void buffer::link() + { + glBindVertexArray(m_vao); + + glBindBuffer(GL_ARRAY_BUFFER, m_vbo); + glBufferData(GL_ARRAY_BUFFER, m_vertices.size() * sizeof(m_vertices[0]), m_vertices.data(), GL_STATIC_DRAW); + + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_ebo); + glBufferData(GL_ELEMENT_ARRAY_BUFFER, m_indices.size() * sizeof(m_indices[0]), m_indices.data(), GL_STATIC_DRAW); + + glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 3 * sizeof(float), (void*)0); + glEnableVertexAttribArray(0); + } + + void buffer::render() + { + glBindVertexArray(m_vao); + glDrawElements(GL_LINES, m_indices.size(), GL_UNSIGNED_INT, 0); + } +} diff --git a/src/opengl/buffer/buffer.hpp b/src/opengl/buffer/buffer.hpp new file mode 100644 index 0000000..17f9d21 --- /dev/null +++ b/src/opengl/buffer/buffer.hpp @@ -0,0 +1,27 @@ +#pragma once + +#include "utils/utils.hpp" + +namespace VE +{ + class buffer + { + public: + buffer(); + virtual ~buffer(); + + public: + void render(); + + public: + void link(); + + public: + GLuint m_vao; + GLuint m_vbo; + GLuint m_ebo; + + std::vector m_vertices; + std::vector m_indices; + }; +} diff --git a/src/opengl/opengl.hpp b/src/opengl/opengl.hpp new file mode 100644 index 0000000..3152497 --- /dev/null +++ b/src/opengl/opengl.hpp @@ -0,0 +1,14 @@ +#pragma once + +#include "buffer/buffer.hpp" +#include "shader_program/shader_program.hpp" + +namespace VE +{ + class opengl : public buffer, public shader_program + { + public: + opengl() = default; + virtual ~opengl() = default; + }; +} diff --git a/src/opengl/shader_program/shader_program.cpp b/src/opengl/shader_program/shader_program.cpp new file mode 100644 index 0000000..4cc3334 --- /dev/null +++ b/src/opengl/shader_program/shader_program.cpp @@ -0,0 +1,122 @@ +#include "shader_program.hpp" + +namespace VE +{ + shader_program::shader_program() + { + + } + + shader_program::~shader_program() + { + glDeleteProgram(m_id); + + for (auto s : m_shaders) + glDeleteShader(s); + + m_shaders.clear(); + } + + bool shader_program::add_shader(GLuint type, const std::filesystem::path& p) + { + auto [err_v, shader] = create(type, p); + if (err_v) return false; + + m_shaders.push_back(shader); + return true; + } + + std::pair shader_program::create(GLuint type, const std::filesystem::path& p) + { + GLuint shader_id = glCreateShader(type); + + auto [err, src] = get_shader_content(p); + if (err) + { + glDeleteShader(shader_id); + return std::pair{ true, shader_id }; + } + + const char* code =src.c_str(); + glShaderSource(shader_id, 1, &code, NULL); + glCompileShader(shader_id); + + if (errors(shader_id, type)) + { + glDeleteShader(shader_id); + return std::pair{ true, shader_id }; + } + + return std::pair{ false, shader_id }; + } + + void shader_program::link() + { + m_id = glCreateProgram(); + for (auto s : m_shaders) + glAttachShader(m_id, s); + glLinkProgram(m_id); + } + + void shader_program::use() + { + glUseProgram(m_id); + } + + GLuint shader_program::get_id() const noexcept + { + return m_id; + } + + void shader_program::set(std::string location, glm::vec2 value) + { + glUniform2fv(glGetUniformLocation(m_id, location.c_str()), 1, glm::value_ptr(value)); + } + + void shader_program::set(std::string location, glm::vec3 value) + { + glUniform3fv(glGetUniformLocation(m_id, location.c_str()), 1, glm::value_ptr(value)); + } + + void shader_program::set(std::string location, glm::vec4 value) + { + glUniform4fv(glGetUniformLocation(m_id, location.c_str()), 1, glm::value_ptr(value)); + } + + void shader_program::set(std::string location, glm::mat3 value) + { + glUniformMatrix3fv(glGetUniformLocation(m_id, location.c_str()), 1, GL_FALSE, glm::value_ptr(value)); + } + + void shader_program::set(std::string location, glm::mat4 value) + { + glUniformMatrix4fv(glGetUniformLocation(m_id, location.c_str()), 1, GL_FALSE, glm::value_ptr(value)); + } + + void shader_program::set(std::string location, float value) + { + glUniform1f(glGetUniformLocation(m_id, location.c_str()), value); + } + + void shader_program::set(std::string location, int value) + { + glUniform1i(glGetUniformLocation(m_id, location.c_str()), value); + } + + bool shader_program::errors(unsigned int shader, GLuint type) + { + GLint compale; + char info[1024]; + glGetShaderiv(shader, GL_COMPILE_STATUS, &compale); + + if (compale == GL_FALSE) + { + glGetShaderInfoLog(shader, 1024, NULL, info); + hack::error("")("shader compale error: ", type_to_name(type), info); + return true; + } + hack::log("")("shader compale is good: ", type_to_name(type)); + return false; + } +} + diff --git a/src/opengl/shader_program/shader_program.hpp b/src/opengl/shader_program/shader_program.hpp new file mode 100644 index 0000000..2d869ae --- /dev/null +++ b/src/opengl/shader_program/shader_program.hpp @@ -0,0 +1,72 @@ +#pragma once + +#include "utils/utils.hpp" + +namespace VE +{ + class shader_program + { + public: + shader_program(); + virtual ~shader_program(); + + public: + bool add_shader(GLuint type, const std::filesystem::path& p); + void link(); + void use(); + GLuint get_id() const noexcept; + + public: + void set(std::string location, mt::vec2 value); + void set(std::string location, mt::vec3 value); + void set(std::string location, mt::vec4 value); + void set(std::string location, mt::mat3 value); + void set(std::string location, mt::mat4 value); + void set(std::string location, float value); + void set(std::string location, int value); + + private: + std::pair create(GLuint type, const std::filesystem::path& p); + bool errors(unsigned int shader, GLuint type); + + private: + GLuint m_id; + std::vector m_shaders; + }; +} + +namespace VE +{ + inline std::pair get_shader_content(std::filesystem::path p) + { + std::string contents; + std::ifstream in(p, std::ios::binary); + if (in) + { + in.seekg(0, std::ios::end); + contents.resize(in.tellg()); + in.seekg(0, std::ios::beg); + in.read(&contents[0], contents.size()); + in.close(); + return std::pair{ false, contents }; + } + else return std::pair {true , ""}; + } + + template + std::string type_to_name(T type) + { + std::string name; + switch (type) + { + case GL_VERTEX_SHADER: + name = "vertex shader"; + break; + case GL_FRAGMENT_SHADER: + name = "fragment shader"; + break; + } + + return name; + } +} diff --git a/src/utils/define.hpp b/src/utils/define.hpp new file mode 100755 index 0000000..4bd0cf2 --- /dev/null +++ b/src/utils/define.hpp @@ -0,0 +1,18 @@ +#pragma once + +#define BIT(x)\ + (1 << x) + +#define VE_EVENT_FN\ + std::bind(&application::on_event, this, std::placeholders::_1) + +#define VE_FN_OVERIDE()\ + void on_attach() override;\ + void on_detach() override;\ + void render() override;\ + void on_event(VE::event e) override + +#define VE_PUSH_FONT(def_font, def_size)\ + ImGui::PushFont(VE::style::fonts::get_font(VE::style::fonts::font_type::def_font, def_size)) +#define VE_POP_FONT() ImGui::PopFont() + diff --git a/src/utils/include.hpp b/src/utils/include.hpp new file mode 100755 index 0000000..07dc0c6 --- /dev/null +++ b/src/utils/include.hpp @@ -0,0 +1,30 @@ +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* +Если первым включен glad +то происход ругание на то что уже есть glad +и тут есть два пути исправления +первый +#define GLFW_INCLUDE_NONE +#include "GLFW/glfw3.h" +#include "glad.h" +второй это поставить glad первым +*/ + +#include "glad.h" +#include "GLFW/glfw3.h" +#include "hack/logger/logger.hpp" +#include "imgui.h" +#include "imgui_impl_glfw.h" +#include "imgui_impl_opengl3.h" +#include "nlohmann/json.hpp" diff --git a/src/utils/keycode.hpp b/src/utils/keycode.hpp new file mode 100755 index 0000000..0c19e49 --- /dev/null +++ b/src/utils/keycode.hpp @@ -0,0 +1,122 @@ +#pragma once + +#include + +namespace VE::key +{ + // из glfw3.h + enum : uint16_t + { + SPACE = 32, + APOSTROPHE = 39, /* ' */ + COMMA = 44, /* , */ + MINUS = 45, /* - */ + PERIOD = 46, /* . */ + SLASH = 47, /* / */ + + D0 = 48, /* 0 */ + D1 = 49, /* 1 */ + D2 = 50, /* 2 */ + D3 = 51, /* 3 */ + D4 = 52, /* 4 */ + D5 = 53, /* 5 */ + D6 = 54, /* 6 */ + D7 = 55, /* 7 */ + D8 = 56, /* 8 */ + D9 = 57, /* 9 */ + + SEMICOLON = 59, /* ; */ + EQUAL = 61, /* = */ + + A = 65, + B = 66, + C = 67, + D = 68, + E = 69, + F = 70, + G = 71, + H = 72, + I = 73, + J = 74, + K = 75, + L = 76, + M = 77, + N = 78, + O = 79, + P = 80, + Q = 81, + R = 82, + S = 83, + T = 84, + U = 85, + V = 86, + W = 87, + X = 88, + Y = 89, + Z = 90, + + LEFTBRACKET = 91, /* [ */ + BACKSLASH = 92, /* \ */ + RIGHTBRACKET = 93, /* ] */ + GRAVEACCENT = 96, /* ` */ + + WORLD1 = 161, /* non-US #1 */ + WORLD2 = 162, /* non-US #2 */ + + ESCAPE = 256, + ENTER = 257, + TAB = 258, + BACKSPACE = 259, + INSERT = 260, + DELETE = 261, + RIGHT = 262, + LEFT = 263, + DOWN = 264, + UP = 265, + PAGEUP = 266, + PAGEDOWN = 267, + HOME = 268, + END = 269, + CAPSLOCK = 280, + SCROLLLOCK = 281, + NUMLOCK = 282, + PRINTSCREEN = 283, + PAUSE = 284, + F1 = 290, + F2 = 291, + F3 = 292, + F4 = 293, + F5 = 294, + F6 = 295, + F7 = 296, + F8 = 297, + F9 = 298, + F10 = 299, + F11 = 300, + F12 = 301, + F13 = 302, + F14 = 303, + F15 = 304, + F16 = 305, + F17 = 306, + F18 = 307, + F19 = 308, + F20 = 309, + F21 = 310, + F22 = 311, + F23 = 312, + F24 = 313, + F25 = 314, + + LEFTSHIFT = 340, + LEFTCONTROL = 341, + LEFTALT = 342, + LEFTSUPER = 343, + RIGHTSHIFT = 344, + RIGHTCONTROL = 345, + RIGHTALT = 346, + RIGHTSUPER = 347, + MENU = 348 + }; +} + diff --git a/src/utils/math.hpp b/src/utils/math.hpp new file mode 100644 index 0000000..4ecbc71 --- /dev/null +++ b/src/utils/math.hpp @@ -0,0 +1,17 @@ +#pragma once + +#include "glm/gtc/type_ptr.hpp" + +namespace mt +{ + using vec2 = glm::vec2; + using vec3 = glm::vec3; + using vec4 = glm::vec4; + + using mat2 = glm::mat2; + using mat3 = glm::mat3; + using mat4 = glm::mat4; + + template + T convert(glm::vec2& v) { return T{ v.x, v.y }; } +} diff --git a/src/utils/opengl.hpp b/src/utils/opengl.hpp new file mode 100644 index 0000000..e69de29 diff --git a/src/utils/time.hpp b/src/utils/time.hpp new file mode 100644 index 0000000..774f980 --- /dev/null +++ b/src/utils/time.hpp @@ -0,0 +1,35 @@ +#pragma once + +#include "using.hpp" + +namespace VE::time +{ + template + class timestep + { + public: + timestep(Time data_ = 0.0f) : data { data_ } {} + + operator Time() const { return data; } + + Time get_seconds() const { return data; } + Time get_milliseconds() const { return data * 1000.0f; } + + private: + Time data; + }; +} + +namespace VE::time +{ + inline timestep get_time() + { + static float frame_time = 0.0f; + float t = (float)glfwGetTime(); + timestep ts = t - frame_time; + frame_time = t; + + return ts; + } +} + diff --git a/src/utils/using.hpp b/src/utils/using.hpp new file mode 100644 index 0000000..0052acf --- /dev/null +++ b/src/utils/using.hpp @@ -0,0 +1,17 @@ +#pragma once + +#include "include.hpp" + +namespace VE +{ + template + using event_fn = std::function; + + template + using layers_stack = std::vector; + + using JSON = nlohmann::json; +} + + + diff --git a/src/utils/utils.hpp b/src/utils/utils.hpp new file mode 100644 index 0000000..228635a --- /dev/null +++ b/src/utils/utils.hpp @@ -0,0 +1,9 @@ +#pragma once + +#include "define.hpp" +#include "keycode.hpp" +#include "time.hpp" +#include "var.hpp" +#include "include.hpp" +#include "using.hpp" +#include "math.hpp" diff --git a/src/utils/var.hpp b/src/utils/var.hpp new file mode 100644 index 0000000..1f30a36 --- /dev/null +++ b/src/utils/var.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "include.hpp" + +namespace VE::var +{ + // HERE + // эту порнографию с путями нужно решить + inline const std::string FONT_PATH = "/mnt/raid/projects/vertex_engine/src/gui/style/fonts"; + inline const std::string ICONS_PATH = FONT_PATH + "/FontAwesome/forkawesome-webfont.ttf"; +} diff --git a/subprojects/glad.wrap b/subprojects/glad.wrap new file mode 100755 index 0000000..0d5b7b5 --- /dev/null +++ b/subprojects/glad.wrap @@ -0,0 +1,6 @@ +[wrap-git] +url = https://gitcast.ru/chatlanin/glad.git +revision = master + +[provide] +glad = glad_dep diff --git a/subprojects/glfw.wrap b/subprojects/glfw.wrap new file mode 100755 index 0000000..6c3fa9d --- /dev/null +++ b/subprojects/glfw.wrap @@ -0,0 +1,13 @@ +[wrap-file] +directory = glfw-3.3.7 +source_url = https://github.com/glfw/glfw/archive/refs/tags/3.3.7.tar.gz +source_filename = glfw-3.3.7.tar.gz +source_hash = fd21a5f65bcc0fc3c76e0f8865776e852de09ef6fbc3620e09ce96d2b2807e04 +patch_filename = glfw_3.3.7-1_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/glfw_3.3.7-1/get_patch +patch_hash = cfc19fedadd1492f1bcf4a7e7604c81398571a696f94f3d18992060caf6b7057 +wrapdb_version = 3.3.7-1 + +[provide] +glfw3 = glfw_dep + diff --git a/subprojects/glm.wrap b/subprojects/glm.wrap new file mode 100755 index 0000000..3076857 --- /dev/null +++ b/subprojects/glm.wrap @@ -0,0 +1,12 @@ +[wrap-file] +directory = glm-0.9.9.8 +source_url = https://github.com/g-truc/glm/archive/0.9.9.8.tar.gz +source_filename = 0.9.9.8.tar.gz +source_hash = 7d508ab72cb5d43227a3711420f06ff99b0a0cb63ee2f93631b162bfe1fe9592 +patch_url = https://wrapdb.mesonbuild.com/v2/glm_0.9.9.8-2/get_patch +patch_filename = glm-0.9.9.8-2-wrap.zip +patch_hash = d930a1fcd3a28d84be4e92cc4c71ff59e170a1ebbd3dbfce631eba19e478d83d + +[provide] +glm = glm_dep + diff --git a/subprojects/gtest.wrap b/subprojects/gtest.wrap new file mode 100755 index 0000000..730de1a --- /dev/null +++ b/subprojects/gtest.wrap @@ -0,0 +1,15 @@ +[wrap-file] +directory = googletest-release-1.11.0 +source_url = https://github.com/google/googletest/archive/release-1.11.0.tar.gz +source_filename = gtest-1.11.0.tar.gz +source_hash = b4870bf121ff7795ba20d20bcdd8627b8e088f2d1dab299a031c1034eddc93d5 +patch_filename = gtest_1.11.0-2_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/gtest_1.11.0-2/get_patch +patch_hash = 764530d812ac161c9eab02a8cfaec67c871fcfc5548e29fd3d488070913d4e94 + +[provide] +gtest = gtest_dep +gtest_main = gtest_main_dep +gmock = gmock_dep +gmock_main = gmock_main_dep + diff --git a/subprojects/hack.wrap b/subprojects/hack.wrap new file mode 100755 index 0000000..8b65299 --- /dev/null +++ b/subprojects/hack.wrap @@ -0,0 +1,6 @@ +[wrap-git] +url = https://gitcast.ru/chatlanin/hack.git +revision = master + +[provide] +hack = hack_dep diff --git a/subprojects/imgui.wrap b/subprojects/imgui.wrap new file mode 100755 index 0000000..c60d1a4 --- /dev/null +++ b/subprojects/imgui.wrap @@ -0,0 +1,12 @@ +[wrap-file] +directory = imgui-1.87 +source_url = https://github.com/ocornut/imgui/archive/refs/tags/v1.87.tar.gz +source_filename = imgui-1.87.tar.gz +source_hash = b54ceb35bda38766e36b87c25edf7a1cd8fd2cb8c485b245aedca6fb85645a20 +patch_filename = imgui_1.87-4_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/imgui_1.87-4/get_patch +patch_hash = a008fc446e8c09c5a6c985ba94d4ffe04534f8c805f2805afdd0ba17ea6c73f5 +wrapdb_version = 1.87-4 + +[provide] +imgui = imgui_dep diff --git a/subprojects/nlohmann_json.wrap b/subprojects/nlohmann_json.wrap new file mode 100644 index 0000000..5445740 --- /dev/null +++ b/subprojects/nlohmann_json.wrap @@ -0,0 +1,2 @@ +[wrap-redirect] +filename = hack/subprojects/nlohmann_json.wrap diff --git a/vertex_engine.gif b/vertex_engine.gif new file mode 100644 index 0000000..011e016 Binary files /dev/null and b/vertex_engine.gif differ