mirror of https://github.com/WerWolv/ImHex.git
fix: ImU64 is somehow not the same as u64 on Linux
This commit is contained in:
parent
586bca4bf6
commit
28e5f62c60
|
@ -1,5 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <hex.hpp>
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
|
||||||
#define IMGUI_DEFINE_MATH_OPERATORS
|
#define IMGUI_DEFINE_MATH_OPERATORS
|
||||||
|
@ -72,8 +74,8 @@ namespace ImGui {
|
||||||
bool ToolBarButton(const char *symbol, ImVec4 color);
|
bool ToolBarButton(const char *symbol, ImVec4 color);
|
||||||
bool IconButton(const char *symbol, ImVec4 color, ImVec2 size_arg = ImVec2(0, 0));
|
bool IconButton(const char *symbol, ImVec4 color, ImVec2 size_arg = ImVec2(0, 0));
|
||||||
|
|
||||||
bool InputIntegerPrefix(const char* label, const char *prefix, ImU64 *value, ImGuiInputTextFlags flags = ImGuiInputTextFlags_None);
|
bool InputIntegerPrefix(const char* label, const char *prefix, u64 *value, ImGuiInputTextFlags flags = ImGuiInputTextFlags_None);
|
||||||
bool InputHexadecimal(const char* label, ImU64 *value, ImGuiInputTextFlags flags = ImGuiInputTextFlags_None);
|
bool InputHexadecimal(const char* label, u64 *value, ImGuiInputTextFlags flags = ImGuiInputTextFlags_None);
|
||||||
|
|
||||||
inline bool HasSecondPassed() {
|
inline bool HasSecondPassed() {
|
||||||
return static_cast<ImU32>(ImGui::GetTime() * 100) % 100 <= static_cast<ImU32>(ImGui::GetIO().DeltaTime * 100);
|
return static_cast<ImU32>(ImGui::GetTime() * 100) % 100 <= static_cast<ImU32>(ImGui::GetIO().DeltaTime * 100);
|
||||||
|
|
|
@ -495,7 +495,7 @@ namespace ImGui {
|
||||||
return pressed;
|
return pressed;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool InputIntegerPrefix(const char *label, const char *prefix, ImU64 *value, ImGuiInputTextFlags flags) {
|
bool InputIntegerPrefix(const char *label, const char *prefix, u64 *value, ImGuiInputTextFlags flags) {
|
||||||
auto window = ImGui::GetCurrentWindow();
|
auto window = ImGui::GetCurrentWindow();
|
||||||
const ImGuiID id = window->GetID(label);
|
const ImGuiID id = window->GetID(label);
|
||||||
const ImGuiStyle &style = GImGui->Style;
|
const ImGuiStyle &style = GImGui->Style;
|
||||||
|
@ -527,7 +527,7 @@ namespace ImGui {
|
||||||
return value_changed;
|
return value_changed;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool InputHexadecimal(const char *label, ImU64 *value, ImGuiInputTextFlags flags) {
|
bool InputHexadecimal(const char *label, u64 *value, ImGuiInputTextFlags flags) {
|
||||||
return InputIntegerPrefix(label, "0x", value, flags | ImGuiInputTextFlags_CharsHexadecimal);
|
return InputIntegerPrefix(label, "0x", value, flags | ImGuiInputTextFlags_CharsHexadecimal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue