Make the scroll behavior change from 2008-11-21T21:05:43Z!kailoran@gmail.com...
...(that fulfilled fr #12604) optional, changeable in advanced preferences. Defaults to old behavior, fixing bug #13046. New string added for the advanced preference.
This commit is contained in:
parent
99a9556fba
commit
b9198d41ec
2 changed files with 9 additions and 1 deletions
|
@ -65,6 +65,13 @@
|
|||
default=yes
|
||||
[/advanced_preference]
|
||||
|
||||
[advanced_preference]
|
||||
field=scroll_when_mouse_outside
|
||||
name=_"Keep scrolling when mouse leaves window"
|
||||
type=boolean
|
||||
default=yes
|
||||
[/advanced_preference]
|
||||
|
||||
[advanced_preference]
|
||||
field=animate_map
|
||||
name=_"Animate Map"
|
||||
|
|
|
@ -128,7 +128,8 @@ void controller_base::post_mouse_press(const SDL_Event& /*event*/) {
|
|||
bool controller_base::handle_scroll(CKey& key, int mousex, int mousey, int mouse_flags)
|
||||
{
|
||||
bool scrolling = false;
|
||||
bool mouse_in_window = SDL_GetAppState() & SDL_APPMOUSEFOCUS;
|
||||
bool mouse_in_window = (SDL_GetAppState() & SDL_APPMOUSEFOCUS)
|
||||
|| utils::string_bool(preferences::get("scroll_when_mouse_outside"), true);
|
||||
const int scroll_threshold = (preferences::mouse_scroll_enabled())
|
||||
? preferences::mouse_scroll_threshold()
|
||||
: 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue