mirror of
https://github.com/redstrate/Novus.git
synced 2025-06-08 14:17:45 +00:00
armoury: Add loading label to make it clearer
This commit is contained in:
parent
5c9284106f
commit
a5b758f1f4
1 changed files with 13 additions and 1 deletions
|
@ -22,7 +22,19 @@ GearView::GearView(GameData* data, FileCache& cache) : data(data), cache(cache)
|
||||||
setLayout(layout);
|
setLayout(layout);
|
||||||
|
|
||||||
mdlPart->requestUpdate = [this] {
|
mdlPart->requestUpdate = [this] {
|
||||||
ImGui::Text("Hello, world!");
|
auto &io = ImGui::GetIO();
|
||||||
|
if (updating) {
|
||||||
|
if (ImGui::Begin("Loading", nullptr, ImGuiWindowFlags_NoNav | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoInputs)) {
|
||||||
|
ImGui::SetWindowPos(ImVec2(0, 0));
|
||||||
|
ImGui::SetWindowSize(io.DisplaySize);
|
||||||
|
|
||||||
|
const char *loadingLabel{"Loading gear..."};
|
||||||
|
ImGui::SetCursorPosX((io.DisplaySize.x - ImGui::CalcTextSize(loadingLabel).x) * 0.5f);
|
||||||
|
ImGui::SetCursorPosY((io.DisplaySize.y - ImGui::CalcTextSize(loadingLabel).y) * 0.5f);
|
||||||
|
ImGui::Text("%s", loadingLabel);
|
||||||
|
}
|
||||||
|
ImGui::End();
|
||||||
|
}
|
||||||
|
|
||||||
if (updating) {
|
if (updating) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Reference in a new issue