 |
RigsofRods
2023.09
Soft-body Physics Simulation
|
Go to the documentation of this file.
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] ";
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();
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);
GUIManager * GetGuiManager()
ImVec4 value_blue_text_color
void SetProgressNetConnect(const std::string &net_status)
enum Script2Game::ImGuiStyleVar ImGuiWindowFlags_NoCollapse
Disable user collapsing window by double-clicking on it.
Truck file format(technical spec)
enum Script2Game::ImGuiStyleVar ImGuiWindowFlags_NoInputs
ImGuiWindowFlags_NoMouseInputs | ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus,...
vector2 CalcTextSize(const string &in, bool hide_text_after_double_hash=false, float wrap_width=-1.0f)
void NewImGuiFrame(float dt)
void SetProgress(int _percent, const std::string &_text="", bool render_frame=true)
const int PERC_HIDE_PROGRESSBAR
const int PERC_SHOW_SPINNER
void LoadingIndicatorCircle(const char *label, const float indicator_radius, const ImVec4 &main_color, const ImVec4 &backdrop_color, const int circle_count, const float speed)
Draws animated loading spinner.
void Log(const char *msg)
The ultimate, application-wide logging function. Adds a line (any length) in 'RoR....
enum Script2Game::ImGuiStyleVar ImGuiWindowFlags_NoMove
Disable user moving the window.