mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-02 18:39:14 +01:00
feat(ui): panels can be docked together and dragged out of the simulator window into windows of their own (imgui multi-viewports, ui.viewports yes by default, off where the renderer or the platform can't do it, e.g. wayland); imgui coordinates kept relative to the main window by the glfw backend, so the overlays, picking and gizmo of the editor work unchanged; overlays of the 3d view drawn on the main viewport; keys pressed in the separate windows passed on to the simulator, so the shortcuts of the editor work there too
This commit is contained in:
@@ -784,6 +784,12 @@ bool global_settings::ConfigParseUI(cParser& Parser, const std::string& token)
|
||||
return true;
|
||||
}
|
||||
|
||||
if (token == "ui.viewports")
|
||||
{
|
||||
ParseOne(Parser, ui_viewports, 1);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (token == "gui.defaultwindows")
|
||||
{
|
||||
ParseOne(Parser, gui_defaultwindows, 1);
|
||||
@@ -1670,6 +1676,7 @@ global_settings::export_as_text( std::ostream &Output ) const {
|
||||
<< UITextColor.g * 255 << " "
|
||||
<< UITextColor.b * 255 << "\n";
|
||||
export_as_text( Output, "ui.bg.opacity", UIBgOpacity );
|
||||
export_as_text( Output, "ui.viewports", ui_viewports );
|
||||
export_as_text( Output, "input.gamepad", InputGamepad );
|
||||
#ifdef WITH_UART
|
||||
if( uart_conf.enable ) {
|
||||
|
||||
Reference in New Issue
Block a user