-
|
Dear Prof. Levy, Thanks for your help on transparency control. Now I have add it to the Vorpaview. Although there are some zigzags in model corners, it is pretty enough for my demand. Now I get stunk in another problem. I'm trying to add a new panel and put it beside existing "Viewer" panel. Therefore I'm trying to understand the control of subwindow position/docking by checking the context around I noticed that the "Viewer" panel is well postioned on the left side as well as the "Object" panel on the right side, but I cannot find the code about their postion control. I commented the context around the two panel, changed their order, but their position didn't change. However, if I edit their name (e.g. change "Viewer" to "Viewe" or something else), their position become changed, and they seemed to be positioned at the default position with default panel size. I tried to search by panel name, but found nothing. I think these evidences show that it is not a default control by imgui, and the relevant code must be somewhere but I failed to find out. Therefore, would you please to tell me how these panel positioned/docked? Edited: Sorry but it seems that I have found the answer. The default GUI state is saved in |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Yes, you got it right ! This is the way I do it:
Alternatively, you may use instead |
Beta Was this translation helpful? Give feedback.
Yes, you got it right ! This is the way I do it:
gui:expert=truecommand line argumentWindows->Export gui state to C++This creates a
gui_state.hfile, that you need to#includein your app source.Then you can load the serialized gui state by using
Application::set_gui_state(). This is the way that I prefer, because it lets you completely control the state of the windows (including docking and visibility).Alternatively, you may use instead
ImGui::SetNextWindowPos()andImGui::SetNextWindowSize().