diff --git a/src/user.c b/src/user.c index aa534234..f0eda8dd 100644 --- a/src/user.c +++ b/src/user.c @@ -76,7 +76,7 @@ user_new(void) new.bets[0] = g_array_new(FALSE, FALSE, sizeof(BetUser)); new.bets[1] = g_array_new(FALSE, FALSE, sizeof(BetUser)); - + new.ticket_price = const_int("int_team_stadium_ticket_price"); return new; } diff --git a/src/user_struct.h b/src/user_struct.h index 1a81b94b..dfa6ed91 100644 --- a/src/user_struct.h +++ b/src/user_struct.h @@ -164,7 +164,7 @@ typedef struct /** The user's money, debt, income and expenses. We have double arrays to store information about the current and the past week. */ - gint money, debt, money_in[2][MON_IN_END], + gint ticket_price, money, debt, money_in[2][MON_IN_END], money_out[2][MON_OUT_END]; /** The user's scout and physio qualities. @see #Quality */ diff --git a/src/window.c b/src/window.c index 2fd0f129..7519662c 100644 --- a/src/window.c +++ b/src/window.c @@ -510,6 +510,7 @@ window_show_stadium(void) GtkProgressBar *progressbar_safety, *progressbar_average_attendance; gfloat average_attendance_perc = 0; + GtkSpinButton *spinbutton_ticket_price; window_create(WINDOW_STADIUM); @@ -518,6 +519,9 @@ window_show_stadium(void) label_average_attendance = GTK_LABEL(lookup_widget(window.stadium, "label_average_attendance")); label_name = GTK_LABEL(lookup_widget(window.stadium, "label_stadium_name")); + spinbutton_ticket_price = GTK_SPIN_BUTTON(lookup_widget(window.stadium, "spin_ticket_price")); + gtk_spin_button_set_value(spinbutton_ticket_price, current_user.ticket_price); + progressbar_safety = GTK_PROGRESS_BAR(lookup_widget(window.stadium, "progressbar_safety")); progressbar_average_attendance = GTK_PROGRESS_BAR(lookup_widget(window.stadium, "progressbar_average_attendance"));