]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
Merge commit '8d6828cd68e9104c2c68b962b341b4f572b4bc38' into master-merge
authorThomas Debesse <dev@illwieckz.net>
Tue, 21 Jun 2022 04:23:57 +0000 (06:23 +0200)
committerThomas Debesse <dev@illwieckz.net>
Tue, 21 Jun 2022 04:23:57 +0000 (06:23 +0200)
1  2 
radiant/camwindow.cpp
radiant/camwindow.h
radiant/gtkdlgs.cpp
radiant/preferences.cpp
radiant/texwindow.cpp
radiant/xywindow.cpp
radiant/xywindow.h
tools/quake3/q3map2/main.c

Simple merge
index 4bb850806fe9798a80bcbd12ea2741b2c52f21b5,438af28fc349d5ee08c9766c69ffe8a15451f8d8..d5e76f9207b6f67cf419d07c91b285d2110f12b5
@@@ -68,7 -70,8 +70,8 @@@ struct camwindow_globals_
        camwindow_globals_t() :
                color_cameraback( 0.25f, 0.25f, 0.25f ),
                color_selbrushes3d( 1.0f, 0.f, 0.f ),
-               m_nCubicScale( 26 ){
 -              m_nCubicScale( 14 ),
++              m_nCubicScale( 26 ),
+               m_bZoomInToPointer( true ){
        }
  
  };
Simple merge
index 8d16946159e90bc8fb5162d9be58c0a210f555b5,adbfefba46874f292a975ddfdd96a378c165fbd9..efff8a087d8cf594ee033d142fcf42d45e55f6ab
@@@ -727,12 -667,9 +719,12 @@@ PreferencesPage createPage( const char
  
  ui::Window PrefsDlg::BuildDialog(){
        PreferencesDialog_addInterfacePreferences( makeCallbackF(Interface_constructPreferences) );
-       Mouse_registerPreferencesPage();
+       //Mouse_registerPreferencesPage();
  
 -      ui::Window dialog = ui::Window(create_floating_window( "NetRadiant Preferences", m_parent ));
 +      ui::Window dialog = ui::Window(create_floating_window( RADIANT_NAME " Preferences", m_parent ));
 +
 +      gtk_window_set_transient_for( dialog, m_parent );
 +      gtk_window_set_position( dialog, GTK_WIN_POS_CENTER_ON_PARENT );
  
        {
                auto mainvbox = ui::VBox( FALSE, 5 );
Simple merge
index 381f5b072d81edc0c0b1475ca544dea027bba96d,6da0a4b25fefd0907a712493a7da1f2906553915..4edf8344ef48307d0aed0f9d84cba3d8503199e5
@@@ -998,12 -995,28 +1003,34 @@@ void XYWnd::Clipper_OnMouseMoved( int x
  void XYWnd::Clipper_Crosshair_OnMouseMoved( int x, int y ){
        Vector3 mousePosition;
        XY_ToPoint( x, y, mousePosition );
++#if 0 // NetRadiantCustom
+       if ( ClipMode() ) {
+               if( GlobalClipPoints_Find( mousePosition, (VIEWTYPE)m_viewType, m_fScale ) != 0 ){
+                       GdkCursor *cursor;
+                       cursor = gdk_cursor_new( GDK_CROSSHAIR );
+                       //cursor = gdk_cursor_new( GDK_FLEUR );
+                       gdk_window_set_cursor( gtk_widget_get_window(m_gl_widget), cursor );
+                       gdk_cursor_unref( cursor );
+               }
+               else{
+                       GdkCursor *cursor;
+                       cursor = gdk_cursor_new( GDK_HAND2 );
+ //                    GdkPixbuf* pixbuf = pixbuf_new_from_file_with_mask( "bitmaps/icon.png" );
+ //                    cursor = gdk_cursor_new_from_pixbuf( gdk_display_get_default(), pixbuf, 0, 0 );
+ //                    g_object_unref( pixbuf );
+                       gdk_window_set_cursor( gtk_widget_get_window(m_gl_widget), cursor );
+                       gdk_cursor_unref( cursor );
+               }
+       }
++#else
 +      if ( ClipMode() && GlobalClipPoints_Find( mousePosition, (VIEWTYPE)m_viewType, m_fScale ) != 0 ) {
 +              set_cursor ( m_gl_widget, GDK_CROSSHAIR );
 +      }
++#endif
        else
        {
 -              gdk_window_set_cursor( gtk_widget_get_window(m_gl_widget), 0 );
 +              default_cursor( m_gl_widget );
        }
  }
  
@@@ -1311,7 -1322,12 +1340,12 @@@ void XYWnd_zoomDelta( int x, int y, uns
                        }
                        else
                        {
 -                                      reinterpret_cast<XYWnd*>( data )->ZoomIn();
+                               if ( g_xywindow_globals.m_bZoomInToPointer ) {
+                                       reinterpret_cast<XYWnd*>( data )->ZoomInWithMouse( g_zoom2x, g_zoom2y );
+                               }
+                               else{
 +                              reinterpret_cast<XYWnd*>( data )->ZoomIn();
+                               }
                                g_dragZoom += 8;
                        }
                }
@@@ -1329,9 -1345,9 +1363,11 @@@ void XYWnd::Zoom_Begin( int x, int y )
        }
        m_zoom_started = true;
        g_dragZoom = 0;
 -      g_xywnd_freezePointer.freeze_pointer( m_parent ? m_parent : MainFrame_getWindow(), m_gl_widget, XYWnd_zoomDelta, this );
+       g_zoom2x = x;
+       g_zoom2y = y;
 +      /* NetRadiantCustom did this instead:
 +      g_xywnd_freezePointer.freeze_pointer( m_parent ? m_parent : MainFrame_getWindow(), m_gl_widget, XYWnd_zoomDelta, this ); */
 +      g_xywnd_freezePointer.freeze_pointer( m_parent ? m_parent : MainFrame_getWindow(), XYWnd_zoomDelta, this );
        m_zoom_focusOut = m_gl_widget.connect( "focus_out_event", G_CALLBACK( XYWnd_Zoom_focusOut ), this );
  }
  
Simple merge
Simple merge