From d39c0bbce9c335d9bf42e2c7cf460f12f4c588ff Mon Sep 17 00:00:00 2001 From: chatlanin Date: Mon, 13 Jan 2025 21:30:05 +0300 Subject: [PATCH] fix some setup --- src/glfw/glfw.cpp | 12 ++++++++++++ src/gui/flags.hpp | 2 +- src/gui/gui.hpp | 2 +- src/gui/style/fonts.hpp | 2 +- src/gui/style/icons.hpp | 2 +- src/gui/style/style.hpp | 2 +- src/utils/include.hpp | 36 ++++++++++++++++++------------------ src/utils/utils.hpp | 14 +++++++------- src/utils/var.hpp | 2 +- 9 files changed, 43 insertions(+), 31 deletions(-) diff --git a/src/glfw/glfw.cpp b/src/glfw/glfw.cpp index db80369..54071b6 100755 --- a/src/glfw/glfw.cpp +++ b/src/glfw/glfw.cpp @@ -29,6 +29,18 @@ namespace VE set_hint(); set_window(); set_graphic_context(); + + + unsigned char pixels[9 * 9 * 4]; + memset(pixels, 0xff, sizeof(pixels)); + GLFWimage image; + image.width = 9; + image.height = 9; + image.pixels = pixels; + GLFWcursor* cursor = glfwCreateCursor(&image, 0, 0); + glfwSetCursor(m_win, cursor); + + set_pointer(); set_key_callback(); set_mouse_callback(); diff --git a/src/gui/flags.hpp b/src/gui/flags.hpp index 483bcc5..c76e1c2 100644 --- a/src/gui/flags.hpp +++ b/src/gui/flags.hpp @@ -1,6 +1,6 @@ #pragma once -#include "utils/utils.hpp" +#include "utils/utils.hpp" // IWYU pragma: keep namespace VE { diff --git a/src/gui/gui.hpp b/src/gui/gui.hpp index 490e124..9d684eb 100755 --- a/src/gui/gui.hpp +++ b/src/gui/gui.hpp @@ -1,6 +1,6 @@ #pragma once -#include "utils/utils.hpp" +#include "utils/utils.hpp" // IWYU pragma: keep #include "glfw/glfw.hpp" namespace VE diff --git a/src/gui/style/fonts.hpp b/src/gui/style/fonts.hpp index 4b1e8a0..2771d81 100755 --- a/src/gui/style/fonts.hpp +++ b/src/gui/style/fonts.hpp @@ -8,7 +8,7 @@ #include "icons.hpp" -#include "utils/utils.hpp" +#include "utils/utils.hpp" // IWYU pragma: keep namespace VE::style::fonts { diff --git a/src/gui/style/icons.hpp b/src/gui/style/icons.hpp index 77d2dd3..032d7ad 100755 --- a/src/gui/style/icons.hpp +++ b/src/gui/style/icons.hpp @@ -716,4 +716,4 @@ namespace VE::style::icon 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 index 66e4985..51db3d2 100755 --- a/src/gui/style/style.hpp +++ b/src/gui/style/style.hpp @@ -2,7 +2,7 @@ #include "imgui.h" -#include "icons.hpp" +#include "icons.hpp" // IWYU pragma: keep #include "fonts.hpp" namespace VE::style diff --git a/src/utils/include.hpp b/src/utils/include.hpp index 9b97f8e..beb1578 100755 --- a/src/utils/include.hpp +++ b/src/utils/include.hpp @@ -1,19 +1,19 @@ #pragma once -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include // IWYU pragma: keep +#include // IWYU pragma: keep +#include // IWYU pragma: keep +#include // IWYU pragma: keep +#include // IWYU pragma: keep +#include // IWYU pragma: keep +#include // IWYU pragma: keep +#include // IWYU pragma: keep +#include // IWYU pragma: keep +#include // IWYU pragma: keep /* Если первым включен glad -то происход ругание на то что уже есть glad +то происходит ругание на то, что уже есть glad и тут есть два пути исправления первый #define GLFW_INCLUDE_NONE @@ -22,10 +22,10 @@ второй это поставить glad первым */ -#include "glad.h" -#include "GLFW/glfw3.h" -#include "hack/logger/logger.hpp" -#include "hack/utils/singleton.hpp" -#include "imgui.h" -#include "imgui_impl_glfw.h" -#include "imgui_impl_opengl3.h" +#include "glad.h" // IWYU pragma: keep +#include "GLFW/glfw3.h" // IWYU pragma: keep +#include "hack/logger/logger.hpp" // IWYU pragma: keep +#include "hack/utils/singleton.hpp" // IWYU pragma: keep +#include "imgui.h" // IWYU pragma: keep +#include "imgui_impl_glfw.h" // IWYU pragma: keep +#include "imgui_impl_opengl3.h" // IWYU pragma: keep diff --git a/src/utils/utils.hpp b/src/utils/utils.hpp index 228635a..e0bafaa 100644 --- a/src/utils/utils.hpp +++ b/src/utils/utils.hpp @@ -1,9 +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" +#include "define.hpp" // IWYU pragma: keep +#include "keycode.hpp" // IWYU pragma: keep +#include "time.hpp" // IWYU pragma: keep +#include "var.hpp" // IWYU pragma: keep +#include "include.hpp" // IWYU pragma: keep +#include "using.hpp" // IWYU pragma: keep +#include "math.hpp" // IWYU pragma: keep diff --git a/src/utils/var.hpp b/src/utils/var.hpp index 1f30a36..b407a71 100644 --- a/src/utils/var.hpp +++ b/src/utils/var.hpp @@ -1,6 +1,6 @@ #pragma once -#include "include.hpp" +#include "include.hpp" // IWYU pragma: keep namespace VE::var {