X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=radiant%2Fpatchdialog.cpp;h=73639e5463756bf4b3686d29b0b48d7662d5b71f;hb=50fa1babd5e21a8fc7e146196333f4486550c88d;hp=6bacd9f8b6c4ec5c28bb8c23b646d929ffb5c43c;hpb=f60794f0352a1e48f28c9eb5b20c819cbfa1507b;p=xonotic%2Fnetradiant.git diff --git a/radiant/patchdialog.cpp b/radiant/patchdialog.cpp index 6bacd9f8..73639e54 100644 --- a/radiant/patchdialog.cpp +++ b/radiant/patchdialog.cpp @@ -455,6 +455,10 @@ void Scene_PatchTranslateTexture_Selected( scene::Graph& graph, float s, float t Scene_forEachVisibleSelectedPatch( PatchTranslateTexture( s, t ) ); } +static void OnBtnPatchAutoCap( GtkWidget *widget, gpointer data ){ + Patch_AutoCapTexture(); +} + static void OnSpinChanged( GtkAdjustment *adj, gpointer data ){ texdef_t td; @@ -832,7 +836,7 @@ GtkWindow* PatchInspector::BuildDialog(){ GtkLabel* label = GTK_LABEL( gtk_label_new( "Horizontal Shift Step" ) ); gtk_widget_show( GTK_WIDGET( label ) ); gtk_table_attach( table, GTK_WIDGET( label ), 2, 4, 0, 1, - (GtkAttachOptions)( GTK_FILL ), + (GtkAttachOptions)( GTK_FILL|GTK_EXPAND ), (GtkAttachOptions)( 0 ), 0, 0 ); gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 ); } @@ -840,7 +844,7 @@ GtkWindow* PatchInspector::BuildDialog(){ GtkLabel* label = GTK_LABEL( gtk_label_new( "Vertical Shift Step" ) ); gtk_widget_show( GTK_WIDGET( label ) ); gtk_table_attach( table, GTK_WIDGET( label ), 2, 4, 1, 2, - (GtkAttachOptions)( GTK_FILL ), + (GtkAttachOptions)( GTK_FILL|GTK_EXPAND ), (GtkAttachOptions)( 0 ), 0, 0 ); gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 ); } @@ -848,7 +852,7 @@ GtkWindow* PatchInspector::BuildDialog(){ GtkLabel* label = GTK_LABEL( gtk_label_new( "Horizontal Stretch Step" ) ); gtk_widget_show( GTK_WIDGET( label ) ); gtk_table_attach( table, GTK_WIDGET( label ), 2, 3, 2, 3, - (GtkAttachOptions)( GTK_FILL ), + (GtkAttachOptions)( GTK_FILL|GTK_EXPAND ), (GtkAttachOptions)( 0 ), 0, 0 ); gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 ); } @@ -865,7 +869,7 @@ GtkWindow* PatchInspector::BuildDialog(){ GtkLabel* label = GTK_LABEL( gtk_label_new( "Vertical Stretch Step" ) ); gtk_widget_show( GTK_WIDGET( label ) ); gtk_table_attach( table, GTK_WIDGET( label ), 2, 3, 3, 4, - (GtkAttachOptions)( GTK_FILL ), + (GtkAttachOptions)( GTK_FILL|GTK_EXPAND ), (GtkAttachOptions)( 0 ), 0, 0 ); gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 ); } @@ -882,7 +886,7 @@ GtkWindow* PatchInspector::BuildDialog(){ GtkLabel* label = GTK_LABEL( gtk_label_new( "Rotate Step" ) ); gtk_widget_show( GTK_WIDGET( label ) ); gtk_table_attach( table, GTK_WIDGET( label ), 2, 4, 4, 5, - (GtkAttachOptions)( GTK_FILL ), + (GtkAttachOptions)( GTK_FILL|GTK_EXPAND ), (GtkAttachOptions)( 0 ), 0, 0 ); gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 ); } @@ -998,6 +1002,13 @@ GtkWindow* PatchInspector::BuildDialog(){ GtkHBox* hbox2 = GTK_HBOX( gtk_hbox_new( TRUE, 5 ) ); gtk_widget_show( GTK_WIDGET( hbox2 ) ); gtk_box_pack_start( GTK_BOX( vbox2 ), GTK_WIDGET( hbox2 ), TRUE, FALSE, 0 ); + { + GtkButton* button = GTK_BUTTON( gtk_button_new_with_label( "Auto Cap" ) ); + gtk_widget_show( GTK_WIDGET( button ) ); + gtk_box_pack_end( GTK_BOX( hbox2 ), GTK_WIDGET( button ), TRUE, FALSE, 0 ); + g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( OnBtnPatchAutoCap ), 0 ); + gtk_widget_set_usize( GTK_WIDGET( button ), 60, -1 ); + } { GtkButton* button = GTK_BUTTON( gtk_button_new_with_label( "CAP" ) ); gtk_widget_show( GTK_WIDGET( button ) );