| 302 | } |
| 303 | |
| 304 | void 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 | |
| 330 | bool utils::IsItemActiveAlt(ImVec2 pos, int id) |
| 331 | { |