- {
- GtkWidget* frame = gtk_frame_new ("Texturing");
- gtk_widget_show (frame);
- gtk_box_pack_start(GTK_BOX(vbox), GTK_WIDGET(frame), FALSE, FALSE, 0);
- {
- GtkWidget* table = gtk_table_new (4, 4, FALSE);
- gtk_widget_show (table);
- gtk_container_add (GTK_CONTAINER (frame), table);
- gtk_table_set_row_spacings(GTK_TABLE(table), 5);
- gtk_table_set_col_spacings(GTK_TABLE(table), 5);
- gtk_container_set_border_width (GTK_CONTAINER (table), 5);
- {
- GtkWidget* label = gtk_label_new ("Brush");
- gtk_widget_show (label);
- gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1,
- (GtkAttachOptions) (GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
- }
- {
- GtkWidget* label = gtk_label_new ("Patch");
- gtk_widget_show (label);
- gtk_table_attach(GTK_TABLE(table), label, 0, 1, 2, 3,
- (GtkAttachOptions) (GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
- }
- {
- GtkWidget* label = gtk_label_new ("Width");
- gtk_widget_show (label);
- gtk_table_attach(GTK_TABLE(table), label, 2, 3, 0, 1,
- (GtkAttachOptions) (GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
- }
- {
- GtkWidget* label = gtk_label_new ("Height");
- gtk_widget_show (label);
- gtk_table_attach(GTK_TABLE(table), label, 3, 4, 0, 1,
- (GtkAttachOptions) (GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
- }
- {
- GtkWidget* button = gtk_button_new_with_label ("Axial");
- gtk_widget_show (button);
- gtk_table_attach(GTK_TABLE(table), button, 0, 1, 1, 2,
- (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
- g_signal_connect(G_OBJECT(button), "clicked",
- G_CALLBACK(OnBtnAxial), 0);
- gtk_widget_set_usize (button, 60, -2);
- }
- {
- GtkWidget* button = gtk_button_new_with_label ("Fit");
- gtk_widget_show (button);
- gtk_table_attach(GTK_TABLE(table), button, 1, 2, 1, 2,
- (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
- g_signal_connect(G_OBJECT(button), "clicked",
- G_CALLBACK(OnBtnFaceFit), 0);
- gtk_widget_set_usize (button, 60, -2);
- }
- {
- GtkWidget* button = gtk_button_new_with_label ("CAP");
- gtk_widget_show (button);
- gtk_table_attach(GTK_TABLE(table), button, 0, 1, 3, 4,
- (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
- g_signal_connect(G_OBJECT(button), "clicked",
- G_CALLBACK(OnBtnPatchdetails), 0);
- gtk_widget_set_usize (button, 60, -2);
- }
- {
- GtkWidget* button = gtk_button_new_with_label ("Set...");
- gtk_widget_show (button);
- gtk_table_attach(GTK_TABLE(table), button, 1, 2, 3, 4,
- (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
- g_signal_connect(G_OBJECT(button), "clicked",
- G_CALLBACK(OnBtnPatchreset), 0);
- gtk_widget_set_usize (button, 60, -2);
- }
- {
- GtkWidget* button = gtk_button_new_with_label ("Natural");
- gtk_widget_show (button);
- gtk_table_attach(GTK_TABLE(table), button, 2, 3, 3, 4,
- (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
- g_signal_connect(G_OBJECT(button), "clicked",
- G_CALLBACK(OnBtnPatchnatural), 0);
- gtk_widget_set_usize (button, 60, -2);
- }
- {
- GtkWidget* button = gtk_button_new_with_label ("Fit");
- gtk_widget_show (button);
- gtk_table_attach(GTK_TABLE(table), button, 3, 4, 3, 4,
- (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
- g_signal_connect(G_OBJECT(button), "clicked",
- G_CALLBACK(OnBtnPatchFit), 0);
- gtk_widget_set_usize (button, 60, -2);
- }
- {
- GtkWidget* spin = gtk_spin_button_new (GTK_ADJUSTMENT (gtk_adjustment_new (1, 0, 1 << 16, 1, 10, 10)), 0, 6);
- gtk_widget_show (spin);
- gtk_table_attach(GTK_TABLE(table), spin, 2, 3, 1, 2,
- (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
- gtk_widget_set_usize (spin, 60, -2);
- AddDialogData(*GTK_SPIN_BUTTON(spin), m_fitHorizontal);
- }
- {
- GtkWidget* spin = gtk_spin_button_new (GTK_ADJUSTMENT (gtk_adjustment_new (1, 0, 1 << 16, 1, 10, 10)), 0, 6);
- gtk_widget_show (spin);
- gtk_table_attach(GTK_TABLE(table), spin, 3, 4, 1, 2,
- (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
- gtk_widget_set_usize (spin, 60, -2);
- AddDialogData(*GTK_SPIN_BUTTON(spin), m_fitVertical);
- }
- }
- }
- if(!string_empty(g_pGameDescription->getKeyValue("si_flags")))
- {
- {
- GtkFrame* frame = GTK_FRAME(gtk_frame_new("Surface Flags"));
- gtk_widget_show(GTK_WIDGET(frame));
- gtk_box_pack_start(GTK_BOX(vbox), GTK_WIDGET(frame), TRUE, TRUE, 0);
- {
- GtkVBox* vbox3 = GTK_VBOX(gtk_vbox_new(FALSE, 4));
- //gtk_container_set_border_width(GTK_CONTAINER(vbox3), 4);
- gtk_widget_show(GTK_WIDGET(vbox3));
- gtk_container_add(GTK_CONTAINER(frame), GTK_WIDGET(vbox3));
- {
- GtkTable* table = GTK_TABLE(gtk_table_new(8, 4, FALSE));
- gtk_widget_show(GTK_WIDGET(table));
- gtk_box_pack_start(GTK_BOX(vbox3), GTK_WIDGET(table), TRUE, TRUE, 0);
- gtk_table_set_row_spacings(table, 0);
- gtk_table_set_col_spacings(table, 0);
-
- GtkCheckButton** p = m_surfaceFlags;
-
- for(int c = 0; c != 4; ++c)
- {
- for(int r = 0; r != 8; ++r)
- {
- GtkCheckButton* check = GTK_CHECK_BUTTON(gtk_check_button_new_with_label(getSurfaceFlagName(c * 8 + r)));
- gtk_widget_show(GTK_WIDGET(check));
- gtk_table_attach(table, GTK_WIDGET(check), c, c+1, r, r+1,
- (GtkAttachOptions)(GTK_EXPAND | GTK_FILL),
- (GtkAttachOptions)(0), 0, 0);
- *p++ = check;
- guint handler_id = togglebutton_connect_toggled(GTK_TOGGLE_BUTTON(check), ApplyFlagsCaller(*this));
- g_object_set_data(G_OBJECT(check), "handler", gint_to_pointer(handler_id));
- }
- }
- }
- }
- }
- {
- GtkFrame* frame = GTK_FRAME(gtk_frame_new("Content Flags"));
- gtk_widget_show(GTK_WIDGET(frame));
- gtk_box_pack_start(GTK_BOX(vbox), GTK_WIDGET(frame), TRUE, TRUE, 0);
- {
- GtkVBox* vbox3 = GTK_VBOX(gtk_vbox_new(FALSE, 4));
- //gtk_container_set_border_width(GTK_CONTAINER(vbox3), 4);
- gtk_widget_show(GTK_WIDGET(vbox3));
- gtk_container_add(GTK_CONTAINER(frame), GTK_WIDGET(vbox3));
- {
-
- GtkTable* table = GTK_TABLE(gtk_table_new(8, 4, FALSE));
- gtk_widget_show(GTK_WIDGET(table));
- gtk_box_pack_start(GTK_BOX(vbox3), GTK_WIDGET(table), TRUE, TRUE, 0);
- gtk_table_set_row_spacings(table, 0);
- gtk_table_set_col_spacings(table, 0);
-
- GtkCheckButton** p = m_contentFlags;
-
- for(int c = 0; c != 4; ++c)
- {
- for(int r = 0; r != 8; ++r)
- {
- GtkCheckButton* check = GTK_CHECK_BUTTON(gtk_check_button_new_with_label(getContentFlagName(c * 8 + r)));
- gtk_widget_show(GTK_WIDGET(check));
- gtk_table_attach(table, GTK_WIDGET(check), c, c+1, r, r+1,
- (GtkAttachOptions)(GTK_EXPAND | GTK_FILL),
- (GtkAttachOptions)(0), 0, 0);
- *p++ = check;
- guint handler_id = togglebutton_connect_toggled(GTK_TOGGLE_BUTTON(check), ApplyFlagsCaller(*this));
- g_object_set_data(G_OBJECT(check), "handler", gint_to_pointer(handler_id));
- }
- }
-
- // not allowed to modify detail flag using Surface Inspector
- gtk_widget_set_sensitive(GTK_WIDGET(m_contentFlags[27]), FALSE);
- }
- }
- }
- {
- GtkFrame* frame = GTK_FRAME(gtk_frame_new("Value"));
- gtk_widget_show(GTK_WIDGET(frame));
- gtk_box_pack_start(GTK_BOX(vbox), GTK_WIDGET(frame), TRUE, TRUE, 0);
- {
- GtkVBox* vbox3 = GTK_VBOX(gtk_vbox_new(FALSE, 4));
- gtk_container_set_border_width(GTK_CONTAINER(vbox3), 4);
- gtk_widget_show(GTK_WIDGET(vbox3));
- gtk_container_add(GTK_CONTAINER(frame), GTK_WIDGET(vbox3));
-
- {
- GtkEntry* entry = GTK_ENTRY(gtk_entry_new());
- gtk_widget_show(GTK_WIDGET(entry));
- gtk_box_pack_start(GTK_BOX(vbox3), GTK_WIDGET(entry), TRUE, TRUE, 0);
- m_valueEntryWidget = entry;
- m_valueEntry.connect(entry);
- }
- }
- }
- }
+
+ {
+ GtkWidget* table = gtk_table_new( 6, 4, FALSE );
+ gtk_widget_show( table );
+ gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( table ), FALSE, FALSE, 0 );
+ gtk_table_set_row_spacings( GTK_TABLE( table ), 5 );
+ gtk_table_set_col_spacings( GTK_TABLE( table ), 5 );
+ {
+ GtkWidget* label = gtk_label_new( "Horizontal shift" );
+ gtk_widget_show( label );
+ gtk_misc_set_alignment( GTK_MISC( label ), 0, 0 );
+ gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 0, 1,
+ (GtkAttachOptions) ( GTK_FILL ),
+ (GtkAttachOptions) ( 0 ), 0, 0 );
+ }
+ {
+ GtkSpinButton* spin = GTK_SPIN_BUTTON( gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 0, -8192, 8192, 2, 8, 0 ) ), 0, 2 ) );
+ m_hshiftIncrement.m_spin = spin;
+ m_hshiftSpinner.connect( spin );
+ gtk_widget_show( GTK_WIDGET( spin ) );
+ gtk_table_attach( GTK_TABLE( table ), GTK_WIDGET( spin ), 1, 2, 0, 1,
+ (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
+ (GtkAttachOptions) ( 0 ), 0, 0 );
+ gtk_widget_set_usize( GTK_WIDGET( spin ), 60, -2 );
+ }
+ {
+ GtkWidget* label = gtk_label_new( "Step" );
+ gtk_widget_show( label );
+ gtk_misc_set_alignment( GTK_MISC( label ), 0, 0 );
+ gtk_table_attach( GTK_TABLE( table ), label, 2, 3, 0, 1,
+ (GtkAttachOptions) ( GTK_FILL ),
+ (GtkAttachOptions) ( 0 ), 0, 0 );
+ }
+ {
+ GtkEntry* entry = GTK_ENTRY( gtk_entry_new() );
+ gtk_widget_show( GTK_WIDGET( entry ) );
+ gtk_table_attach( GTK_TABLE( table ), GTK_WIDGET( entry ), 3, 4, 0, 1,
+ (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
+ (GtkAttachOptions) ( 0 ), 0, 0 );
+ gtk_widget_set_usize( GTK_WIDGET( entry ), 50, -2 );
+ m_hshiftIncrement.m_entry = entry;
+ m_hshiftEntry.connect( entry );
+ }
+ {
+ GtkWidget* label = gtk_label_new( "Vertical shift" );
+ gtk_widget_show( label );
+ gtk_misc_set_alignment( GTK_MISC( label ), 0, 0 );
+ gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 1, 2,
+ (GtkAttachOptions) ( GTK_FILL ),
+ (GtkAttachOptions) ( 0 ), 0, 0 );
+ }
+ {
+ GtkSpinButton* spin = GTK_SPIN_BUTTON( gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 0, -8192, 8192, 2, 8, 0 ) ), 0, 2 ) );
+ m_vshiftIncrement.m_spin = spin;
+ m_vshiftSpinner.connect( spin );
+ gtk_widget_show( GTK_WIDGET( spin ) );
+ gtk_table_attach( GTK_TABLE( table ), GTK_WIDGET( spin ), 1, 2, 1, 2,
+ (GtkAttachOptions) ( GTK_FILL ),
+ (GtkAttachOptions) ( 0 ), 0, 0 );
+ gtk_widget_set_usize( GTK_WIDGET( spin ), 60, -2 );
+ }
+ {
+ GtkWidget* label = gtk_label_new( "Step" );
+ gtk_widget_show( label );
+ gtk_misc_set_alignment( GTK_MISC( label ), 0, 0 );
+ gtk_table_attach( GTK_TABLE( table ), label, 2, 3, 1, 2,
+ (GtkAttachOptions) ( GTK_FILL ),
+ (GtkAttachOptions) ( 0 ), 0, 0 );
+ }
+ {
+ GtkEntry* entry = GTK_ENTRY( gtk_entry_new() );
+ gtk_widget_show( GTK_WIDGET( entry ) );
+ gtk_table_attach( GTK_TABLE( table ), GTK_WIDGET( entry ), 3, 4, 1, 2,
+ (GtkAttachOptions) ( GTK_FILL ),
+ (GtkAttachOptions) ( 0 ), 0, 0 );
+ gtk_widget_set_usize( GTK_WIDGET( entry ), 50, -2 );
+ m_vshiftIncrement.m_entry = entry;
+ m_vshiftEntry.connect( entry );
+ }
+ {
+ GtkWidget* label = gtk_label_new( "Horizontal stretch" );
+ gtk_widget_show( label );
+ gtk_misc_set_alignment( GTK_MISC( label ), 0, 0 );
+ gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 2, 3,
+ (GtkAttachOptions) ( GTK_FILL ),
+ (GtkAttachOptions) ( 0 ), 0, 0 );
+ }
+ {
+ GtkSpinButton* spin = GTK_SPIN_BUTTON( gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 0, -8192, 8192, 2, 8, 0 ) ), 0, 5 ) );
+ m_hscaleIncrement.m_spin = spin;
+ m_hscaleSpinner.connect( spin );
+ gtk_widget_show( GTK_WIDGET( spin ) );
+ gtk_table_attach( GTK_TABLE( table ), GTK_WIDGET( spin ), 1, 2, 2, 3,
+ (GtkAttachOptions) ( GTK_FILL ),
+ (GtkAttachOptions) ( 0 ), 0, 0 );
+ gtk_widget_set_usize( GTK_WIDGET( spin ), 60, -2 );
+ }
+ {
+ GtkWidget* label = gtk_label_new( "Step" );
+ gtk_widget_show( label );
+ gtk_misc_set_alignment( GTK_MISC( label ), 0, 0 );
+ gtk_table_attach( GTK_TABLE( table ), label, 2, 3, 2, 3,
+ (GtkAttachOptions) ( GTK_FILL ),
+ (GtkAttachOptions) ( 0 ), 2, 3 );
+ }
+ {
+ GtkEntry* entry = GTK_ENTRY( gtk_entry_new() );
+ gtk_widget_show( GTK_WIDGET( entry ) );
+ gtk_table_attach( GTK_TABLE( table ), GTK_WIDGET( entry ), 3, 4, 2, 3,
+ (GtkAttachOptions) ( GTK_FILL ),
+ (GtkAttachOptions) ( 0 ), 2, 3 );
+ gtk_widget_set_usize( GTK_WIDGET( entry ), 50, -2 );
+ m_hscaleIncrement.m_entry = entry;
+ m_hscaleEntry.connect( entry );
+ }
+ {
+ GtkWidget* label = gtk_label_new( "Vertical stretch" );
+ gtk_widget_show( label );
+ gtk_misc_set_alignment( GTK_MISC( label ), 0, 0 );
+ gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 3, 4,
+ (GtkAttachOptions) ( GTK_FILL ),
+ (GtkAttachOptions) ( 0 ), 0, 0 );
+ }
+ {
+ GtkSpinButton* spin = GTK_SPIN_BUTTON( gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 0, -8192, 8192, 2, 8, 0 ) ), 0, 5 ) );
+ m_vscaleIncrement.m_spin = spin;
+ m_vscaleSpinner.connect( spin );
+ gtk_widget_show( GTK_WIDGET( spin ) );
+ gtk_table_attach( GTK_TABLE( table ), GTK_WIDGET( spin ), 1, 2, 3, 4,
+ (GtkAttachOptions) ( GTK_FILL ),
+ (GtkAttachOptions) ( 0 ), 0, 0 );
+ gtk_widget_set_usize( GTK_WIDGET( spin ), 60, -2 );
+ }
+ {
+ GtkWidget* label = gtk_label_new( "Step" );
+ gtk_widget_show( label );
+ gtk_misc_set_alignment( GTK_MISC( label ), 0, 0 );
+ gtk_table_attach( GTK_TABLE( table ), label, 2, 3, 3, 4,
+ (GtkAttachOptions) ( GTK_FILL ),
+ (GtkAttachOptions) ( 0 ), 0, 0 );
+ }
+ {
+ GtkEntry* entry = GTK_ENTRY( gtk_entry_new() );
+ gtk_widget_show( GTK_WIDGET( entry ) );
+ gtk_table_attach( GTK_TABLE( table ), GTK_WIDGET( entry ), 3, 4, 3, 4,
+ (GtkAttachOptions) ( GTK_FILL ),
+ (GtkAttachOptions) ( 0 ), 0, 0 );
+ gtk_widget_set_usize( GTK_WIDGET( entry ), 50, -2 );
+ m_vscaleIncrement.m_entry = entry;
+ m_vscaleEntry.connect( entry );
+ }
+ {
+ GtkWidget* label = gtk_label_new( "Rotate" );
+ gtk_widget_show( label );
+ gtk_misc_set_alignment( GTK_MISC( label ), 0, 0 );
+ gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 4, 5,
+ (GtkAttachOptions) ( GTK_FILL ),
+ (GtkAttachOptions) ( 0 ), 0, 0 );
+ }
+ {
+ GtkSpinButton* spin = GTK_SPIN_BUTTON( gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 0, -8192, 8192, 2, 8, 0 ) ), 0, 2 ) );
+ m_rotateIncrement.m_spin = spin;
+ m_rotateSpinner.connect( spin );
+ gtk_widget_show( GTK_WIDGET( spin ) );
+ gtk_table_attach( GTK_TABLE( table ), GTK_WIDGET( spin ), 1, 2, 4, 5,
+ (GtkAttachOptions) ( GTK_FILL ),
+ (GtkAttachOptions) ( 0 ), 0, 0 );
+ gtk_widget_set_usize( GTK_WIDGET( spin ), 60, -2 );
+ gtk_spin_button_set_wrap( spin, TRUE );
+ }
+ {
+ GtkWidget* label = gtk_label_new( "Step" );
+ gtk_widget_show( label );
+ gtk_misc_set_alignment( GTK_MISC( label ), 0, 0 );
+ gtk_table_attach( GTK_TABLE( table ), label, 2, 3, 4, 5,
+ (GtkAttachOptions) ( GTK_FILL ),
+ (GtkAttachOptions) ( 0 ), 0, 0 );
+ }
+ {
+ GtkEntry* entry = GTK_ENTRY( gtk_entry_new() );
+ gtk_widget_show( GTK_WIDGET( entry ) );
+ gtk_table_attach( GTK_TABLE( table ), GTK_WIDGET( entry ), 3, 4, 4, 5,
+ (GtkAttachOptions) ( GTK_FILL ),
+ (GtkAttachOptions) ( 0 ), 0, 0 );
+ gtk_widget_set_usize( GTK_WIDGET( entry ), 50, -2 );
+ m_rotateIncrement.m_entry = entry;
+ m_rotateEntry.connect( entry );
+ }
+ {
+ // match grid button
+ GtkWidget* button = gtk_button_new_with_label( "Match Grid" );
+ gtk_widget_show( button );
+ gtk_table_attach( GTK_TABLE( table ), button, 2, 4, 5, 6,
+ (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
+ (GtkAttachOptions) ( 0 ), 0, 0 );
+ g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( OnBtnMatchGrid ), 0 );
+ }
+ }
+
+ {
+ GtkWidget* frame = gtk_frame_new( "Texturing" );
+ gtk_widget_show( frame );
+ gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( frame ), FALSE, FALSE, 0 );
+ {
+ GtkWidget* table = gtk_table_new( 4, 4, FALSE );
+ gtk_widget_show( table );
+ gtk_container_add( GTK_CONTAINER( frame ), table );
+ gtk_table_set_row_spacings( GTK_TABLE( table ), 5 );
+ gtk_table_set_col_spacings( GTK_TABLE( table ), 5 );
+ gtk_container_set_border_width( GTK_CONTAINER( table ), 5 );
+ {
+ GtkWidget* label = gtk_label_new( "Brush" );
+ gtk_widget_show( label );
+ gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 0, 1,
+ (GtkAttachOptions) ( GTK_FILL ),
+ (GtkAttachOptions) ( 0 ), 0, 0 );
+ }
+ {
+ GtkWidget* label = gtk_label_new( "Patch" );
+ gtk_widget_show( label );
+ gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 2, 3,
+ (GtkAttachOptions) ( GTK_FILL ),
+ (GtkAttachOptions) ( 0 ), 0, 0 );
+ }
+ {
+ GtkWidget* label = gtk_label_new( "Width" );
+ gtk_widget_show( label );
+ gtk_table_attach( GTK_TABLE( table ), label, 2, 3, 0, 1,
+ (GtkAttachOptions) ( GTK_FILL ),
+ (GtkAttachOptions) ( 0 ), 0, 0 );
+ }
+ {
+ GtkWidget* label = gtk_label_new( "Height" );
+ gtk_widget_show( label );
+ gtk_table_attach( GTK_TABLE( table ), label, 3, 4, 0, 1,
+ (GtkAttachOptions) ( GTK_FILL ),
+ (GtkAttachOptions) ( 0 ), 0, 0 );
+ }
+ {
+ GtkWidget* button = gtk_button_new_with_label( "Axial" );
+ gtk_widget_show( button );
+ gtk_table_attach( GTK_TABLE( table ), button, 0, 1, 1, 2,
+ (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
+ (GtkAttachOptions) ( 0 ), 0, 0 );
+ g_signal_connect( G_OBJECT( button ), "clicked",
+ G_CALLBACK( OnBtnAxial ), 0 );
+ gtk_widget_set_usize( button, 60, -2 );
+ }
+ {
+ GtkWidget* button = gtk_button_new_with_label( "Fit" );
+ gtk_widget_show( button );
+ gtk_table_attach( GTK_TABLE( table ), button, 1, 2, 1, 2,
+ (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
+ (GtkAttachOptions) ( 0 ), 0, 0 );
+ g_signal_connect( G_OBJECT( button ), "clicked",
+ G_CALLBACK( OnBtnFaceFit ), 0 );
+ gtk_widget_set_usize( button, 60, -2 );
+ }
+ {
+ GtkWidget* button = gtk_button_new_with_label( "CAP" );
+ gtk_widget_show( button );
+ gtk_table_attach( GTK_TABLE( table ), button, 0, 1, 3, 4,
+ (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
+ (GtkAttachOptions) ( 0 ), 0, 0 );
+ g_signal_connect( G_OBJECT( button ), "clicked",
+ G_CALLBACK( OnBtnPatchdetails ), 0 );
+ gtk_widget_set_usize( button, 60, -2 );
+ }
+ {
+ GtkWidget* button = gtk_button_new_with_label( "Set..." );
+ gtk_widget_show( button );
+ gtk_table_attach( GTK_TABLE( table ), button, 1, 2, 3, 4,
+ (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
+ (GtkAttachOptions) ( 0 ), 0, 0 );
+ g_signal_connect( G_OBJECT( button ), "clicked",
+ G_CALLBACK( OnBtnPatchreset ), 0 );
+ gtk_widget_set_usize( button, 60, -2 );
+ }
+ {
+ GtkWidget* button = gtk_button_new_with_label( "Natural" );
+ gtk_widget_show( button );
+ gtk_table_attach( GTK_TABLE( table ), button, 2, 3, 3, 4,
+ (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
+ (GtkAttachOptions) ( 0 ), 0, 0 );
+ g_signal_connect( G_OBJECT( button ), "clicked",
+ G_CALLBACK( OnBtnPatchnatural ), 0 );
+ gtk_widget_set_usize( button, 60, -2 );
+ }
+ {
+ GtkWidget* button = gtk_button_new_with_label( "Fit" );
+ gtk_widget_show( button );
+ gtk_table_attach( GTK_TABLE( table ), button, 3, 4, 3, 4,
+ (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
+ (GtkAttachOptions) ( 0 ), 0, 0 );
+ g_signal_connect( G_OBJECT( button ), "clicked",
+ G_CALLBACK( OnBtnPatchFit ), 0 );
+ gtk_widget_set_usize( button, 60, -2 );
+ }
+ {
+ GtkWidget* spin = gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 1, 0, 1 << 16, 1, 10, 0 ) ), 0, 6 );
+ gtk_widget_show( spin );
+ gtk_table_attach( GTK_TABLE( table ), spin, 2, 3, 1, 2,
+ (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
+ (GtkAttachOptions) ( 0 ), 0, 0 );
+ gtk_widget_set_usize( spin, 60, -2 );
+ AddDialogData( *GTK_SPIN_BUTTON( spin ), m_fitHorizontal );
+ }
+ {
+ GtkWidget* spin = gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 1, 0, 1 << 16, 1, 10, 0 ) ), 0, 6 );
+ gtk_widget_show( spin );
+ gtk_table_attach( GTK_TABLE( table ), spin, 3, 4, 1, 2,
+ (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
+ (GtkAttachOptions) ( 0 ), 0, 0 );
+ gtk_widget_set_usize( spin, 60, -2 );
+ AddDialogData( *GTK_SPIN_BUTTON( spin ), m_fitVertical );
+ }
+ }
+ }
+ if ( !string_empty( g_pGameDescription->getKeyValue( "si_flags" ) ) ) {
+ {
+ GtkFrame* frame = GTK_FRAME( gtk_frame_new( "Surface Flags" ) );
+ gtk_widget_show( GTK_WIDGET( frame ) );
+ gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( frame ), TRUE, TRUE, 0 );
+ {
+ GtkVBox* vbox3 = GTK_VBOX( gtk_vbox_new( FALSE, 4 ) );
+ //gtk_container_set_border_width(GTK_CONTAINER(vbox3), 4);
+ gtk_widget_show( GTK_WIDGET( vbox3 ) );
+ gtk_container_add( GTK_CONTAINER( frame ), GTK_WIDGET( vbox3 ) );
+ {
+ GtkTable* table = GTK_TABLE( gtk_table_new( 8, 4, FALSE ) );
+ gtk_widget_show( GTK_WIDGET( table ) );
+ gtk_box_pack_start( GTK_BOX( vbox3 ), GTK_WIDGET( table ), TRUE, TRUE, 0 );
+ gtk_table_set_row_spacings( table, 0 );
+ gtk_table_set_col_spacings( table, 0 );
+
+ GtkCheckButton** p = m_surfaceFlags;
+
+ for ( int c = 0; c != 4; ++c )
+ {
+ for ( int r = 0; r != 8; ++r )
+ {
+ GtkCheckButton* check = GTK_CHECK_BUTTON( gtk_check_button_new_with_label( getSurfaceFlagName( c * 8 + r ) ) );
+ gtk_widget_show( GTK_WIDGET( check ) );
+ gtk_table_attach( table, GTK_WIDGET( check ), c, c + 1, r, r + 1,
+ (GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
+ (GtkAttachOptions)( 0 ), 0, 0 );
+ *p++ = check;
+ guint handler_id = togglebutton_connect_toggled( GTK_TOGGLE_BUTTON( check ), ApplyFlagsCaller( *this ) );
+ g_object_set_data( G_OBJECT( check ), "handler", gint_to_pointer( handler_id ) );
+ }
+ }
+ }
+ }
+ }
+ {
+ GtkFrame* frame = GTK_FRAME( gtk_frame_new( "Content Flags" ) );
+ gtk_widget_show( GTK_WIDGET( frame ) );
+ gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( frame ), TRUE, TRUE, 0 );
+ {
+ GtkVBox* vbox3 = GTK_VBOX( gtk_vbox_new( FALSE, 4 ) );
+ //gtk_container_set_border_width(GTK_CONTAINER(vbox3), 4);
+ gtk_widget_show( GTK_WIDGET( vbox3 ) );
+ gtk_container_add( GTK_CONTAINER( frame ), GTK_WIDGET( vbox3 ) );
+ {
+
+ GtkTable* table = GTK_TABLE( gtk_table_new( 8, 4, FALSE ) );
+ gtk_widget_show( GTK_WIDGET( table ) );
+ gtk_box_pack_start( GTK_BOX( vbox3 ), GTK_WIDGET( table ), TRUE, TRUE, 0 );
+ gtk_table_set_row_spacings( table, 0 );
+ gtk_table_set_col_spacings( table, 0 );
+
+ GtkCheckButton** p = m_contentFlags;
+
+ for ( int c = 0; c != 4; ++c )
+ {
+ for ( int r = 0; r != 8; ++r )
+ {
+ GtkCheckButton* check = GTK_CHECK_BUTTON( gtk_check_button_new_with_label( getContentFlagName( c * 8 + r ) ) );
+ gtk_widget_show( GTK_WIDGET( check ) );
+ gtk_table_attach( table, GTK_WIDGET( check ), c, c + 1, r, r + 1,
+ (GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
+ (GtkAttachOptions)( 0 ), 0, 0 );
+ *p++ = check;
+ guint handler_id = togglebutton_connect_toggled( GTK_TOGGLE_BUTTON( check ), ApplyFlagsCaller( *this ) );
+ g_object_set_data( G_OBJECT( check ), "handler", gint_to_pointer( handler_id ) );
+ }
+ }
+
+ // not allowed to modify detail flag using Surface Inspector
+ gtk_widget_set_sensitive( GTK_WIDGET( m_contentFlags[BRUSH_DETAIL_FLAG] ), FALSE );
+ }
+ }
+ }
+ {
+ GtkFrame* frame = GTK_FRAME( gtk_frame_new( "Value" ) );
+ gtk_widget_show( GTK_WIDGET( frame ) );
+ gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( frame ), TRUE, TRUE, 0 );
+ {
+ GtkVBox* vbox3 = GTK_VBOX( gtk_vbox_new( FALSE, 4 ) );
+ gtk_container_set_border_width( GTK_CONTAINER( vbox3 ), 4 );
+ gtk_widget_show( GTK_WIDGET( vbox3 ) );
+ gtk_container_add( GTK_CONTAINER( frame ), GTK_WIDGET( vbox3 ) );
+
+ {
+ GtkEntry* entry = GTK_ENTRY( gtk_entry_new() );
+ gtk_widget_show( GTK_WIDGET( entry ) );
+ gtk_box_pack_start( GTK_BOX( vbox3 ), GTK_WIDGET( entry ), TRUE, TRUE, 0 );
+ m_valueEntryWidget = entry;
+ m_valueEntry.connect( entry );
+ }
+ }
+ }
+ }