ui: Turned spinner into ImGui widget
This commit is contained in:
parent
7f21cdffa2
commit
ced9706c5b
@ -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);
|
||||
}
|
@ -153,4 +153,8 @@ namespace ImGui {
|
||||
}
|
||||
}
|
||||
|
||||
void TextSpinner(const char* label) {
|
||||
ImGui::Text("[%c] %s", "|/-\\"[ImU32(ImGui::GetTime() * 20) % 4], label);
|
||||
}
|
||||
|
||||
}
|
@ -108,7 +108,7 @@ namespace hex::plugin::builtin {
|
||||
{ "hex.view.disassembler.sparc.v9", "Sparc V9 mode" },
|
||||
|
||||
{ "hex.view.disassembler.disassemble", "Disassemble" },
|
||||
{ "hex.view.disassembler.disassembling", "[%c] Disassembling..." },
|
||||
{ "hex.view.disassembler.disassembling", "Disassembling..." },
|
||||
{ "hex.view.disassembler.disassembly.title", "Disassembly" },
|
||||
{ "hex.view.disassembler.disassembly.address", "Address" },
|
||||
{ "hex.view.disassembler.disassembly.offset", "Offset" },
|
||||
@ -221,7 +221,7 @@ namespace hex::plugin::builtin {
|
||||
{ "hex.view.pattern.accept_pattern.question", "Do you want to apply the selected pattern?" },
|
||||
{ "hex.view.pattern.menu.file.load_pattern", "Load pattern..." },
|
||||
{ "hex.view.pattern.open_pattern", "Open pattern" },
|
||||
{ "hex.view.pattern.evaluating", "[%c] Evaluating..." },
|
||||
{ "hex.view.pattern.evaluating", "Evaluating..." },
|
||||
{ "hex.view.pattern.auto", "Auto evaluate" },
|
||||
|
||||
{ "hex.view.pattern_data.name", "Pattern Data" },
|
||||
@ -240,7 +240,7 @@ namespace hex::plugin::builtin {
|
||||
{ "hex.view.strings.min_length", "Minimum length" },
|
||||
{ "hex.view.strings.filter", "Filter" },
|
||||
{ "hex.view.strings.extract", "Extract" },
|
||||
{ "hex.view.strings.searching", "[%c] Searching..." },
|
||||
{ "hex.view.strings.searching", "Searching..." },
|
||||
{ "hex.view.strings.offset", "Offset" },
|
||||
{ "hex.view.strings.size", "Size" },
|
||||
{ "hex.view.strings.string", "String" },
|
||||
|
@ -249,7 +249,7 @@ namespace hex {
|
||||
|
||||
if (this->m_disassembling) {
|
||||
ImGui::SameLine();
|
||||
ImGui::Text("hex.view.disassembler.disassembling"_lang, "|/-\\"[u8(ImGui::GetTime() * 20) % 4]);
|
||||
ImGui::TextSpinner("hex.view.disassembler.disassembling"_lang);
|
||||
}
|
||||
|
||||
ImGui::NewLine();
|
||||
|
@ -267,7 +267,7 @@ namespace hex {
|
||||
|
||||
ImGui::SameLine();
|
||||
if (this->m_evaluatorRunning)
|
||||
ImGui::Text("hex.view.pattern.evaluating"_lang, "|/-\\"[u8(ImGui::GetTime() * 20) % 4]);
|
||||
ImGui::TextSpinner("hex.view.pattern.evaluating"_lang);
|
||||
else
|
||||
ImGui::Checkbox("hex.view.pattern.auto"_lang, &this->m_runAutomatically);
|
||||
|
||||
|
@ -102,7 +102,7 @@ namespace hex {
|
||||
|
||||
if (this->m_searching) {
|
||||
ImGui::SameLine();
|
||||
ImGui::Text("hex.view.strings.searching"_lang, "|/-\\"[u8(ImGui::GetTime() * 20) % 4]);
|
||||
ImGui::TextSpinner("hex.view.strings.searching"_lang);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user