mirror of https://github.com/tstellar/bygfoot.git
implementation of changing ticket_prices. The prices are now filled in from the user_struct
This commit is contained in:
parent
a768429a20
commit
b9c5432ab0
|
@ -76,7 +76,7 @@ user_new(void)
|
||||||
|
|
||||||
new.bets[0] = g_array_new(FALSE, FALSE, sizeof(BetUser));
|
new.bets[0] = g_array_new(FALSE, FALSE, sizeof(BetUser));
|
||||||
new.bets[1] = 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;
|
return new;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -164,7 +164,7 @@ typedef struct
|
||||||
/** The user's money, debt, income and expenses.
|
/** The user's money, debt, income and expenses.
|
||||||
We have double arrays to store information about
|
We have double arrays to store information about
|
||||||
the current and the past week. */
|
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];
|
money_out[2][MON_OUT_END];
|
||||||
/** The user's scout and physio qualities.
|
/** The user's scout and physio qualities.
|
||||||
@see #Quality */
|
@see #Quality */
|
||||||
|
|
|
@ -510,6 +510,7 @@ window_show_stadium(void)
|
||||||
GtkProgressBar *progressbar_safety,
|
GtkProgressBar *progressbar_safety,
|
||||||
*progressbar_average_attendance;
|
*progressbar_average_attendance;
|
||||||
gfloat average_attendance_perc = 0;
|
gfloat average_attendance_perc = 0;
|
||||||
|
GtkSpinButton *spinbutton_ticket_price;
|
||||||
|
|
||||||
window_create(WINDOW_STADIUM);
|
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_average_attendance = GTK_LABEL(lookup_widget(window.stadium, "label_average_attendance"));
|
||||||
label_name = GTK_LABEL(lookup_widget(window.stadium, "label_stadium_name"));
|
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_safety = GTK_PROGRESS_BAR(lookup_widget(window.stadium, "progressbar_safety"));
|
||||||
progressbar_average_attendance = GTK_PROGRESS_BAR(lookup_widget(window.stadium, "progressbar_average_attendance"));
|
progressbar_average_attendance = GTK_PROGRESS_BAR(lookup_widget(window.stadium, "progressbar_average_attendance"));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue