X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=radiant%2Fcamwindow.cpp;h=a9f19224b76c23bfe123dce4beaa4cd319acf0e5;hb=3646c894a9193c8b9c09e3d61eace065feede473;hp=de2e03e0e1b438b6a514d9754e0aa05ae8ed17c7;hpb=e4287c28bb2dafedc81c66e63951d947cfbeb225;p=xonotic%2Fnetradiant.git diff --git a/radiant/camwindow.cpp b/radiant/camwindow.cpp index de2e03e0..a9f19224 100644 --- a/radiant/camwindow.cpp +++ b/radiant/camwindow.cpp @@ -656,10 +656,6 @@ class CamWnd View m_view; camera_t m_Camera; RadiantCameraView m_cameraview; -#if 0 -int m_PositionDragCursorX; -int m_PositionDragCursorY; -#endif guint m_freemove_handle_focusout; @@ -692,11 +688,9 @@ CamWnd(); bool m_drawing; void queue_draw(){ - //ASSERT_MESSAGE(!m_drawing, "CamWnd::queue_draw(): called while draw is already in progress"); if ( m_drawing ) { return; } - //globalOutputStream() << "queue... "; m_deferredDraw.draw(); } void draw(); @@ -815,15 +809,6 @@ gboolean disable_freelook_button_press( GtkWidget* widget, GdkEventButton* event return FALSE; } -#if 0 -gboolean mousecontrol_button_press( GtkWidget* widget, GdkEventButton* event, CamWnd* camwnd ){ - if ( event->type == GDK_BUTTON_PRESS && event->button == 3 ) { - Cam_MouseControl( camwnd->getCamera(), event->x, widget->allocation.height - 1 - event->y ); - } - return FALSE; -} -#endif - void camwnd_update_xor_rectangle( CamWnd& self, rect_t area ){ if ( GTK_WIDGET_VISIBLE( self.m_gl_widget ) ) { self.m_XORRectangle.set( rectangle_from_area( area.min, area.max, self.getCamera().width, self.getCamera().height ) ); @@ -1243,39 +1228,6 @@ void CamWnd::Cam_ChangeFloor( bool up ){ } -#if 0 - -// button_press -Sys_GetCursorPos( &m_PositionDragCursorX, &m_PositionDragCursorY ); - -// motion -if ( ( m_bFreeMove && ( buttons == ( RAD_CONTROL | RAD_SHIFT ) ) ) - || ( !m_bFreeMove && ( buttons == ( RAD_RBUTTON | RAD_CONTROL ) ) ) ) { - Cam_PositionDrag(); - CamWnd_Update( camwnd ); - CameraMovedNotify(); - return; -} - -void CamWnd::Cam_PositionDrag(){ - int x, y; - - Sys_GetCursorPos( GTK_WINDOW( m_gl_widget ), &x, &y ); - if ( x != m_PositionDragCursorX || y != m_PositionDragCursorY ) { - x -= m_PositionDragCursorX; - vector3_add( m_Camera.origin, vector3_scaled( m_Camera.vright, x ) ); - y -= m_PositionDragCursorY; - m_Camera.origin[2] -= y; - Camera_updateModelview(); - CamWnd_Update( camwnd ); - CameraMovedNotify(); - - Sys_SetCursorPos( GTK_WINDOW( m_parent ), m_PositionDragCursorX, m_PositionDragCursorY ); - } -} -#endif - - // NOTE TTimo if there's an OS-level focus out of the application // then we can release the camera cursor grab static gboolean camwindow_freemove_focusout( GtkWidget* widget, GdkEventFocus* event, gpointer data ){ @@ -1409,10 +1361,6 @@ ToggleItem g_show_stats( g_show_stats_callback ); void CamWnd::Cam_Draw(){ glViewport( 0, 0, m_Camera.width, m_Camera.height ); -#if 0 - GLint viewprt[4]; - glGetIntegerv( GL_VIEWPORT, viewprt ); -#endif // enable depth buffer writes glDepthMask( GL_TRUE ); @@ -1664,7 +1612,7 @@ void Camera_ToggleFarClip(){ void CamWnd_constructToolbar( GtkToolbar* toolbar ){ - toolbar_append_toggle_button( toolbar, "Cubic clip the camera view (\\)", "view_cubicclipping.bmp", "ToggleCubicClip" ); + toolbar_append_toggle_button( toolbar, "Cubic clip the camera view (\\)", "view_cubicclipping.png", "ToggleCubicClip" ); } void CamWnd_registerShortcuts(){