mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-03 14:20:21 +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:
@@ -122,6 +122,8 @@ public:
|
||||
static void cursor_pos_callback(double x, double y);
|
||||
static void cursor_enter_callback(int entered);
|
||||
static void focus_callback(int focused);
|
||||
// key presses in windows of the ui outside of the main window, passed on to the simulator like those of the main window
|
||||
static void viewport_key_callback(GLFWwindow *Window, int key, int scancode, int action, int mods);
|
||||
|
||||
static ImFont *font_default;
|
||||
static ImFont *font_mono;
|
||||
@@ -130,6 +132,7 @@ public:
|
||||
protected:
|
||||
// members
|
||||
static GLFWwindow *m_window;
|
||||
static GLFWwindow *m_keywindow; // window of the key event being handled
|
||||
static ImGuiIO *m_imguiio;
|
||||
static bool m_cursorvisible;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user