feat: Added blocking tasks that show a full-screen modal when active

This commit is contained in:
WerWolv
2025-02-02 11:24:28 +01:00
parent 06c019387c
commit 19f9296a40
6 changed files with 98 additions and 15 deletions

View File

@@ -941,7 +941,7 @@ namespace ImGuiExt {
return result;
}
void SmallProgressBar(float fraction, float yOffset) {
void ProgressBar(float fraction, ImVec2 size_value, float yOffset) {
ImGuiWindow *window = GetCurrentWindow();
if (window->SkipItems)
return;
@@ -950,7 +950,7 @@ namespace ImGuiExt {
const ImGuiStyle &style = g.Style;
ImVec2 pos = window->DC.CursorPos + ImVec2(0, yOffset);
ImVec2 size = CalcItemSize(ImVec2(100, 5) * hex::ImHexApi::System::getGlobalScale(), 100, g.FontSize + style.FramePadding.y * 2.0F);
ImVec2 size = CalcItemSize(size_value, ImGui::GetContentRegionAvail().x, g.FontSize + style.FramePadding.y * 2.0F);
ImRect bb(pos, pos + size);
ItemSize(size, 0);
if (!ItemAdd(bb, 0))