implementation of changing ticket_prices. The prices are now filled in from the user_struct

This commit is contained in:
gunnar_g 2008-10-28 13:13:45 +00:00
parent a768429a20
commit b9c5432ab0
3 changed files with 6 additions and 2 deletions

View File

@ -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;
}

View File

@ -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 */

View File

@ -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"));