mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 13:37:42 -05:00
ui: Use borderless window on Windows
This commit is contained in:
26
external/ImGui/include/imgui_imhex_extensions.h
vendored
26
external/ImGui/include/imgui_imhex_extensions.h
vendored
@@ -6,6 +6,26 @@
|
||||
|
||||
namespace ImGui {
|
||||
|
||||
struct Texture {
|
||||
ImTextureID textureId;
|
||||
int width, height;
|
||||
|
||||
[[nodiscard]]
|
||||
constexpr bool valid() const noexcept {
|
||||
return this->textureId != nullptr;
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
constexpr operator ImTextureID() {
|
||||
return this->textureId;
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
auto size() const noexcept {
|
||||
return ImVec2(this->width, this->height);
|
||||
}
|
||||
};
|
||||
|
||||
bool IconHyperlink(const char *icon, const char* label, const ImVec2& size_arg = ImVec2(0, 0), ImGuiButtonFlags flags = 0);
|
||||
bool Hyperlink(const char* label, const ImVec2& size_arg = ImVec2(0, 0), ImGuiButtonFlags flags = 0);
|
||||
bool BulletHyperlink(const char* label, const ImVec2& size_arg = ImVec2(0, 0), ImGuiButtonFlags flags = 0);
|
||||
@@ -22,9 +42,9 @@ namespace ImGui {
|
||||
return static_cast<ImU32>(ImGui::GetTime() * 100) % 100 <= static_cast<ImU32>(ImGui::GetIO().DeltaTime * 100);
|
||||
}
|
||||
|
||||
std::tuple<ImTextureID, int, int> LoadImageFromPath(const char *path);
|
||||
std::tuple<ImTextureID, int, int> LoadImageFromMemory(ImU8 *buffer, int size);
|
||||
void UnloadImage(ImTextureID texture);
|
||||
Texture LoadImageFromPath(const char *path);
|
||||
Texture LoadImageFromMemory(ImU8 *buffer, int size);
|
||||
void UnloadImage(Texture &texture);
|
||||
|
||||
enum ImGuiCustomCol {
|
||||
ImGuiCustomCol_DescButton,
|
||||
|
||||
2
external/ImGui/include/imgui_impl_glfw.h
vendored
2
external/ImGui/include/imgui_impl_glfw.h
vendored
@@ -32,4 +32,4 @@ IMGUI_IMPL_API void ImGui_ImplGlfw_NewFrame();
|
||||
IMGUI_IMPL_API void ImGui_ImplGlfw_MouseButtonCallback(GLFWwindow* window, int button, int action, int mods);
|
||||
IMGUI_IMPL_API void ImGui_ImplGlfw_ScrollCallback(GLFWwindow* window, double xoffset, double yoffset);
|
||||
IMGUI_IMPL_API void ImGui_ImplGlfw_KeyCallback(GLFWwindow* window, int key, int scancode, int action, int mods);
|
||||
IMGUI_IMPL_API void ImGui_ImplGlfw_CharCallback(GLFWwindow* window, unsigned int c);
|
||||
IMGUI_IMPL_API void ImGui_ImplGlfw_CharCallback(GLFWwindow* window, unsigned int c);
|
||||
12
external/ImGui/source/imgui_imhex_extensions.cpp
vendored
12
external/ImGui/source/imgui_imhex_extensions.cpp
vendored
@@ -235,7 +235,7 @@ namespace ImGui {
|
||||
colors[ImGuiCustomCol_DescButtonActive] = ImColor(80, 80, 120);
|
||||
}
|
||||
|
||||
std::tuple<ImTextureID, int, int> LoadImageFromPath(const char *path) {
|
||||
Texture LoadImageFromPath(const char *path) {
|
||||
int imageWidth = 0;
|
||||
int imageHeight = 0;
|
||||
|
||||
@@ -261,7 +261,7 @@ namespace ImGui {
|
||||
return { reinterpret_cast<ImTextureID>(static_cast<intptr_t>(texture)), imageWidth, imageHeight };
|
||||
}
|
||||
|
||||
std::tuple<ImTextureID, int, int> LoadImageFromMemory(ImU8 *buffer, int size) {
|
||||
Texture LoadImageFromMemory(ImU8 *buffer, int size) {
|
||||
int imageWidth = 0;
|
||||
int imageHeight = 0;
|
||||
|
||||
@@ -288,12 +288,14 @@ namespace ImGui {
|
||||
return { reinterpret_cast<ImTextureID>(static_cast<intptr_t>(texture)), imageWidth, imageHeight };
|
||||
}
|
||||
|
||||
void UnloadImage(ImTextureID texture) {
|
||||
if (texture == nullptr)
|
||||
void UnloadImage(Texture &texture) {
|
||||
if (texture.textureId == nullptr)
|
||||
return;
|
||||
|
||||
auto glTextureId = static_cast<GLuint>(reinterpret_cast<intptr_t>(texture));
|
||||
auto glTextureId = static_cast<GLuint>(reinterpret_cast<intptr_t>(texture.textureId));
|
||||
glDeleteTextures(1, &glTextureId);
|
||||
|
||||
texture = { nullptr, 0, 0 };
|
||||
}
|
||||
|
||||
}
|
||||
2
external/curl
vendored
2
external/curl
vendored
Submodule external/curl updated: 31480dbd37...bfbde883af
Reference in New Issue
Block a user