ImHex/external/ImGui/include/imgui_imhex_extensions.h

44 lines
1.5 KiB
C
Raw Normal View History

#pragma once
2021-01-27 11:04:42 +00:00
#include <functional>
#include <imgui.h>
namespace ImGui {
bool Hyperlink(const char* label, const ImVec2& size_arg = ImVec2(0, 0), ImGuiButtonFlags flags = 0);
2021-01-27 11:04:42 +00:00
bool BulletHyperlink(const char* label, const ImVec2& size_arg = ImVec2(0, 0), ImGuiButtonFlags flags = 0);
bool DescriptionButton(const char* label, const char* description, const ImVec2& size_arg = ImVec2(0, 0), ImGuiButtonFlags flags = 0);
void UnderlinedText(const char* label, ImColor color, const ImVec2& size_arg = ImVec2(0, 0));
void Disabled(const std::function<void()> &widgets, bool disabled);
2021-02-22 12:06:53 +00:00
void TextSpinner(const char* label);
void Header(const char *label, bool firstEntry = false);
2021-06-07 16:13:54 +00:00
inline bool HasSecondPassed() {
return static_cast<ImU32>(ImGui::GetTime() * 100) % 100 <= static_cast<ImU32>(ImGui::GetIO().DeltaTime * 100);
}
std::tuple<ImTextureID, int, int> LoadImageFromPath(const char *path);
2021-07-31 15:10:19 +00:00
std::tuple<ImTextureID, int, int> LoadImageFromMemory(ImU8 *buffer, int size);
void UnloadImage(ImTextureID texture);
enum ImGuiCustomCol {
ImGuiCustomCol_DescButton,
ImGuiCustomCol_DescButtonHovered,
ImGuiCustomCol_DescButtonActive,
ImGuiCustomCol_COUNT
};
struct ImHexCustomData {
ImVec4 Colors[ImGuiCustomCol_COUNT];
};
ImU32 GetCustomColorU32(ImGuiCustomCol idx, float alpha_mul = 1.0F);
void StyleCustomColorsDark();
void StyleCustomColorsLight();
void StyleCustomColorsClassic();
}