mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 13:37:42 -05:00
ui: Run pattern language runtime asynchronously, added compile button
This commit is contained in:
@@ -12,4 +12,5 @@ namespace ImGui {
|
||||
|
||||
void UnderlinedText(const char* label, ImColor color, const ImVec2& size_arg = ImVec2(0, 0));
|
||||
|
||||
void Disabled(std::function<void()> widgets, bool disabled);
|
||||
}
|
||||
12
external/ImGui/source/imgui_imhex_extensions.cpp
vendored
12
external/ImGui/source/imgui_imhex_extensions.cpp
vendored
@@ -141,4 +141,16 @@ namespace ImGui {
|
||||
PopStyleColor();
|
||||
}
|
||||
|
||||
void Disabled(std::function<void()> widgets, bool disabled) {
|
||||
if (disabled) {
|
||||
ImGui::PushItemFlag(ImGuiItemFlags_Disabled, true);
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_Alpha, ImGui::GetStyle().Alpha * 0.5F);
|
||||
widgets();
|
||||
ImGui::PopStyleVar();
|
||||
ImGui::PopItemFlag();
|
||||
} else {
|
||||
widgets();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user