diff options
| author | navewindre <boneyaard@gmail.com> | 2025-11-27 17:19:02 +0100 |
|---|---|---|
| committer | navewindre <boneyaard@gmail.com> | 2025-11-27 17:21:48 +0100 |
| commit | e3de3ba5162f7ddd5005911124d4333e140fd984 (patch) | |
| tree | efb2d3851940ba1b70f0105611cddb17344e7e32 /src/editor/view3d.cpp | |
| parent | 5c8bbc3bc618068af1f7d6f2829c4346570c2ab9 (diff) | |
bunch o stuff
Diffstat (limited to 'src/editor/view3d.cpp')
| -rw-r--r-- | src/editor/view3d.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/editor/view3d.cpp b/src/editor/view3d.cpp index 61bcc3e..64cfe85 100644 --- a/src/editor/view3d.cpp +++ b/src/editor/view3d.cpp @@ -32,7 +32,7 @@ void gui_editor_3dview_draw_showpos( GUI_EDITOR_3DVIEW* view ) { objl->pl->rot.x ); - if( input.mouse_captured ) { + if( input.mouselock ) { gui_draw_str( x + 2, y + 2, ALIGN_L, @@ -65,7 +65,7 @@ void gui_editor_3dview_draw_fn( void* ptr ) { bsp_draw( editor->map->bsp, editor->game, wnd, winsize ); else world_draw( editor->game, objl->world, wnd, winsize ); - + gui_editor_3dview_draw_showpos( view ); } @@ -75,14 +75,17 @@ void gui_editor_3dview_input_fn( void* ptr ) { if( !objl->pl ) return; - if( input.mouse.left && !input.mouse_captured ) { + if( input.mouse.left ) { I32 view_x = gui_relx( view ); I32 view_y = gui_rely( view ) + EDITORVIEW_TITLE_OFFSET; if( input.mouse.pos.x >= view_x && input.mouse.pos.x < view_x + view->w && input.mouse.pos.y >= view_y && input.mouse.pos.y < view_y + view->h ) { - input_capture_mouse( true ); + if( !input.mouselock && !view->heldoutbounds ) + input_capture_mouse( true ); + } else { + view->heldoutbounds = 1; } - } + } else view->heldoutbounds = 0; game_on_tick( editor->game ); } |
