MCPcopy Create free account
hub / github.com/JRickey/BattleShip / DrawElement

Method DrawElement

port/gui/PortMenu.cpp:1801–1832  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1799}
1800
1801void PortMenu::DrawElement() {
1802 if (mMenuElementsInitialized) {
1803 Ship::Menu::DrawElement();
1804 }
1805
1806 // Re-extract confirmation: render as an in-context ImGui modal rather
1807 // than calling SDL_ShowSimpleMessageBox, which would nest a blocking
1808 // native modal (NSAlert / Win32 MessageBox) inside the in-progress
1809 // ImGui frame and the GPU command encode for that frame. ImGui's own
1810 // popup runs in the same context with no thread/native-modal nesting.
1811 if (mShowReextractMessage) {
1812 ImGui::OpenPopup("Re-extract scheduled");
1813 mShowReextractMessage = false;
1814 }
1815 const ImVec2 viewportCenter = ImGui::GetMainViewport()->GetCenter();
1816 ImGui::SetNextWindowPos(viewportCenter, ImGuiCond_Appearing, ImVec2(0.5f, 0.5f));
1817 if (ImGui::BeginPopupModal("Re-extract scheduled", nullptr,
1818 ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoSavedSettings)) {
1819 ImGui::TextWrapped(
1820 SSB64_O2R_NAME " will be regenerated from your ROM the next time the game launches.");
1821 ImGui::Spacing();
1822 if (ImGui::Button("OK", ImVec2(120, 0))) {
1823 ImGui::CloseCurrentPopup();
1824 }
1825 ImGui::EndPopup();
1826 }
1827
1828 RenderPostProcessLowResWarnModal();
1829#if !defined(__ANDROID__)
1830 RenderShaderPackModal();
1831#endif
1832}
1833
1834} // namespace ssb64

Callers

nothing calls this directly

Calls 3

ButtonFunction · 0.85
RenderShaderPackModalFunction · 0.85

Tested by

no test coverage detected