22 #include <fmt/format.h>
35 if (render_frame &&
m_timer.getMilliseconds() > 10)
50 Ogre::StringUtil::trim(
m_text);
53 while ((pos =
m_text.find(
"\n", pos+1)) != std::string::npos)
61 Ogre::Root::getSingleton().renderOneFrame();
66 msg <<
"[RoR|PleaseWaitUI] ";
85 float text_h = ImGui::CalcTextSize(
"A").y;
86 float statusbar_h = text_h + (ImGui::GetStyle().FramePadding.y * 2);
87 float titlebar_h = text_h + (ImGui::GetStyle().FramePadding.y * 2);
89 float height = titlebar_h +
90 ImGui::GetStyle().WindowPadding.y +
92 (ImGui::GetStyle().ItemSpacing.y * 2) +
94 ImGui::GetStyle().WindowPadding.y;
96 ImGui::SetNextWindowSize(ImVec2(500.f, height));
97 ImGui::SetNextWindowPosCenter();
98 ImGuiWindowFlags flags = ImGuiWindowFlags_NoInputs | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoMove;
99 ImGui::Begin(
_LC(
"LoadingWindow",
"Please wait"),
nullptr, flags);
100 ImGui::Text(
"%s",
m_text.c_str());
104 float spinner_size = 8.f;
114 ImGui::ProgressBar(
static_cast<float>(
m_percent)/100.f);