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 );
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 );
}
}
}
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;
}
}
}
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 );
}