mirror of
https://github.com/tstellar/bygfoot.git
synced 2025-01-18 18:02:32 +01:00
"Lg speed fix."
This commit is contained in:
parent
dcff97a4db
commit
470c5c854e
@ -297,12 +297,18 @@ on_spinbutton_speed_button_press_event (GtkWidget *widget,
|
||||
{
|
||||
if(event->button == 3)
|
||||
{
|
||||
if(option_int("int_opt_user_live_game_speed", &usr(stat2).options) == 0)
|
||||
option_set_int("int_opt_user_live_game_speed", &usr(stat2).options, 30);
|
||||
else if(option_int("int_opt_user_live_game_speed", &usr(stat2).options) == 30)
|
||||
option_set_int("int_opt_user_live_game_speed", &usr(stat2).options, 20);
|
||||
else
|
||||
if(option_int("int_opt_user_live_game_speed", &usr(stat2).options) ==
|
||||
-rint((gfloat)(const_int("int_game_gui_live_game_speed_max") - 10) /
|
||||
(gfloat)(const_int("int_game_gui_live_game_speed_grad"))))
|
||||
option_set_int("int_opt_user_live_game_speed", &usr(stat2).options, 0);
|
||||
else if(option_int("int_opt_user_live_game_speed", &usr(stat2).options) == 0)
|
||||
option_set_int("int_opt_user_live_game_speed", &usr(stat2).options,
|
||||
-rint((gfloat)(const_int("int_game_gui_live_game_speed_max") - 10) /
|
||||
(gfloat)(const_int("int_game_gui_live_game_speed_grad") * 2)));
|
||||
else
|
||||
option_set_int("int_opt_user_live_game_speed", &usr(stat2).options,
|
||||
-rint((gfloat)(const_int("int_game_gui_live_game_speed_max") - 10) /
|
||||
(gfloat)(const_int("int_game_gui_live_game_speed_grad"))));
|
||||
|
||||
gtk_spin_button_set_value(
|
||||
GTK_SPIN_BUTTON(lookup_widget(window.live, "spinbutton_speed")),
|
||||
|
@ -329,6 +329,10 @@ option_gui_write_spin_widgets(gint **spin_options, GtkSpinButton **spin_widgets)
|
||||
GTK_SPIN_BUTTON(lookup_widget(window.options, "spinbutton_live_speed"));
|
||||
spin_options[SPIN_OPT_LIVE_SPEED] = opt_user_intp("int_opt_user_live_game_speed");
|
||||
|
||||
gtk_spin_button_set_range(GTK_SPIN_BUTTON(spin_widgets[SPIN_OPT_LIVE_SPEED]), 0,
|
||||
-rint((gfloat)(const_int("int_game_gui_live_game_speed_max") - 10) /
|
||||
(gfloat)(const_int("int_game_gui_live_game_speed_grad"))));
|
||||
|
||||
spin_widgets[SPIN_OPT_LIVE_VERBOSITY] =
|
||||
GTK_SPIN_BUTTON(lookup_widget(window.options, "spinbutton_live_verbosity"));
|
||||
spin_options[SPIN_OPT_LIVE_VERBOSITY] = opt_user_intp("int_opt_user_live_game_verbosity");
|
||||
|
13
src/window.c
13
src/window.c
@ -412,9 +412,16 @@ window_show_transfer_dialog(const gchar *text)
|
||||
void
|
||||
window_live_set_spinbuttons(void)
|
||||
{
|
||||
gtk_spin_button_set_value(
|
||||
GTK_SPIN_BUTTON(lookup_widget(window.live, "spinbutton_speed")),
|
||||
(gfloat)option_int("int_opt_user_live_game_speed", &usr(stat2).options));
|
||||
GtkSpinButton *sb_speed =
|
||||
GTK_SPIN_BUTTON(lookup_widget(window.live, "spinbutton_speed"));
|
||||
|
||||
gtk_spin_button_set_range(sb_speed, 0,
|
||||
-rint((gfloat)(const_int("int_game_gui_live_game_speed_max") - 10) /
|
||||
(gfloat)(const_int("int_game_gui_live_game_speed_grad"))));
|
||||
|
||||
gtk_spin_button_set_value(sb_speed,
|
||||
(gfloat)option_int("int_opt_user_live_game_speed",
|
||||
&usr(stat2).options));
|
||||
gtk_spin_button_set_value(
|
||||
GTK_SPIN_BUTTON(lookup_widget(window.live, "spinbutton_verbosity")),
|
||||
(gfloat)option_int("int_opt_user_live_game_verbosity", &usr(stat2).options));
|
||||
|
@ -333,8 +333,8 @@ float_game_gui_live_game_scale_chance 4500
|
||||
float_game_gui_live_game_scale_range 100000
|
||||
|
||||
# live game speed (milliseconds
|
||||
int_game_gui_live_game_speed_grad -66683
|
||||
int_game_gui_live_game_speed_max 3000000
|
||||
int_game_gui_live_game_speed_grad -87500
|
||||
int_game_gui_live_game_speed_max 3500010
|
||||
|
||||
# factor changing the speed when penalties
|
||||
float_game_gui_live_game_speed_penalties_factor 20000
|
||||
|
Loading…
Reference in New Issue
Block a user