ui: Turned spinner into ImGui widget

This commit is contained in:
WerWolv
2021-02-22 13:06:53 +01:00
parent 7f21cdffa2
commit ced9706c5b
6 changed files with 11 additions and 6 deletions

View File

@@ -13,4 +13,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);
void TextSpinner(const char* label);
}

View File

@@ -153,4 +153,8 @@ namespace ImGui {
}
}
void TextSpinner(const char* label) {
ImGui::Text("[%c] %s", "|/-\\"[ImU32(ImGui::GetTime() * 20) % 4], label);
}
}