mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2025-01-10 03:51:18 +00:00
remove the offsets column
This commit is contained in:
parent
64332fb43d
commit
0912498271
1 changed files with 10 additions and 296 deletions
|
@ -120,7 +120,6 @@ GtkWidget *texture_combo;
|
|||
GtkWidget *texture_combo_entry;
|
||||
|
||||
GtkWidget *match_grid_button;
|
||||
GtkWidget *lock_valuechange_togglebutton;
|
||||
|
||||
GtkObject *hshift_value_spinbutton_adj;
|
||||
GtkWidget *hshift_value_spinbutton;
|
||||
|
@ -133,17 +132,6 @@ GtkWidget *vscale_value_spinbutton;
|
|||
GtkObject *rotate_value_spinbutton_adj;
|
||||
GtkWidget *rotate_value_spinbutton;
|
||||
|
||||
GtkObject *hshift_offset_spinbutton_adj;
|
||||
GtkWidget *hshift_offset_spinbutton;
|
||||
GtkObject *vshift_offset_spinbutton_adj;
|
||||
GtkWidget *vshift_offset_spinbutton;
|
||||
GtkObject *hscale_offset_spinbutton_adj;
|
||||
GtkWidget *hscale_offset_spinbutton;
|
||||
GtkObject *vscale_offset_spinbutton_adj;
|
||||
GtkWidget *vscale_offset_spinbutton;
|
||||
GtkObject *rotate_offset_spinbutton_adj;
|
||||
GtkWidget *rotate_offset_spinbutton;
|
||||
|
||||
GtkObject *hshift_step_spinbutton_adj;
|
||||
GtkWidget *hshift_step_spinbutton;
|
||||
GtkObject *vshift_step_spinbutton_adj;
|
||||
|
@ -170,7 +158,6 @@ gboolean on_texture_combo_entry_key_press_event( GtkWidget *widget, GdkEventKey
|
|||
void on_texture_combo_entry_activate( GtkEntry *entry, gpointer user_data );
|
||||
|
||||
static void on_match_grid_button_clicked( GtkButton *button, gpointer user_data );
|
||||
static void on_lock_valuechange_togglebutton_toggled( GtkToggleButton *togglebutton, gpointer user_data );
|
||||
|
||||
static void on_hshift_value_spinbutton_value_changed( GtkSpinButton *spinbutton, gpointer user_data );
|
||||
static void on_vshift_value_spinbutton_value_changed( GtkSpinButton *spinbutton, gpointer user_data );
|
||||
|
@ -178,12 +165,6 @@ static void on_hscale_value_spinbutton_value_changed( GtkSpinButton *spinbutton,
|
|||
static void on_vscale_value_spinbutton_value_changed( GtkSpinButton *spinbutton, gpointer user_data );
|
||||
static void on_rotate_value_spinbutton_value_changed( GtkSpinButton *spinbutton, gpointer user_data );
|
||||
|
||||
static void on_hshift_offset_spinbutton_value_changed( GtkSpinButton *spinbutton, gpointer user_data );
|
||||
static void on_vshift_offset_spinbutton_value_changed( GtkSpinButton *spinbutton, gpointer user_data );
|
||||
static void on_hscale_offset_spinbutton_value_changed( GtkSpinButton *spinbutton, gpointer user_data );
|
||||
static void on_vscale_offset_spinbutton_value_changed( GtkSpinButton *spinbutton, gpointer user_data );
|
||||
static void on_rotate_offset_spinbutton_value_changed( GtkSpinButton *spinbutton, gpointer user_data );
|
||||
|
||||
static void on_hshift_step_spinbutton_value_changed( GtkSpinButton *spinbutton, gpointer user_data );
|
||||
static void on_vshift_step_spinbutton_value_changed( GtkSpinButton *spinbutton, gpointer user_data );
|
||||
static void on_hscale_step_spinbutton_value_changed( GtkSpinButton *spinbutton, gpointer user_data );
|
||||
|
@ -211,7 +192,6 @@ static void on_apply_button_clicked( GtkButton *button, gpointer user_data );
|
|||
void IsFaceConflicting(){
|
||||
texdef_t* tmp_texdef;
|
||||
texdef_to_face_t* temp_texdef_face_list;
|
||||
// char buf[12];
|
||||
char texture_name[128];
|
||||
|
||||
if ( texdef_face_list_empty() ) {
|
||||
|
@ -320,7 +300,6 @@ static void PopulateTextureComboList(){
|
|||
texdef_to_face_t* temp_texdef_face_list;
|
||||
char blank[1];
|
||||
GList *items = NULL;
|
||||
// GList *tmp_item;
|
||||
int num_of_list_items = 0;
|
||||
|
||||
blank[0] = 0;
|
||||
|
@ -599,62 +578,26 @@ void SetTexMods(){
|
|||
texdef_offset.SetName( SHADER_NOT_FOUND );
|
||||
}
|
||||
|
||||
|
||||
spin = GTK_SPIN_BUTTON( hshift_offset_spinbutton );
|
||||
gtk_spin_button_set_value( spin, texdef_offset.shift[0] );
|
||||
adjust = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( spin ) );
|
||||
adjust->step_increment = l_pIncrement->shift[0];
|
||||
gtk_spin_button_set_value( GTK_SPIN_BUTTON( hshift_step_spinbutton ), l_pIncrement->shift[0] );
|
||||
|
||||
spin = GTK_SPIN_BUTTON( hshift_value_spinbutton );
|
||||
adjust = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( spin ) );
|
||||
adjust->step_increment = l_pIncrement->shift[0];
|
||||
|
||||
|
||||
spin = GTK_SPIN_BUTTON( vshift_offset_spinbutton );
|
||||
gtk_spin_button_set_value( spin, texdef_offset.shift[1] );
|
||||
adjust = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( spin ) );
|
||||
adjust->step_increment = l_pIncrement->shift[1];
|
||||
gtk_spin_button_set_value( GTK_SPIN_BUTTON( vshift_step_spinbutton ), l_pIncrement->shift[1] );
|
||||
|
||||
spin = GTK_SPIN_BUTTON( vshift_value_spinbutton );
|
||||
adjust = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( spin ) );
|
||||
adjust->step_increment = l_pIncrement->shift[1];
|
||||
|
||||
|
||||
spin = GTK_SPIN_BUTTON( hscale_offset_spinbutton );
|
||||
gtk_spin_button_set_value( spin, texdef_offset.scale[0] );
|
||||
adjust = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( spin ) );
|
||||
adjust->step_increment = l_pIncrement->scale[0];
|
||||
gtk_spin_button_set_value( GTK_SPIN_BUTTON( hscale_step_spinbutton ), l_pIncrement->scale[0] );
|
||||
|
||||
spin = GTK_SPIN_BUTTON( hscale_value_spinbutton );
|
||||
adjust = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( spin ) );
|
||||
adjust->step_increment = l_pIncrement->scale[0];
|
||||
|
||||
|
||||
spin = GTK_SPIN_BUTTON( vscale_offset_spinbutton );
|
||||
gtk_spin_button_set_value( spin, texdef_offset.scale[1] );
|
||||
adjust = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( spin ) );
|
||||
adjust->step_increment = l_pIncrement->scale[1];
|
||||
gtk_spin_button_set_value( GTK_SPIN_BUTTON( vscale_step_spinbutton ), l_pIncrement->scale[1] );
|
||||
|
||||
spin = GTK_SPIN_BUTTON( vscale_value_spinbutton );
|
||||
adjust = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( spin ) );
|
||||
adjust->step_increment = l_pIncrement->scale[1];
|
||||
|
||||
|
||||
spin = GTK_SPIN_BUTTON( rotate_offset_spinbutton );
|
||||
gtk_spin_button_set_value( spin, texdef_offset.rotate );
|
||||
adjust = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( spin ) );
|
||||
adjust->step_increment = l_pIncrement->rotate;
|
||||
gtk_spin_button_set_value( GTK_SPIN_BUTTON( rotate_step_spinbutton ), l_pIncrement->rotate );
|
||||
|
||||
spin = GTK_SPIN_BUTTON( rotate_value_spinbutton );
|
||||
adjust = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( spin ) );
|
||||
adjust->step_increment = l_pIncrement->rotate;
|
||||
|
||||
|
||||
g_bListenChanged = true;
|
||||
|
||||
// store the current texdef as our escape route if user hits OnCancel
|
||||
|
@ -880,12 +823,6 @@ GtkWidget* create_SurfaceInspector( void ){
|
|||
(GtkAttachOptions) ( GTK_FILL ),
|
||||
(GtkAttachOptions) ( GTK_FILL ), 0, 0 );
|
||||
|
||||
label = gtk_label_new( "Offset" );
|
||||
gtk_widget_show( label );
|
||||
gtk_table_attach( GTK_TABLE( table1 ), label, 2, 3, 0, 1,
|
||||
(GtkAttachOptions) ( GTK_FILL ),
|
||||
(GtkAttachOptions) ( 0 ), 0, 0 );
|
||||
|
||||
label = gtk_label_new( "Step" );
|
||||
gtk_widget_show( label );
|
||||
gtk_table_attach( GTK_TABLE( table1 ), label, 3, 4, 0, 1,
|
||||
|
@ -1011,10 +948,6 @@ GtkWidget* create_SurfaceInspector( void ){
|
|||
(GtkAttachOptions) ( GTK_FILL ),
|
||||
(GtkAttachOptions) ( GTK_FILL ), 0, 0 );
|
||||
|
||||
lock_valuechange_togglebutton = gtk_toggle_button_new_with_mnemonic( "UNLOCK" );
|
||||
gtk_widget_show( lock_valuechange_togglebutton );
|
||||
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, 0.0 );
|
||||
hshift_value_spinbutton = gtk_spin_button_new( GTK_ADJUSTMENT( hshift_value_spinbutton_adj ), 1, 2 );
|
||||
|
@ -1024,7 +957,7 @@ GtkWidget* create_SurfaceInspector( void ){
|
|||
(GtkAttachOptions) ( 0 ), 0, 0 );
|
||||
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( hshift_value_spinbutton ), GTK_UPDATE_IF_VALID );
|
||||
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON( hshift_value_spinbutton ), TRUE );
|
||||
gtk_widget_set_sensitive( GTK_WIDGET( hshift_value_spinbutton ), FALSE );
|
||||
gtk_widget_set_sensitive( GTK_WIDGET( hshift_value_spinbutton ), TRUE );
|
||||
|
||||
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 );
|
||||
|
@ -1034,7 +967,7 @@ GtkWidget* create_SurfaceInspector( void ){
|
|||
(GtkAttachOptions) ( 0 ), 0, 0 );
|
||||
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( vshift_value_spinbutton ), GTK_UPDATE_IF_VALID );
|
||||
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON( vshift_value_spinbutton ), TRUE );
|
||||
gtk_widget_set_sensitive( GTK_WIDGET( vshift_value_spinbutton ), FALSE );
|
||||
gtk_widget_set_sensitive( GTK_WIDGET( vshift_value_spinbutton ), TRUE );
|
||||
|
||||
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 );
|
||||
|
@ -1044,7 +977,7 @@ GtkWidget* create_SurfaceInspector( void ){
|
|||
(GtkAttachOptions) ( 0 ), 0, 0 );
|
||||
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( hscale_value_spinbutton ), GTK_UPDATE_IF_VALID );
|
||||
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON( hscale_value_spinbutton ), TRUE );
|
||||
gtk_widget_set_sensitive( GTK_WIDGET( hscale_value_spinbutton ), FALSE );
|
||||
gtk_widget_set_sensitive( GTK_WIDGET( hscale_value_spinbutton ), TRUE );
|
||||
|
||||
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 );
|
||||
|
@ -1054,7 +987,7 @@ GtkWidget* create_SurfaceInspector( void ){
|
|||
(GtkAttachOptions) ( 0 ), 0, 0 );
|
||||
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( vscale_value_spinbutton ), GTK_UPDATE_IF_VALID );
|
||||
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON( vscale_value_spinbutton ), TRUE );
|
||||
gtk_widget_set_sensitive( GTK_WIDGET( vscale_value_spinbutton ), FALSE );
|
||||
gtk_widget_set_sensitive( GTK_WIDGET( vscale_value_spinbutton ), TRUE );
|
||||
|
||||
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 );
|
||||
|
@ -1064,58 +997,7 @@ GtkWidget* create_SurfaceInspector( void ){
|
|||
(GtkAttachOptions) ( 0 ), 0, 0 );
|
||||
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( rotate_value_spinbutton ), GTK_UPDATE_IF_VALID );
|
||||
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON( rotate_value_spinbutton ), TRUE );
|
||||
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, 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,
|
||||
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
|
||||
(GtkAttachOptions) ( 0 ), 4, 0 );
|
||||
gtk_spin_button_set_numeric( GTK_SPIN_BUTTON( hshift_offset_spinbutton ), TRUE );
|
||||
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, 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,
|
||||
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
|
||||
(GtkAttachOptions) ( 0 ), 4, 0 );
|
||||
gtk_spin_button_set_numeric( GTK_SPIN_BUTTON( vshift_offset_spinbutton ), TRUE );
|
||||
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, 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,
|
||||
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
|
||||
(GtkAttachOptions) ( 0 ), 4, 0 );
|
||||
gtk_spin_button_set_numeric( GTK_SPIN_BUTTON( hscale_offset_spinbutton ), TRUE );
|
||||
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, 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,
|
||||
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
|
||||
(GtkAttachOptions) ( 0 ), 4, 0 );
|
||||
gtk_spin_button_set_numeric( GTK_SPIN_BUTTON( vscale_offset_spinbutton ), TRUE );
|
||||
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, 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,
|
||||
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
|
||||
(GtkAttachOptions) ( 0 ), 4, 0 );
|
||||
gtk_spin_button_set_numeric( GTK_SPIN_BUTTON( rotate_offset_spinbutton ), TRUE );
|
||||
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( rotate_offset_spinbutton ), GTK_UPDATE_IF_VALID );
|
||||
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON( rotate_offset_spinbutton ), TRUE );
|
||||
gtk_widget_set_sensitive( GTK_WIDGET( rotate_value_spinbutton ), TRUE );
|
||||
|
||||
// Step Spins
|
||||
hshift_step_spinbutton_adj = gtk_adjustment_new( 0.0, -8192.0, 8192.0, 2.0, 8.0, 0.0 );
|
||||
|
@ -1306,23 +1188,6 @@ GtkWidget* create_SurfaceInspector( void ){
|
|||
G_CALLBACK( on_texture_combo_entry_activate ),
|
||||
NULL );
|
||||
|
||||
|
||||
g_signal_connect( (gpointer) hshift_offset_spinbutton, "value_changed",
|
||||
G_CALLBACK( on_hshift_offset_spinbutton_value_changed ),
|
||||
NULL );
|
||||
g_signal_connect( (gpointer) vshift_offset_spinbutton, "value_changed",
|
||||
G_CALLBACK( on_vshift_offset_spinbutton_value_changed ),
|
||||
NULL );
|
||||
g_signal_connect( (gpointer) hscale_offset_spinbutton, "value_changed",
|
||||
G_CALLBACK( on_hscale_offset_spinbutton_value_changed ),
|
||||
NULL );
|
||||
g_signal_connect( (gpointer) vscale_offset_spinbutton, "value_changed",
|
||||
G_CALLBACK( on_vscale_offset_spinbutton_value_changed ),
|
||||
NULL );
|
||||
g_signal_connect( (gpointer) rotate_offset_spinbutton, "value_changed",
|
||||
G_CALLBACK( on_rotate_offset_spinbutton_value_changed ),
|
||||
NULL );
|
||||
|
||||
g_signal_connect( (gpointer) hshift_value_spinbutton, "value_changed",
|
||||
G_CALLBACK( on_hshift_value_spinbutton_value_changed ),
|
||||
NULL );
|
||||
|
@ -1358,9 +1223,6 @@ GtkWidget* create_SurfaceInspector( void ){
|
|||
g_signal_connect( (gpointer) match_grid_button, "clicked",
|
||||
G_CALLBACK( on_match_grid_button_clicked ),
|
||||
NULL );
|
||||
g_signal_connect( (gpointer) lock_valuechange_togglebutton, "toggled",
|
||||
G_CALLBACK( on_lock_valuechange_togglebutton_toggled ),
|
||||
NULL );
|
||||
|
||||
g_signal_connect( (gpointer) fit_width_spinbutton, "value_changed",
|
||||
G_CALLBACK( on_fit_width_spinbutton_value_changed ),
|
||||
|
@ -1427,128 +1289,6 @@ void on_texture_combo_entry_activate( GtkEntry *entry, gpointer user_data ){
|
|||
}
|
||||
}
|
||||
|
||||
// Offset Spins
|
||||
static void on_hshift_offset_spinbutton_value_changed( GtkSpinButton *spinbutton, gpointer user_data ){
|
||||
texdef_t* tmp_texdef;
|
||||
texdef_t* tmp_orig_texdef;
|
||||
texdef_to_face_t* temp_texdef_face_list;
|
||||
|
||||
texdef_offset.shift[0] = gtk_spin_button_get_value( GTK_SPIN_BUTTON( hshift_offset_spinbutton ) );
|
||||
|
||||
if ( !texdef_face_list_empty() && g_bListenChanged ) {
|
||||
for ( temp_texdef_face_list = get_texdef_face_list(); temp_texdef_face_list; temp_texdef_face_list = temp_texdef_face_list->next )
|
||||
{
|
||||
tmp_texdef = (texdef_t *) &temp_texdef_face_list->texdef;
|
||||
tmp_orig_texdef = (texdef_t *) &temp_texdef_face_list->orig_texdef;
|
||||
if ( is_HShift_conflicting ) {
|
||||
tmp_texdef->shift[0] = tmp_orig_texdef->shift[0] + texdef_offset.shift[0];
|
||||
}
|
||||
else{
|
||||
tmp_texdef->shift[0] = texdef_SI_values.shift[0] + texdef_offset.shift[0];
|
||||
}
|
||||
}
|
||||
GetTexMods();
|
||||
}
|
||||
}
|
||||
|
||||
static void on_vshift_offset_spinbutton_value_changed( GtkSpinButton *spinbutton, gpointer user_data ){
|
||||
texdef_t* tmp_texdef;
|
||||
texdef_t* tmp_orig_texdef;
|
||||
texdef_to_face_t* temp_texdef_face_list;
|
||||
|
||||
texdef_offset.shift[1] = gtk_spin_button_get_value( GTK_SPIN_BUTTON( vshift_offset_spinbutton ) );
|
||||
|
||||
if ( !texdef_face_list_empty() && g_bListenChanged ) {
|
||||
for ( temp_texdef_face_list = get_texdef_face_list(); temp_texdef_face_list; temp_texdef_face_list = temp_texdef_face_list->next )
|
||||
{
|
||||
tmp_texdef = (texdef_t *) &temp_texdef_face_list->texdef;
|
||||
tmp_orig_texdef = (texdef_t *) &temp_texdef_face_list->orig_texdef;
|
||||
if ( is_VShift_conflicting ) {
|
||||
tmp_texdef->shift[1] = tmp_orig_texdef->shift[1] + texdef_offset.shift[1];
|
||||
}
|
||||
else{
|
||||
tmp_texdef->shift[1] = texdef_SI_values.shift[1] + texdef_offset.shift[1];
|
||||
}
|
||||
}
|
||||
GetTexMods();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static void on_hscale_offset_spinbutton_value_changed( GtkSpinButton *spinbutton, gpointer user_data ){
|
||||
texdef_t* tmp_texdef;
|
||||
texdef_t* tmp_orig_texdef;
|
||||
texdef_to_face_t* temp_texdef_face_list;
|
||||
|
||||
texdef_offset.scale[0] = gtk_spin_button_get_value( GTK_SPIN_BUTTON( hscale_offset_spinbutton ) );
|
||||
|
||||
if ( !texdef_face_list_empty() && g_bListenChanged ) {
|
||||
for ( temp_texdef_face_list = get_texdef_face_list(); temp_texdef_face_list; temp_texdef_face_list = temp_texdef_face_list->next )
|
||||
{
|
||||
tmp_texdef = (texdef_t *) &temp_texdef_face_list->texdef;
|
||||
tmp_orig_texdef = (texdef_t *) &temp_texdef_face_list->orig_texdef;
|
||||
if ( is_HScale_conflicting ) {
|
||||
tmp_texdef->scale[0] = tmp_orig_texdef->scale[0] + texdef_offset.scale[0];
|
||||
}
|
||||
else{
|
||||
tmp_texdef->scale[0] = texdef_SI_values.scale[0] + texdef_offset.scale[0];
|
||||
}
|
||||
}
|
||||
GetTexMods();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
static void on_vscale_offset_spinbutton_value_changed( GtkSpinButton *spinbutton, gpointer user_data ){
|
||||
texdef_t* tmp_texdef;
|
||||
texdef_t* tmp_orig_texdef;
|
||||
texdef_to_face_t* temp_texdef_face_list;
|
||||
|
||||
texdef_offset.scale[1] = gtk_spin_button_get_value( GTK_SPIN_BUTTON( vscale_offset_spinbutton ) );
|
||||
|
||||
if ( !texdef_face_list_empty() && g_bListenChanged ) {
|
||||
for ( temp_texdef_face_list = get_texdef_face_list(); temp_texdef_face_list; temp_texdef_face_list = temp_texdef_face_list->next )
|
||||
{
|
||||
tmp_texdef = (texdef_t *) &temp_texdef_face_list->texdef;
|
||||
tmp_orig_texdef = (texdef_t *) &temp_texdef_face_list->orig_texdef;
|
||||
if ( is_VScale_conflicting ) {
|
||||
tmp_texdef->scale[1] = tmp_orig_texdef->scale[1] + texdef_offset.scale[1];
|
||||
}
|
||||
else{
|
||||
tmp_texdef->scale[1] = texdef_SI_values.scale[1] + texdef_offset.scale[1];
|
||||
}
|
||||
}
|
||||
GetTexMods();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static void on_rotate_offset_spinbutton_value_changed( GtkSpinButton *spinbutton, gpointer user_data ){
|
||||
texdef_t* tmp_texdef;
|
||||
texdef_t* tmp_orig_texdef;
|
||||
texdef_to_face_t* temp_texdef_face_list;
|
||||
|
||||
texdef_offset.rotate = gtk_spin_button_get_value( GTK_SPIN_BUTTON( rotate_offset_spinbutton ) );
|
||||
|
||||
if ( !texdef_face_list_empty() && g_bListenChanged ) {
|
||||
for ( temp_texdef_face_list = get_texdef_face_list(); temp_texdef_face_list; temp_texdef_face_list = temp_texdef_face_list->next )
|
||||
{
|
||||
tmp_texdef = (texdef_t *) &temp_texdef_face_list->texdef;
|
||||
tmp_orig_texdef = (texdef_t *) &temp_texdef_face_list->orig_texdef;
|
||||
if ( is_Rotate_conflicting ) {
|
||||
tmp_texdef->rotate = tmp_orig_texdef->rotate + texdef_offset.rotate;
|
||||
}
|
||||
else{
|
||||
tmp_texdef->rotate = texdef_SI_values.rotate + texdef_offset.rotate;
|
||||
}
|
||||
}
|
||||
GetTexMods();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Match Grid
|
||||
static void on_match_grid_button_clicked( GtkButton *button, gpointer user_data ){
|
||||
float hscale, vscale;
|
||||
|
@ -1569,21 +1309,6 @@ static void on_match_grid_button_clicked( GtkButton *button, gpointer user_data
|
|||
DoSnapTToGrid( hscale, vscale );
|
||||
}
|
||||
|
||||
|
||||
// Lock out changes to Value
|
||||
static void on_lock_valuechange_togglebutton_toggled( GtkToggleButton *togglebutton, gpointer user_data ){
|
||||
bool is_Locked;
|
||||
|
||||
is_Locked = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( lock_valuechange_togglebutton ) ) != false;
|
||||
|
||||
gtk_widget_set_sensitive( GTK_WIDGET( hscale_value_spinbutton ), is_Locked );
|
||||
gtk_widget_set_sensitive( GTK_WIDGET( vscale_value_spinbutton ), is_Locked );
|
||||
gtk_widget_set_sensitive( GTK_WIDGET( hshift_value_spinbutton ), is_Locked );
|
||||
gtk_widget_set_sensitive( GTK_WIDGET( vshift_value_spinbutton ), is_Locked );
|
||||
gtk_widget_set_sensitive( GTK_WIDGET( rotate_value_spinbutton ), is_Locked );
|
||||
}
|
||||
|
||||
|
||||
// Value Spins
|
||||
static void on_hshift_value_spinbutton_value_changed( GtkSpinButton *spinbutton, gpointer user_data ){
|
||||
texdef_t* tmp_texdef;
|
||||
|
@ -1696,9 +1421,7 @@ static void on_hshift_step_spinbutton_value_changed( GtkSpinButton *spinbutton,
|
|||
Sys_Printf( "OnIncrementChanged HShift\n" );
|
||||
#endif
|
||||
|
||||
val = gtk_spin_button_get_value( GTK_SPIN_BUTTON( hshift_step_spinbutton ) ) ;
|
||||
adjust = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( hshift_offset_spinbutton ) );
|
||||
adjust->step_increment = val;
|
||||
val = gtk_spin_button_get_value( GTK_SPIN_BUTTON( hshift_step_spinbutton ) );
|
||||
adjust = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( hshift_value_spinbutton ) );
|
||||
adjust->step_increment = val;
|
||||
l_pIncrement->shift[0] = val;
|
||||
|
@ -1718,9 +1441,7 @@ static void on_vshift_step_spinbutton_value_changed( GtkSpinButton *spinbutton,
|
|||
Sys_Printf( "OnIncrementChanged VShift\n" );
|
||||
#endif
|
||||
|
||||
val = gtk_spin_button_get_value( GTK_SPIN_BUTTON( vshift_step_spinbutton ) ) ;
|
||||
adjust = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( vshift_offset_spinbutton ) );
|
||||
adjust->step_increment = val;
|
||||
val = gtk_spin_button_get_value( GTK_SPIN_BUTTON( vshift_step_spinbutton ) );
|
||||
adjust = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( vshift_value_spinbutton ) );
|
||||
adjust->step_increment = val;
|
||||
l_pIncrement->shift[1] = val;
|
||||
|
@ -1740,9 +1461,7 @@ static void on_hscale_step_spinbutton_value_changed( GtkSpinButton *spinbutton,
|
|||
Sys_Printf( "OnIncrementChanged HShift\n" );
|
||||
#endif
|
||||
|
||||
val = gtk_spin_button_get_value( GTK_SPIN_BUTTON( hscale_step_spinbutton ) ) ;
|
||||
adjust = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( hscale_offset_spinbutton ) );
|
||||
adjust->step_increment = val;
|
||||
val = gtk_spin_button_get_value( GTK_SPIN_BUTTON( hscale_step_spinbutton ) );
|
||||
adjust = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( hscale_value_spinbutton ) );
|
||||
adjust->step_increment = val;
|
||||
l_pIncrement->scale[0] = val;
|
||||
|
@ -1762,9 +1481,7 @@ static void on_vscale_step_spinbutton_value_changed( GtkSpinButton *spinbutton,
|
|||
Sys_Printf( "OnIncrementChanged HShift\n" );
|
||||
#endif
|
||||
|
||||
val = gtk_spin_button_get_value( GTK_SPIN_BUTTON( vscale_step_spinbutton ) ) ;
|
||||
adjust = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( vscale_offset_spinbutton ) );
|
||||
adjust->step_increment = val;
|
||||
val = gtk_spin_button_get_value( GTK_SPIN_BUTTON( vscale_step_spinbutton ) );
|
||||
adjust = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( vscale_value_spinbutton ) );
|
||||
adjust->step_increment = val;
|
||||
l_pIncrement->scale[1] = val;
|
||||
|
@ -1784,9 +1501,7 @@ static void on_rotate_step_spinbutton_value_changed( GtkSpinButton *spinbutton,
|
|||
Sys_Printf( "OnIncrementChanged HShift\n" );
|
||||
#endif
|
||||
|
||||
val = gtk_spin_button_get_value( GTK_SPIN_BUTTON( rotate_step_spinbutton ) ) ;
|
||||
adjust = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( rotate_offset_spinbutton ) );
|
||||
adjust->step_increment = val;
|
||||
val = gtk_spin_button_get_value( GTK_SPIN_BUTTON( rotate_step_spinbutton ) );
|
||||
adjust = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( rotate_value_spinbutton ) );
|
||||
adjust->step_increment = val;
|
||||
l_pIncrement->rotate = val;
|
||||
|
@ -1811,7 +1526,6 @@ static void on_fit_button_clicked( GtkButton *button, gpointer user_data ){
|
|||
// Axial Button
|
||||
static void on_axial_button_clicked( GtkButton *button, gpointer user_data ){
|
||||
texdef_t* tmp_texdef;
|
||||
// texdef_t* tmp_orig_texdef;
|
||||
texdef_to_face_t* temp_texdef_face_list;
|
||||
|
||||
if ( !texdef_face_list_empty() && g_bListenChanged ) {
|
||||
|
|
Loading…
Reference in a new issue