| 637 | } |
| 638 | |
| 639 | bool 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 | |
| 650 | bool BeginCustomStatePlugin( const char* label, bool* open, const CustomStatePluginWindowParameters& params ) |
| 651 | { |
no test coverage detected