MCPcopy Create free account
hub / github.com/Raais/ImStudio / ShowAboutWindow

Method ShowAboutWindow

src/utils/ims_utils.cpp:304–328  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

302}
303
304void utils::ShowAboutWindow(bool *child_about)
305{
306 std::string ver = PROJECT_VERSION_STRING;
307 std::string hash = GIT_SHA1;
308 if (hash.length() > 7)
309 hash = hash.substr(0, 7);
310
311 ImGui::OpenPopup("About");
312 ImVec2 center = ImGui::GetMainViewport()->GetCenter();
313 ImGui::SetNextWindowPos(center, ImGuiCond_Appearing, ImVec2(0.5f, 0.5f));
314 if (ImGui::BeginPopupModal("About", NULL, ImGuiWindowFlags_AlwaysAutoResize))
315 {
316 TextCentered("ImStudio");
317 ImGui::Separator();
318 ImGui::Text("Version: %s (%s)", ver.c_str(), hash.c_str());
319 ImGui::Text("Source: Raais/ImStudio");
320 ImGui::Text("ImGui: 18700 (c71a50d)");
321 ImGui::Text("Fmt: 8.0.1 (d141cdb)");
322 ImGui::Separator();
323
324 if (ImGui::Button("Back")) { ImGui::CloseCurrentPopup(); *child_about = false; }
325 ImGui::EndPopup();
326 }
327
328}
329
330bool utils::IsItemActiveAlt(ImVec2 pos, int id)
331{

Callers

nothing calls this directly

Calls 3

ImVec2Function · 0.85
GetCenterMethod · 0.80
c_strMethod · 0.45

Tested by

no test coverage detected