IMGUI_APIboolBegin(constchar*name="Debug",bool*p_opened=NULL,constImVec2&initial_size=ImVec2(0,0),floatbg_alpha=-1.0f,ImGuiWindowFlagsflags=0);// return false when window is collapsed, so you can early out in your code. passing 'bool* p_opened' displays a Close button on the upper-right corner of the window, the pointed value will be set to false when the button is pressed.