Sliders don't jump anymore
Moderator: Forum Moderators
Forum rules
Before reporting issues in this section, you must read the following topic:
Before reporting issues in this section, you must read the following topic:
Sliders don't jump anymore
This is not really an issue, but something that is bothering me, why the ability to click on the sliders (like the one to increase the time limit for examle) was removed from V 1.14 of BFW ?
Now you are forced to move the pointer exactly on that tiny rettangle, keep pressed the mouse button, and slide it, before you could just press on any point on the slider to make it jump there.
This makes tbe whole process of setting up a game more tedious, can the slider mechanics be restored like they were in V 1.12 of the game?
Now you are forced to move the pointer exactly on that tiny rettangle, keep pressed the mouse button, and slide it, before you could just press on any point on the slider to make it jump there.
This makes tbe whole process of setting up a game more tedious, can the slider mechanics be restored like they were in V 1.12 of the game?
Beholded Wesnoth's Origins.
Max G on WIF
Rank 🌟🌟🌟🌟🌟
Max G on WIF
Rank 🌟🌟🌟🌟🌟
Re: Sliders don't jump anymore
Since you are asking “why”, this was definitely an accident rather than deliberate. For versions 1.6 through 1.14 there are basically two different UI frameworks. The lobby and game setup UI in older versions used the older one (GUI1), while Wesnoth 1.14.x uses the new one (GUI2). It’s 99% likely that this behaviour was just never implemented in it because of an oversight.
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.
Re: Sliders don't jump anymore
I think the current gui2 slider behviour is mostly internal and also matches from what i observe in sliders in other applications: when you click on the slider area on the right from the grip the grip will jump a fixed amount to the right and when you click to the left side it will jump a fixed amount to the left, and not to exactly the position to where the mouse is. In the wesnoth this 'fixed amount' is currently just 1, which is not ideal for all cases though.
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
Re: Sliders don't jump anymore
Yes, it actually jymps by one, but I don't consider that even "jumping" but just moving a step forward, and its pratically almost useless.
But, thx for the clarifications.
But, thx for the clarifications.
Beholded Wesnoth's Origins.
Max G on WIF
Rank 🌟🌟🌟🌟🌟
Max G on WIF
Rank 🌟🌟🌟🌟🌟
Re: Sliders don't jump anymore
This should be easy to fix.
The time slider is created here:
The macro _GUI_MP_CREATE_OPTION_SLIDER is defined in data/gui/window/mp_create_game.cfg and the definition contains:
So this patch will fix it:
I set the step size to 15s which are 1% of the range - that's a nice round figure. I would PR this but maybe there's a way to use WFL or formulas or something to set step_size to min(1, (_SLIDER_MAX-_SLIDER_MIN)/100) for all [slider]s in the GUI, not just these three?
The time slider is created here:
Code: Select all
data/gui/window/mp_create_game.cfg:455: {_GUI_MP_CREATE_OPTION_SLIDER ( _ "Reservoir") "reservoir" 30 1500 ( _ "Longest time possible for any turn (seconds)") ()}
Code: Select all
[slider]
id = {_SLIDER_ID}
definition = "minimal"
minimum_value = {_SLIDER_MIN}
maximum_value = {_SLIDER_MAX}
step_size = 1
tooltip = {_TOOLTIP}
{_EXTRA_WML}
[/slider]
Code: Select all
diff --git a/data/gui/window/mp_create_game.cfg b/data/gui/window/mp_create_game.cfg
index c2363a54e8..092c60475f 100644
--- a/data/gui/window/mp_create_game.cfg
+++ b/data/gui/window/mp_create_game.cfg
@@ -448,11 +448,11 @@
[grid]
- {_GUI_MP_CREATE_OPTION_SLIDER ( _ "Initial Limit") "init_turn_limit" 30 1500 ( _ "Longest time allowed for first turn (seconds)") ()}
+ {_GUI_MP_CREATE_OPTION_SLIDER ( _ "Initial Limit") "init_turn_limit" 30 1500 ( _ "Longest time allowed for first turn (seconds)") (step_size=15)}
- {_GUI_MP_CREATE_OPTION_SLIDER ( _ "Turn Bonus") "turn_bonus" 10 300 ( _ "Time for general tasks each turn (seconds)") ()}
+ {_GUI_MP_CREATE_OPTION_SLIDER ( _ "Turn Bonus") "turn_bonus" 10 300 ( _ "Time for general tasks each turn (seconds)") (step_size=30)}
- {_GUI_MP_CREATE_OPTION_SLIDER ( _ "Reservoir") "reservoir" 30 1500 ( _ "Longest time possible for any turn (seconds)") ()}
+ {_GUI_MP_CREATE_OPTION_SLIDER ( _ "Reservoir") "reservoir" 30 1500 ( _ "Longest time possible for any turn (seconds)") (step_size=15)}
{_GUI_MP_CREATE_OPTION_SLIDER ( _ "Action Bonus") "action_bonus" 0 30 ( _ "Time for each attack, recruit, and capture") ()}
Re: Sliders don't jump anymore
I think that the different gui also explains why Ican not select my faction and leader on the menu screen with right clicks, but only with left clicks.
Beholded Wesnoth's Origins.
Max G on WIF
Rank 🌟🌟🌟🌟🌟
Max G on WIF
Rank 🌟🌟🌟🌟🌟