MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / BeginSavedWindowPos

Function BeginSavedWindowPos

source/MRViewer/ImGuiHelpers.cpp:639–648  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

637}
638
639bool BeginSavedWindowPos( const std::string& name, bool* open, const SavedWindowPosParams& params )
640{
641 ImGuiWindow* window = ImGui::FindWindowByName( name.c_str() );
642 auto [initialWindowPos, haveSavedWindowPos] = LoadSavedWindowPos( name.c_str(), window, params.size.y, params.pos );
643 UI::getDefaultWindowRectAllocator().setFreeNextWindowPos( name.c_str(), initialWindowPos, haveSavedWindowPos ? ImGuiCond_FirstUseEver : ImGuiCond_Appearing, ImVec2( 0, 0 ) );
644 ImGui::SetNextWindowSize( params.size, ImGuiCond_Appearing );
645 const bool res = Begin( name.c_str(), open, params.flags );
646 SaveWindowPosition( name.c_str(), window);
647 return res;
648}
649
650bool BeginCustomStatePlugin( const char* label, bool* open, const CustomStatePluginWindowParameters& params )
651{

Callers 1

drawMethod · 0.85

Calls 4

LoadSavedWindowPosFunction · 0.85
ImVec2Class · 0.85
SaveWindowPositionFunction · 0.85
setFreeNextWindowPosMethod · 0.80

Tested by

no test coverage detected