mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2024-11-10 07:11:54 +00:00
Merge pull request #211 from QBall147/master
Get rid of the rest of those gtk deprecated warnings for gtk-spin-button, also added 'Always caulk a new brush' to preferences
This commit is contained in:
commit
21445bdc19
14 changed files with 118 additions and 45 deletions
|
@ -1518,7 +1518,7 @@ GtkWidget* create_main_dialog(){
|
|||
g_object_set_data( G_OBJECT( dlg ), "roughness", entry );
|
||||
g_signal_connect( G_OBJECT( entry ), "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Roughness );
|
||||
|
||||
adj = gtk_adjustment_new( 1, 1, 32767, 1, 10, 10 );
|
||||
adj = gtk_adjustment_new( 1, 1, 32767, 1, 10, 0 );
|
||||
g_signal_connect( G_OBJECT( adj ), "value_changed", G_CALLBACK( general_random ), NULL );
|
||||
spin = gtk_spin_button_new( GTK_ADJUSTMENT( adj ), 1, 0 );
|
||||
gtk_widget_show( spin );
|
||||
|
@ -1652,7 +1652,7 @@ GtkWidget* create_main_dialog(){
|
|||
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
|
||||
g_object_set_data( G_OBJECT( dlg ), "nv_text", label );
|
||||
|
||||
adj = gtk_adjustment_new( 8, 1, MAX_ROWS, 1, 10, 10 );
|
||||
adj = gtk_adjustment_new( 8, 1, MAX_ROWS, 1, 10, 0 );
|
||||
g_signal_connect( G_OBJECT( adj ), "value_changed", G_CALLBACK( extents_nhnv_spin ), &NH );
|
||||
spin = gtk_spin_button_new( GTK_ADJUSTMENT( adj ), 1, 0 );
|
||||
gtk_widget_show( spin );
|
||||
|
@ -1662,7 +1662,7 @@ GtkWidget* create_main_dialog(){
|
|||
gtk_widget_set_usize( spin, 60, -2 );
|
||||
g_object_set_data( G_OBJECT( dlg ), "nh", spin );
|
||||
|
||||
adj = gtk_adjustment_new( 8, 1, MAX_ROWS, 1, 10, 10 );
|
||||
adj = gtk_adjustment_new( 8, 1, MAX_ROWS, 1, 10, 0 );
|
||||
g_signal_connect( G_OBJECT( adj ), "value_changed", G_CALLBACK( extents_nhnv_spin ), &NV );
|
||||
spin = gtk_spin_button_new( GTK_ADJUSTMENT( adj ), 1, 0 );
|
||||
gtk_widget_show( spin );
|
||||
|
@ -1684,7 +1684,7 @@ GtkWidget* create_main_dialog(){
|
|||
gtk_box_pack_start( GTK_BOX( vbox ), label, FALSE, TRUE, 0 );
|
||||
gtk_object_set_data( GTK_OBJECT( dlg ), "snap_text", label );
|
||||
|
||||
adj = gtk_adjustment_new( 8, 0, 256, 1, 10, 10 );
|
||||
adj = gtk_adjustment_new( 8, 0, 256, 1, 10, 0 );
|
||||
g_signal_connect( G_OBJECT( adj ), "value_changed", G_CALLBACK( extents_snaptogrid_spin ), &SP );
|
||||
spin = gtk_spin_button_new( GTK_ADJUSTMENT( adj ), 1, 0 );
|
||||
gtk_widget_show( spin );
|
||||
|
@ -1701,7 +1701,7 @@ GtkWidget* create_main_dialog(){
|
|||
gtk_widget_show( label );
|
||||
gtk_box_pack_start( GTK_BOX( hbox2 ), label, FALSE, TRUE, 0 );
|
||||
|
||||
adj = gtk_adjustment_new( 0, 0, 110, 1, 10, 10 );
|
||||
adj = gtk_adjustment_new( 0, 0, 110, 1, 10, 0 );
|
||||
g_signal_connect( G_OBJECT( adj ), "value_changed", G_CALLBACK( extents_decimate ), NULL );
|
||||
g_object_set_data( G_OBJECT( dlg ), "decimate_adj", adj );
|
||||
scale = gtk_hscale_new( GTK_ADJUSTMENT( adj ) );
|
||||
|
@ -1944,7 +1944,7 @@ GtkWidget* create_main_dialog(){
|
|||
gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 );
|
||||
g_object_set_data( G_OBJECT( dlg ), "fix_rate_text", label );
|
||||
|
||||
adj = gtk_adjustment_new( 0, -65536, 65536, 1, 16, 16 );
|
||||
adj = gtk_adjustment_new( 0, -65536, 65536, 1, 16, 0 );
|
||||
g_signal_connect( G_OBJECT( adj ), "value_changed", G_CALLBACK( fix_value_changed ), NULL );
|
||||
spin = gtk_spin_button_new( GTK_ADJUSTMENT( adj ), 1, 0 );
|
||||
gtk_widget_show( spin );
|
||||
|
@ -2061,7 +2061,7 @@ GtkWidget* create_main_dialog(){
|
|||
gtk_widget_show( label );
|
||||
gtk_box_pack_start( GTK_BOX( hbox2 ), label, FALSE, TRUE, 0 );
|
||||
|
||||
adj = gtk_adjustment_new( 60, 0, 90, 1, 10, 10 );
|
||||
adj = gtk_adjustment_new( 60, 0, 90, 1, 10, 0 );
|
||||
spin = gtk_spin_button_new( GTK_ADJUSTMENT( adj ), 1, 0 );
|
||||
gtk_widget_show( spin );
|
||||
gtk_box_pack_start( GTK_BOX( hbox2 ), spin, FALSE, TRUE, 0 );
|
||||
|
|
|
@ -393,14 +393,14 @@ void CreateViewWindow(){
|
|||
gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 );
|
||||
gtk_box_pack_start( GTK_BOX( hbox ), label, FALSE, TRUE, 0 );
|
||||
|
||||
adj = gtk_adjustment_new( 30, -90, 90, 1, 10, 10 );
|
||||
adj = gtk_adjustment_new( 30, -90, 90, 1, 10, 0 );
|
||||
gtk_signal_connect( adj, "value_changed", GTK_SIGNAL_FUNC( preview_spin ), &elevation );
|
||||
spin = gtk_spin_button_new( GTK_ADJUSTMENT( adj ), 1, 0 );
|
||||
gtk_widget_show( spin );
|
||||
gtk_box_pack_start( GTK_BOX( hbox ), spin, FALSE, TRUE, 0 );
|
||||
g_signal_connect( G_OBJECT( spin ), "focus_out_event", G_CALLBACK( doublevariable_spinfocusout ), &elevation );
|
||||
|
||||
adj = gtk_adjustment_new( 30, 0, 359, 1, 10, 10 );
|
||||
adj = gtk_adjustment_new( 30, 0, 359, 1, 10, 0 );
|
||||
gtk_signal_connect( adj, "value_changed", GTK_SIGNAL_FUNC( preview_spin ), &azimuth );
|
||||
spin = gtk_spin_button_new( GTK_ADJUSTMENT( adj ), 1, 0 );
|
||||
gtk_widget_show( spin );
|
||||
|
|
|
@ -874,6 +874,8 @@ typedef struct
|
|||
// set to true after OpenGL has been initialized and extensions have been tested
|
||||
bool m_bOpenGLReady;
|
||||
|
||||
// set this to true and any new brushes will be detail by default (else they are structural)
|
||||
bool m_bMakeDetail;
|
||||
} QEGlobals_t;
|
||||
|
||||
#endif // _QERTYPES_H_
|
||||
|
|
BIN
install/bitmaps/toggle_detail.png
Normal file
BIN
install/bitmaps/toggle_detail.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.6 KiB |
BIN
install/bitmaps/toggle_struct.png
Normal file
BIN
install/bitmaps/toggle_struct.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.6 KiB |
|
@ -1016,7 +1016,7 @@ GtkWidget* create_SurfaceInspector( void ){
|
|||
gtk_container_add( GTK_CONTAINER( eventbox ), lock_valuechange_togglebutton );
|
||||
|
||||
// Value Spins
|
||||
hshift_value_spinbutton_adj = gtk_adjustment_new( 0.0, -8192.0, 8192.0, 2.0, 8.0, 8.0 );
|
||||
hshift_value_spinbutton_adj = gtk_adjustment_new( 0.0, -8192.0, 8192.0, 2.0, 8.0, 0.0 );
|
||||
hshift_value_spinbutton = gtk_spin_button_new( GTK_ADJUSTMENT( hshift_value_spinbutton_adj ), 1, 2 );
|
||||
gtk_widget_show( hshift_value_spinbutton );
|
||||
gtk_table_attach( GTK_TABLE( table1 ), hshift_value_spinbutton, 1, 2, 2, 3,
|
||||
|
@ -1026,7 +1026,7 @@ GtkWidget* create_SurfaceInspector( void ){
|
|||
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON( hshift_value_spinbutton ), TRUE );
|
||||
gtk_widget_set_sensitive( GTK_WIDGET( hshift_value_spinbutton ), FALSE );
|
||||
|
||||
vshift_value_spinbutton_adj = gtk_adjustment_new( 0.0, -8192.0, 8192.0, 2.0, 8.0, 8.0 );
|
||||
vshift_value_spinbutton_adj = gtk_adjustment_new( 0.0, -8192.0, 8192.0, 2.0, 8.0, 0.0 );
|
||||
vshift_value_spinbutton = gtk_spin_button_new( GTK_ADJUSTMENT( vshift_value_spinbutton_adj ), 1, 2 );
|
||||
gtk_widget_show( vshift_value_spinbutton );
|
||||
gtk_table_attach( GTK_TABLE( table1 ), vshift_value_spinbutton, 1, 2, 4, 5,
|
||||
|
@ -1036,7 +1036,7 @@ GtkWidget* create_SurfaceInspector( void ){
|
|||
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON( vshift_value_spinbutton ), TRUE );
|
||||
gtk_widget_set_sensitive( GTK_WIDGET( vshift_value_spinbutton ), FALSE );
|
||||
|
||||
hscale_value_spinbutton_adj = gtk_adjustment_new( 0.0, -1024.0, 1024.0, 1.0, 4.0, 4.0 );
|
||||
hscale_value_spinbutton_adj = gtk_adjustment_new( 0.0, -1024.0, 1024.0, 1.0, 4.0, 0.0 );
|
||||
hscale_value_spinbutton = gtk_spin_button_new( GTK_ADJUSTMENT( hscale_value_spinbutton_adj ), 1, 4 );
|
||||
gtk_widget_show( hscale_value_spinbutton );
|
||||
gtk_table_attach( GTK_TABLE( table1 ), hscale_value_spinbutton, 1, 2, 6, 7,
|
||||
|
@ -1046,7 +1046,7 @@ GtkWidget* create_SurfaceInspector( void ){
|
|||
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON( hscale_value_spinbutton ), TRUE );
|
||||
gtk_widget_set_sensitive( GTK_WIDGET( hscale_value_spinbutton ), FALSE );
|
||||
|
||||
vscale_value_spinbutton_adj = gtk_adjustment_new( 0.0, -1024.0, 1024.0, 1.0, 4.0, 4.0 );
|
||||
vscale_value_spinbutton_adj = gtk_adjustment_new( 0.0, -1024.0, 1024.0, 1.0, 4.0, 0.0 );
|
||||
vscale_value_spinbutton = gtk_spin_button_new( GTK_ADJUSTMENT( vscale_value_spinbutton_adj ), 1, 4 );
|
||||
gtk_widget_show( vscale_value_spinbutton );
|
||||
gtk_table_attach( GTK_TABLE( table1 ), vscale_value_spinbutton, 1, 2, 8, 9,
|
||||
|
@ -1056,7 +1056,7 @@ GtkWidget* create_SurfaceInspector( void ){
|
|||
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON( vscale_value_spinbutton ), TRUE );
|
||||
gtk_widget_set_sensitive( GTK_WIDGET( vscale_value_spinbutton ), FALSE );
|
||||
|
||||
rotate_value_spinbutton_adj = gtk_adjustment_new( 0.0, -360.0, 360.0, 1.0, 10.0, 10.0 );
|
||||
rotate_value_spinbutton_adj = gtk_adjustment_new( 0.0, -360.0, 360.0, 1.0, 10.0, 0.0 );
|
||||
rotate_value_spinbutton = gtk_spin_button_new( GTK_ADJUSTMENT( rotate_value_spinbutton_adj ), 1, 4 );
|
||||
gtk_widget_show( rotate_value_spinbutton );
|
||||
gtk_table_attach( GTK_TABLE( table1 ), rotate_value_spinbutton, 1, 2, 10, 11,
|
||||
|
@ -1067,7 +1067,7 @@ GtkWidget* create_SurfaceInspector( void ){
|
|||
gtk_widget_set_sensitive( GTK_WIDGET( rotate_value_spinbutton ), FALSE );
|
||||
|
||||
// Offset Spins
|
||||
hshift_offset_spinbutton_adj = gtk_adjustment_new( 0.0, -8192.0, 8192.0, 2.0, 8.0, 8.0 );
|
||||
hshift_offset_spinbutton_adj = gtk_adjustment_new( 0.0, -8192.0, 8192.0, 2.0, 8.0, 0.0 );
|
||||
hshift_offset_spinbutton = gtk_spin_button_new( GTK_ADJUSTMENT( hshift_offset_spinbutton_adj ), 0, 2 );
|
||||
gtk_widget_show( hshift_offset_spinbutton );
|
||||
gtk_table_attach( GTK_TABLE( table1 ), hshift_offset_spinbutton, 2, 3, 2, 3,
|
||||
|
@ -1077,7 +1077,7 @@ GtkWidget* create_SurfaceInspector( void ){
|
|||
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( hshift_offset_spinbutton ), GTK_UPDATE_IF_VALID );
|
||||
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON( hshift_offset_spinbutton ), TRUE );
|
||||
|
||||
vshift_offset_spinbutton_adj = gtk_adjustment_new( 0.0, -8192.0, 8192.0, 2.0, 8.0, 8.0 );
|
||||
vshift_offset_spinbutton_adj = gtk_adjustment_new( 0.0, -8192.0, 8192.0, 2.0, 8.0, 0.0 );
|
||||
vshift_offset_spinbutton = gtk_spin_button_new( GTK_ADJUSTMENT( vshift_offset_spinbutton_adj ), 0, 2 );
|
||||
gtk_widget_show( vshift_offset_spinbutton );
|
||||
gtk_table_attach( GTK_TABLE( table1 ), vshift_offset_spinbutton, 2, 3, 4, 5,
|
||||
|
@ -1087,7 +1087,7 @@ GtkWidget* create_SurfaceInspector( void ){
|
|||
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( vshift_offset_spinbutton ), GTK_UPDATE_IF_VALID );
|
||||
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON( vshift_offset_spinbutton ), TRUE );
|
||||
|
||||
hscale_offset_spinbutton_adj = gtk_adjustment_new( 0.0, -1024.0, 1024.0, 1.0, 4.0, 4.0 );
|
||||
hscale_offset_spinbutton_adj = gtk_adjustment_new( 0.0, -1024.0, 1024.0, 1.0, 4.0, 0.0 );
|
||||
hscale_offset_spinbutton = gtk_spin_button_new( GTK_ADJUSTMENT( hscale_offset_spinbutton_adj ), 0, 4 );
|
||||
gtk_widget_show( hscale_offset_spinbutton );
|
||||
gtk_table_attach( GTK_TABLE( table1 ), hscale_offset_spinbutton, 2, 3, 6, 7,
|
||||
|
@ -1097,7 +1097,7 @@ GtkWidget* create_SurfaceInspector( void ){
|
|||
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( hscale_offset_spinbutton ), GTK_UPDATE_IF_VALID );
|
||||
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON( hscale_offset_spinbutton ), TRUE );
|
||||
|
||||
vscale_offset_spinbutton_adj = gtk_adjustment_new( 0.0, -1024.0, 1024.0, 1.0, 4.0, 4.0 );
|
||||
vscale_offset_spinbutton_adj = gtk_adjustment_new( 0.0, -1024.0, 1024.0, 1.0, 4.0, 0.0 );
|
||||
vscale_offset_spinbutton = gtk_spin_button_new( GTK_ADJUSTMENT( vscale_offset_spinbutton_adj ), 0, 4 );
|
||||
gtk_widget_show( vscale_offset_spinbutton );
|
||||
gtk_table_attach( GTK_TABLE( table1 ), vscale_offset_spinbutton, 2, 3, 8, 9,
|
||||
|
@ -1107,7 +1107,7 @@ GtkWidget* create_SurfaceInspector( void ){
|
|||
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( vscale_offset_spinbutton ), GTK_UPDATE_IF_VALID );
|
||||
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON( vscale_offset_spinbutton ), TRUE );
|
||||
|
||||
rotate_offset_spinbutton_adj = gtk_adjustment_new( 0.0, -360.0, 360.0, 1.0, 10.0, 10.0 );
|
||||
rotate_offset_spinbutton_adj = gtk_adjustment_new( 0.0, -360.0, 360.0, 1.0, 10.0, 0.0 );
|
||||
rotate_offset_spinbutton = gtk_spin_button_new( GTK_ADJUSTMENT( rotate_offset_spinbutton_adj ), 0, 4 );
|
||||
gtk_widget_show( rotate_offset_spinbutton );
|
||||
gtk_table_attach( GTK_TABLE( table1 ), rotate_offset_spinbutton, 2, 3, 10, 11,
|
||||
|
@ -1118,7 +1118,7 @@ GtkWidget* create_SurfaceInspector( void ){
|
|||
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON( rotate_offset_spinbutton ), TRUE );
|
||||
|
||||
// Step Spins
|
||||
hshift_step_spinbutton_adj = gtk_adjustment_new( 0.0, -8192.0, 8192.0, 2.0, 8.0, 8.0 );
|
||||
hshift_step_spinbutton_adj = gtk_adjustment_new( 0.0, -8192.0, 8192.0, 2.0, 8.0, 0.0 );
|
||||
hshift_step_spinbutton = gtk_spin_button_new( GTK_ADJUSTMENT( hshift_step_spinbutton_adj ), 1, 2 );
|
||||
gtk_widget_show( hshift_step_spinbutton );
|
||||
gtk_table_attach( GTK_TABLE( table1 ), hshift_step_spinbutton, 3, 4, 2, 3,
|
||||
|
@ -1126,7 +1126,7 @@ GtkWidget* create_SurfaceInspector( void ){
|
|||
(GtkAttachOptions) ( 0 ), 0, 0 );
|
||||
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( hshift_step_spinbutton ), GTK_UPDATE_IF_VALID );
|
||||
|
||||
vshift_step_spinbutton_adj = gtk_adjustment_new( 0.0, -8192.0, 8192.0, 2.0, 8.0, 8.0 );
|
||||
vshift_step_spinbutton_adj = gtk_adjustment_new( 0.0, -8192.0, 8192.0, 2.0, 8.0, 0.0 );
|
||||
vshift_step_spinbutton = gtk_spin_button_new( GTK_ADJUSTMENT( vshift_step_spinbutton_adj ), 1, 2 );
|
||||
gtk_widget_show( vshift_step_spinbutton );
|
||||
gtk_table_attach( GTK_TABLE( table1 ), vshift_step_spinbutton, 3, 4, 4, 5,
|
||||
|
@ -1134,7 +1134,7 @@ GtkWidget* create_SurfaceInspector( void ){
|
|||
(GtkAttachOptions) ( 0 ), 0, 0 );
|
||||
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( vshift_step_spinbutton ), GTK_UPDATE_IF_VALID );
|
||||
|
||||
hscale_step_spinbutton_adj = gtk_adjustment_new( 0.0, -1024.0, 1024.0, 1.0, 4.0, 4.0 );
|
||||
hscale_step_spinbutton_adj = gtk_adjustment_new( 0.0, -1024.0, 1024.0, 1.0, 4.0, 0.0 );
|
||||
hscale_step_spinbutton = gtk_spin_button_new( GTK_ADJUSTMENT( hscale_step_spinbutton_adj ), 1, 4 );
|
||||
gtk_widget_show( hscale_step_spinbutton );
|
||||
gtk_table_attach( GTK_TABLE( table1 ), hscale_step_spinbutton, 3, 4, 6, 7,
|
||||
|
@ -1142,7 +1142,7 @@ GtkWidget* create_SurfaceInspector( void ){
|
|||
(GtkAttachOptions) ( 0 ), 0, 0 );
|
||||
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( hscale_step_spinbutton ), GTK_UPDATE_IF_VALID );
|
||||
|
||||
vscale_step_spinbutton_adj = gtk_adjustment_new( 0.0, -1024.0, 1024.0, 1.0, 4.0, 4.0 );
|
||||
vscale_step_spinbutton_adj = gtk_adjustment_new( 0.0, -1024.0, 1024.0, 1.0, 4.0, 0.0 );
|
||||
vscale_step_spinbutton = gtk_spin_button_new( GTK_ADJUSTMENT( vscale_step_spinbutton_adj ), 1, 4 );
|
||||
gtk_widget_show( vscale_step_spinbutton );
|
||||
gtk_table_attach( GTK_TABLE( table1 ), vscale_step_spinbutton, 3, 4, 8, 9,
|
||||
|
@ -1150,7 +1150,7 @@ GtkWidget* create_SurfaceInspector( void ){
|
|||
(GtkAttachOptions) ( 0 ), 0, 0 );
|
||||
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( vscale_step_spinbutton ), GTK_UPDATE_IF_VALID );
|
||||
|
||||
rotate_step_spinbutton_adj = gtk_adjustment_new( 0.0, -360.0, 360.0, 1.0, 10.0, 10.0 );
|
||||
rotate_step_spinbutton_adj = gtk_adjustment_new( 0.0, -360.0, 360.0, 1.0, 10.0, 0.0 );
|
||||
rotate_step_spinbutton = gtk_spin_button_new( GTK_ADJUSTMENT( rotate_step_spinbutton_adj ), 1, 4 );
|
||||
gtk_widget_show( rotate_step_spinbutton );
|
||||
gtk_table_attach( GTK_TABLE( table1 ), rotate_step_spinbutton, 3, 4, 10, 11,
|
||||
|
@ -1216,7 +1216,7 @@ GtkWidget* create_SurfaceInspector( void ){
|
|||
gtk_label_set_justify( GTK_LABEL( label ), GTK_JUSTIFY_LEFT );
|
||||
gtk_misc_set_alignment( GTK_MISC( label ), 0.5, 1 );
|
||||
|
||||
fit_width_spinbutton_adj = gtk_adjustment_new( 1, 1, 32, 1, 10, 10 );
|
||||
fit_width_spinbutton_adj = gtk_adjustment_new( 1, 1, 32, 1, 10, 0 );
|
||||
fit_width_spinbutton = gtk_spin_button_new( GTK_ADJUSTMENT( fit_width_spinbutton_adj ), 1, 0 );
|
||||
gtk_widget_show( fit_width_spinbutton );
|
||||
gtk_table_attach( GTK_TABLE( table5 ), fit_width_spinbutton, 1, 2, 1, 2,
|
||||
|
@ -1225,7 +1225,7 @@ GtkWidget* create_SurfaceInspector( void ){
|
|||
gtk_spin_button_set_numeric( GTK_SPIN_BUTTON( fit_width_spinbutton ), TRUE );
|
||||
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( fit_width_spinbutton ), GTK_UPDATE_IF_VALID );
|
||||
|
||||
fit_height_spinbutton_adj = gtk_adjustment_new( 1, 1, 32, 1, 10, 10 );
|
||||
fit_height_spinbutton_adj = gtk_adjustment_new( 1, 1, 32, 1, 10, 0 );
|
||||
fit_height_spinbutton = gtk_spin_button_new( GTK_ADJUSTMENT( fit_height_spinbutton_adj ), 1, 0 );
|
||||
gtk_widget_show( fit_height_spinbutton );
|
||||
gtk_table_attach( GTK_TABLE( table5 ), fit_height_spinbutton, 2, 3, 1, 2,
|
||||
|
|
|
@ -1732,7 +1732,7 @@ void DoRotateDlg(){
|
|||
(GtkAttachOptions) ( 0 ),
|
||||
(GtkAttachOptions) ( 0 ), 0, 0 );
|
||||
|
||||
adj = gtk_adjustment_new( 0, -359, 359, 1, 10, 10 );
|
||||
adj = gtk_adjustment_new( 0, -359, 359, 1, 10, 0 );
|
||||
x = gtk_spin_button_new( GTK_ADJUSTMENT( adj ), 1, 0 );
|
||||
g_object_set_data( G_OBJECT( dlg ), "x", x );
|
||||
gtk_widget_show( x );
|
||||
|
@ -1742,7 +1742,7 @@ void DoRotateDlg(){
|
|||
gtk_widget_set_usize( x, 60, -2 );
|
||||
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON( x ), TRUE );
|
||||
|
||||
adj = gtk_adjustment_new( 0, -359, 359, 1, 10, 10 );
|
||||
adj = gtk_adjustment_new( 0, -359, 359, 1, 10, 0 );
|
||||
y = gtk_spin_button_new( GTK_ADJUSTMENT( adj ), 1, 0 );
|
||||
g_object_set_data( G_OBJECT( dlg ), "y", y );
|
||||
gtk_widget_show( y );
|
||||
|
@ -1751,7 +1751,7 @@ void DoRotateDlg(){
|
|||
(GtkAttachOptions) ( 0 ), 0, 0 );
|
||||
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON( y ), TRUE );
|
||||
|
||||
adj = gtk_adjustment_new( 0, -359, 359, 1, 10, 10 );
|
||||
adj = gtk_adjustment_new( 0, -359, 359, 1, 10, 0 );
|
||||
z = gtk_spin_button_new( GTK_ADJUSTMENT( adj ), 1, 0 );
|
||||
g_object_set_data( G_OBJECT( dlg ), "z", z );
|
||||
gtk_widget_show( z );
|
||||
|
|
|
@ -690,6 +690,7 @@ gint HandleCommand( GtkWidget *widget, gpointer data ){
|
|||
case ID_SELECT_SNAPTOGRID: g_pParentWnd->OnSnapToGrid(); break;
|
||||
case ID_SELECT_ALL: g_pParentWnd->OnSelectAll(); break;
|
||||
case ID_SELECTION_INVERT: g_pParentWnd->OnSelectionInvert(); break;
|
||||
case ID_TOGGLE_DETAIL: g_pParentWnd->OnToggleDetail(); break;
|
||||
}}
|
||||
|
||||
return TRUE;
|
||||
|
@ -1756,6 +1757,11 @@ void MainFrame::create_main_toolbar( GtkWidget *window, GtkWidget *vbox ){
|
|||
g_object_set_data( G_OBJECT( window ), "tb_view_clipper", w );
|
||||
}
|
||||
|
||||
w = gtk_toolbar_append_element( GTK_TOOLBAR( toolbar ), GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL,
|
||||
"", _( "Make Detail Brushes" ), "", new_image_icon("toggle_struct.png"),
|
||||
GTK_SIGNAL_FUNC( HandleCommand ), GINT_TO_POINTER( ID_TOGGLE_DETAIL ) );
|
||||
g_object_set_data( G_OBJECT( window ), "tb_toggle_detail", w );
|
||||
|
||||
gtk_toolbar_append_space( GTK_TOOLBAR( toolbar ) );
|
||||
|
||||
w = gtk_toolbar_append_item( GTK_TOOLBAR( toolbar ), "", _( "Change views" ), "",
|
||||
|
@ -5454,6 +5460,31 @@ void MainFrame::OnClipSelected(){
|
|||
}
|
||||
}
|
||||
|
||||
void MainFrame::OnToggleDetail(){
|
||||
GtkWidget *w = GTK_WIDGET( g_object_get_data( G_OBJECT( m_pWidget ), "tb_toggle_detail" ) );
|
||||
g_bIgnoreCommands++;
|
||||
|
||||
if ( g_qeglobals.m_bMakeDetail == TRUE ) {
|
||||
g_qeglobals.m_bMakeDetail = FALSE;
|
||||
Sys_Printf( "Structural Brush mode activated\n" );
|
||||
|
||||
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( w ), FALSE );
|
||||
gtk_button_set_image( GTK_BUTTON( w ),new_image_icon( "toggle_struct.png" ) );
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
g_qeglobals.m_bMakeDetail = TRUE;
|
||||
Sys_Printf( "Detail Brush mode activated\n" );
|
||||
|
||||
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( w ), TRUE );
|
||||
gtk_button_set_image( GTK_BUTTON( w ), new_image_icon( "toggle_detail.png" ) );
|
||||
|
||||
}
|
||||
|
||||
g_bIgnoreCommands--;
|
||||
}
|
||||
|
||||
void MainFrame::OnSplitSelected(){
|
||||
if ( m_pActiveXY ) {
|
||||
Undo_Start( "split selected" );
|
||||
|
|
|
@ -427,6 +427,8 @@ struct SKeyInfo
|
|||
#define ID_TEXTUREWINDOW_SCALEUP 40321
|
||||
#define ID_TEXTUREWINDOW_SCALEDOWN 40322
|
||||
|
||||
#define ID_TOGGLE_DETAIL 40323
|
||||
|
||||
class CSynapseClientRadiant : public CSynapseClient
|
||||
{
|
||||
public:
|
||||
|
@ -695,6 +697,7 @@ void OnHelp();
|
|||
void OnHelpLinks();
|
||||
void OnHelpBugreport();
|
||||
void OnViewClipper();
|
||||
void OnToggleDetail();
|
||||
void OnCameraAngledown();
|
||||
void OnCameraAngleup();
|
||||
void OnCameraBack( bool keydown );
|
||||
|
|
|
@ -509,7 +509,7 @@ void PatchDialog::BuildDialog(){
|
|||
sprintf( buf, "%g", l_pPIIncrement->shift[0] );
|
||||
gtk_entry_set_text( GTK_ENTRY( entry ), buf );
|
||||
|
||||
adj = gtk_adjustment_new( 0, -8192, 8192, 1, 1, 1 );
|
||||
adj = gtk_adjustment_new( 0, -8192, 8192, 1, 1, 0 );
|
||||
gtk_signal_connect( adj, "value_changed", GTK_SIGNAL_FUNC( OnSpinChanged ), entry );
|
||||
g_object_set_data( G_OBJECT( m_pWidget ), "hshift_adj", adj );
|
||||
|
||||
|
@ -529,7 +529,7 @@ void PatchDialog::BuildDialog(){
|
|||
sprintf( buf, "%g", l_pPIIncrement->shift[1] );
|
||||
gtk_entry_set_text( GTK_ENTRY( entry ), buf );
|
||||
|
||||
adj = gtk_adjustment_new( 0, -8192, 8192, 1, 1, 1 );
|
||||
adj = gtk_adjustment_new( 0, -8192, 8192, 1, 1, 0 );
|
||||
gtk_signal_connect( adj, "value_changed", GTK_SIGNAL_FUNC( OnSpinChanged ), entry );
|
||||
g_object_set_data( G_OBJECT( m_pWidget ), "vshift_adj", adj );
|
||||
|
||||
|
@ -549,7 +549,7 @@ void PatchDialog::BuildDialog(){
|
|||
sprintf( buf, "%g", l_pPIIncrement->scale[0] );
|
||||
gtk_entry_set_text( GTK_ENTRY( entry ), buf );
|
||||
|
||||
adj = gtk_adjustment_new( 0, -1000, 1000, 1, 1, 1 );
|
||||
adj = gtk_adjustment_new( 0, -1000, 1000, 1, 1, 0 );
|
||||
gtk_signal_connect( adj, "value_changed", GTK_SIGNAL_FUNC( OnSpinChanged ), entry );
|
||||
g_object_set_data( G_OBJECT( m_pWidget ), "hscale_adj", adj );
|
||||
|
||||
|
@ -569,7 +569,7 @@ void PatchDialog::BuildDialog(){
|
|||
sprintf( buf, "%g", l_pPIIncrement->scale[1] );
|
||||
gtk_entry_set_text( GTK_ENTRY( entry ), buf );
|
||||
|
||||
adj = gtk_adjustment_new( 0, -1000, 1000, 1, 1, 1 );
|
||||
adj = gtk_adjustment_new( 0, -1000, 1000, 1, 1, 0 );
|
||||
gtk_signal_connect( adj, "value_changed", GTK_SIGNAL_FUNC( OnSpinChanged ), entry );
|
||||
g_object_set_data( G_OBJECT( m_pWidget ), "vscale_adj", adj );
|
||||
|
||||
|
@ -589,7 +589,7 @@ void PatchDialog::BuildDialog(){
|
|||
sprintf( buf, "%g", l_pPIIncrement->rotate );
|
||||
gtk_entry_set_text( GTK_ENTRY( entry ), buf );
|
||||
|
||||
adj = gtk_adjustment_new( 0, -1000, 1000, 1, 1, 1 ); // NOTE: Arnout - this really should be 360 but can't change it anymore as it could break existing maps
|
||||
adj = gtk_adjustment_new( 0, -1000, 1000, 1, 1, 0 ); // NOTE: Arnout - this really should be 360 but can't change it anymore as it could break existing maps
|
||||
gtk_signal_connect( adj, "value_changed", GTK_SIGNAL_FUNC( OnSpinChanged ), entry );
|
||||
g_object_set_data( G_OBJECT( m_pWidget ), "rotate_adj", adj );
|
||||
|
||||
|
|
|
@ -131,6 +131,7 @@
|
|||
#define DOSLEEP_KEY "SleepMode"
|
||||
#define SUBDIVISIONS_KEY "Subdivisions"
|
||||
#define DEFAULTTEXURESCALE_KEY "DefaultTextureScale"
|
||||
#define CAULKNEWBRUSHES_KEY "CaulkNewBrushes"
|
||||
#define CLIPCAULK_KEY "ClipCaulk"
|
||||
#define PATCHSHOWBOUNDS_KEY "PatchShowBounds"
|
||||
#define NATIVEGUI_KEY "NativeGUI"
|
||||
|
@ -2385,7 +2386,7 @@ void PrefsDlg::BuildDialog(){
|
|||
(GtkAttachOptions) ( 0 ), 0, 0 );
|
||||
|
||||
// spinner (allows undo levels to be set to zero)
|
||||
spin = gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 1, 0, 64, 1, 10, 10 ) ), 1, 0 );
|
||||
spin = gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 1, 0, 64, 1, 10, 0 ) ), 1, 0 );
|
||||
gtk_widget_show( spin );
|
||||
gtk_table_attach( GTK_TABLE( table ), spin, 1, 2, 1, 2,
|
||||
(GtkAttachOptions) ( GTK_FILL ),
|
||||
|
@ -2456,7 +2457,7 @@ void PrefsDlg::BuildDialog(){
|
|||
AddDialogData( check, &m_bAutoSave, DLG_CHECK_BOOL );
|
||||
|
||||
// spinner
|
||||
spin = gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 1, 1, 60, 1, 10, 10 ) ), 1, 0 );
|
||||
spin = gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 1, 1, 60, 1, 10, 0 ) ), 1, 0 );
|
||||
gtk_widget_show( spin );
|
||||
gtk_box_pack_start( GTK_BOX( hbox2 ), spin, FALSE, FALSE, 0 );
|
||||
gtk_widget_set_usize( spin, 60, -2 );
|
||||
|
@ -2582,6 +2583,14 @@ void PrefsDlg::BuildDialog(){
|
|||
(GtkAttachOptions) ( 0 ), 0, 0 );
|
||||
AddDialogData( entry, &m_fDefTextureScale, DLG_ENTRY_FLOAT );
|
||||
|
||||
|
||||
// caulk new brushes
|
||||
check = gtk_check_button_new_with_label( _( "Always use caulk for new brushes" ) );
|
||||
gtk_widget_show( check );
|
||||
gtk_box_pack_start( GTK_BOX( vbox ), check, FALSE, FALSE, 0 );
|
||||
g_object_set_data( G_OBJECT( dialog ), "check_caulkbrush", check );
|
||||
AddDialogData( check, &m_bCaulkNewBrushes, DLG_CHECK_BOOL );
|
||||
|
||||
// Add the page to the notebook
|
||||
gtk_notebook_append_page( GTK_NOTEBOOK( notebook ), pageframe, preflabel );
|
||||
|
||||
|
@ -3045,6 +3054,7 @@ void PrefsDlg::LoadPrefs(){
|
|||
mLocalPrefs.GetPref( SELECTMODELS_KEY, &m_bSelectModels, TRUE );
|
||||
mLocalPrefs.GetPref( SHADERLISTONLY_KEY, &m_bTexturesShaderlistOnly, FALSE );
|
||||
mLocalPrefs.GetPref( DEFAULTTEXURESCALE_KEY, &m_fDefTextureScale, g_pGameDescription->mTextureDefaultScale );
|
||||
mLocalPrefs.GetPref( CAULKNEWBRUSHES_KEY, &m_bCaulkNewBrushes, TRUE );
|
||||
mLocalPrefs.GetPref( SUBDIVISIONS_KEY, &m_nSubdivisions, SUBDIVISIONS_DEF );
|
||||
mLocalPrefs.GetPref( CLIPCAULK_KEY, &m_bClipCaulk, FALSE );
|
||||
mLocalPrefs.GetPref( SNAPTTOGRID_KEY, &m_bSnapTToGrid, FALSE );
|
||||
|
|
|
@ -641,6 +641,7 @@ bool m_bGLLighting;
|
|||
bool m_bTexturesShaderlistOnly;
|
||||
int m_nSubdivisions;
|
||||
float m_fDefTextureScale;
|
||||
bool m_bCaulkNewBrushes;
|
||||
bool m_bFloatingZ;
|
||||
bool m_bLatchedFloatingZ;
|
||||
// Gef: Kyro GL_POINT workaround
|
||||
|
|
|
@ -545,7 +545,7 @@ void SurfaceDlg::BuildDialog() {
|
|||
(GtkAttachOptions) ( GTK_FILL ),
|
||||
(GtkAttachOptions) ( 0 ), 0, 0 );
|
||||
|
||||
spin = gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 0, -8192, 8192, 2, 8, 8 ) ), 0, 0 );
|
||||
spin = gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 0, -8192, 8192, 2, 8, 0 ) ), 0, 0 );
|
||||
g_object_set_data( G_OBJECT( dlg ), "hshift", spin );
|
||||
gtk_signal_connect( GTK_OBJECT( gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( spin ) ) ), "value_changed",
|
||||
GTK_SIGNAL_FUNC( OnUpdate ), NULL );
|
||||
|
@ -579,7 +579,7 @@ void SurfaceDlg::BuildDialog() {
|
|||
(GtkAttachOptions) ( GTK_FILL ),
|
||||
(GtkAttachOptions) ( 0 ), 0, 0 );
|
||||
|
||||
spin = gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 0, -8192, 8192, 2, 8, 8 ) ), 0, 0 );
|
||||
spin = gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 0, -8192, 8192, 2, 8, 0 ) ), 0, 0 );
|
||||
g_object_set_data( G_OBJECT( dlg ), "vshift", spin );
|
||||
gtk_signal_connect( GTK_OBJECT( gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( spin ) ) ), "value_changed",
|
||||
GTK_SIGNAL_FUNC( OnUpdate ), NULL );
|
||||
|
@ -613,7 +613,7 @@ void SurfaceDlg::BuildDialog() {
|
|||
(GtkAttachOptions) ( GTK_FILL ),
|
||||
(GtkAttachOptions) ( 0 ), 0, 0 );
|
||||
|
||||
spin = gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 0, -1000, 1000, 1, 10, 10 ) ), 0, 0 );
|
||||
spin = gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 0, -1000, 1000, 1, 10, 0 ) ), 0, 0 );
|
||||
g_object_set_data( G_OBJECT( dlg ), "hscale", spin );
|
||||
gtk_signal_connect( GTK_OBJECT( gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( spin ) ) ), "value_changed",
|
||||
GTK_SIGNAL_FUNC( OnUpdate ), NULL );
|
||||
|
@ -647,7 +647,7 @@ void SurfaceDlg::BuildDialog() {
|
|||
(GtkAttachOptions) ( GTK_FILL ),
|
||||
(GtkAttachOptions) ( 0 ), 0, 0 );
|
||||
|
||||
spin = gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 0, -1000, 1000, 1, 10, 10 ) ), 0, 0 );
|
||||
spin = gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 0, -1000, 1000, 1, 10, 0 ) ), 0, 0 );
|
||||
g_object_set_data( G_OBJECT( dlg ), "vscale", spin );
|
||||
gtk_signal_connect( GTK_OBJECT( gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( spin ) ) ), "value_changed",
|
||||
GTK_SIGNAL_FUNC( OnUpdate ), NULL );
|
||||
|
@ -681,7 +681,7 @@ void SurfaceDlg::BuildDialog() {
|
|||
(GtkAttachOptions) ( GTK_FILL ),
|
||||
(GtkAttachOptions) ( 0 ), 0, 0 );
|
||||
|
||||
spin = gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 0, -360, 360, 1, 10, 10 ) ), 1, 0 );
|
||||
spin = gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 0, -360, 360, 1, 10, 0 ) ), 1, 0 );
|
||||
g_object_set_data( G_OBJECT( dlg ), "rotate", spin );
|
||||
gtk_signal_connect( GTK_OBJECT( gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( spin ) ) ), "value_changed",
|
||||
GTK_SIGNAL_FUNC( OnUpdate ), NULL );
|
||||
|
@ -807,7 +807,7 @@ void SurfaceDlg::BuildDialog() {
|
|||
GTK_SIGNAL_FUNC( OnBtnPatchFit ), NULL );
|
||||
gtk_widget_set_usize( button, 60, -2 );
|
||||
|
||||
spin = gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 1, 1, 32, 1, 10, 10 ) ), 1, 0 );
|
||||
spin = gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 1, 1, 32, 1, 10, 0 ) ), 1, 0 );
|
||||
gtk_widget_show( spin );
|
||||
gtk_table_attach( GTK_TABLE( table ), spin, 2, 3, 1, 2,
|
||||
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
|
||||
|
@ -815,7 +815,7 @@ void SurfaceDlg::BuildDialog() {
|
|||
gtk_widget_set_usize( spin, 60, -2 );
|
||||
AddDialogData( spin, &m_nWidth, DLG_SPIN_INT );
|
||||
|
||||
spin = gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 1, 1, 32, 1, 10, 10 ) ), 1, 0 );
|
||||
spin = gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 1, 1, 32, 1, 10, 0 ) ), 1, 0 );
|
||||
gtk_widget_show( spin );
|
||||
gtk_table_attach( GTK_TABLE( table ), spin, 3, 4, 1, 2,
|
||||
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
|
||||
|
|
|
@ -1595,12 +1595,38 @@ void XYWnd::NewBrushDrag( int x, int y ){
|
|||
maxs[i] = temp;
|
||||
}
|
||||
}
|
||||
|
||||
n = Brush_Create( mins, maxs, &g_qeglobals.d_texturewin.texdef );
|
||||
|
||||
// Caulk the new brush
|
||||
if ( g_PrefsDlg.m_bCaulkNewBrushes == TRUE ) {
|
||||
texdef_t tex;
|
||||
IShader *shad = QERApp_Shader_ForName( "textures/common/caulk" );
|
||||
|
||||
tex.SetName( shad->getName() );
|
||||
tex.scale[0] = g_PrefsDlg.m_fDefTextureScale;
|
||||
tex.scale[1] = g_PrefsDlg.m_fDefTextureScale;
|
||||
tex.flags = shad->getFlags();
|
||||
|
||||
n = Brush_Create( mins, maxs, &tex );
|
||||
} else {
|
||||
n = Brush_Create( mins, maxs, &g_qeglobals.d_texturewin.texdef );
|
||||
}
|
||||
|
||||
if ( !n ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// structural or detail?
|
||||
face_t *f;
|
||||
|
||||
for ( f = n->brush_faces ; f ; f = f->next ) {
|
||||
if ( g_qeglobals.m_bMakeDetail == TRUE ) {
|
||||
f->texdef.contents |= CONTENTS_DETAIL;
|
||||
} else {
|
||||
f->texdef.contents &= ~CONTENTS_DETAIL;
|
||||
}
|
||||
}
|
||||
//
|
||||
|
||||
vec3_t vSize;
|
||||
VectorSubtract( maxs, mins, vSize );
|
||||
g_strStatus.Format( "Size X:: %.1f Y:: %.1f Z:: %.1f", vSize[0], vSize[1], vSize[2] );
|
||||
|
|
Loading…
Reference in a new issue