Latest Posts

Topic: Fixing Keyboard-Scrolling

stonerl
Avatar
Topic Opener
Joined: 2018-07-30, 00:03
Posts: 327
Ranking
Tribe Member
Posted at: 2019-12-07, 22:46

In master keyboard-scrolling is broken, it is not possible to scroll diagonal and scrolling itself is painstakingly slow. So, I restored the old behavior. This comes with a price though. When a window gets opened scrolling isn't possible as long as one doesn't click on the map. I could circumvent this but this breaks closing the windows with ESC.

So, my current suggestion would be. When a window gets opened it gets focused and scrolling isn't possible as long as the user doesn't click on the playing field. Minimizing windows takes focus from them and allows scrolling. Restoring gives focus back to the window which means no scrolling until clicked on the playing field.

This would make it possible to close windows with ESC.

More problems arise with the new dropdown/up menus. They get focus and don't give it back to the playing field until a window is opened. Currently, I have no clue as to how this could be solved.

The current state can be found here, Any Ideas suggestions are welcome,


Top Quote
WorldSavior
Avatar
Joined: 2016-10-15, 04:10
Posts: 2091
OS: Linux
Version: Recent tournament version
Ranking
One Elder of Players
Location: Germany
Posted at: 2019-12-08, 12:04

stonerl wrote:

In master keyboard-scrolling is broken, it is not possible to scroll diagonal and scrolling itself is painstakingly slow.

It's also painstakingly slow in build20, build19 and build18 face-wink.png


Wanted to save the world, then I got widetracked

Top Quote
stonerl
Avatar
Topic Opener
Joined: 2018-07-30, 00:03
Posts: 327
Ranking
Tribe Member
Posted at: 2019-12-08, 16:48

BTW in build 20, scrolling speed is bound to the FPS. If you increase the max FPS in the settings to say 90 (99 is the max) scrolling should be faster.


Top Quote
WorldSavior
Avatar
Joined: 2016-10-15, 04:10
Posts: 2091
OS: Linux
Version: Recent tournament version
Ranking
One Elder of Players
Location: Germany
Posted at: 2019-12-08, 17:09

stonerl wrote:

BTW in build 20, scrolling speed is bound to the FPS. If you increase the max FPS in the settings to say 90 (99 is the max) scrolling should be faster.

Thanks for the tip, but it's still useless snailspeed then. And when I setted maxFPS to 99, the game crashed when I closed Widelands.


Wanted to save the world, then I got widetracked

Top Quote
stonerl
Avatar
Topic Opener
Joined: 2018-07-30, 00:03
Posts: 327
Ranking
Tribe Member
Posted at: 2019-12-09, 16:02

I think I fixed it:

Diagonal scrolling:

  • Number pad: 1/3/7/9 scrolls diagonal.
  • Number pad 5 works like pressing HOME.
  • Arrow keys: LEFT/UP, LEFT/DOWN, RIGHT/UP & RIGHT/DOWN scrolls diagonal

Scrolling distance is now 1/4 of the screen resolution in x/y-direction and set to smooth.


Top Quote
stonerl
Avatar
Topic Opener
Joined: 2018-07-30, 00:03
Posts: 327
Ranking
Tribe Member
Posted at: 2019-12-10, 17:43

Fixed in the latest master.


Top Quote
WorldSavior
Avatar
Joined: 2016-10-15, 04:10
Posts: 2091
OS: Linux
Version: Recent tournament version
Ranking
One Elder of Players
Location: Germany
Posted at: 2019-12-10, 18:38

stonerl wrote:

Scrolling distance is now 1/4 of the screen resolution in x/y-direction and set to smooth.

Sounds fast. One day I might test it. Thanks a lot!


Wanted to save the world, then I got widetracked

Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 1929
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2019-12-10, 18:47

It was actually too fast, so it was decreased to 1/8. You can increase it to 1/4 by holding Ctrl and decrease to 1/16 by holding Shift.


Top Quote
stonerl
Avatar
Topic Opener
Joined: 2018-07-30, 00:03
Posts: 327
Ranking
Tribe Member
Posted at: 2019-12-10, 19:20

WorldSavior wrote:

stonerl wrote:

Scrolling distance is now 1/4 of the screen resolution in x/y-direction and set to smooth.

Sounds fast. One day I might test it. Thanks a lot!

You have Ubuntu, haven't you? You could use Flatpaks to use the latest development builds.


Top Quote
trimard
Avatar
Joined: 2009-03-05, 22:40
Posts: 230
Ranking
Widelands-Forum-Junkie
Location: Paris
Posted at: 2019-12-10, 19:49

Is the last flatpack updated? 86b7920 is the last one?

Cause it's not working as advertised! face-tongue.png

  • Speed is still slow, not changed by ctrl

  • LEFT/UP, LEFT/DOWN, RIGHT/UP & RIGHT/DOWN scrolls diagonal: not working

  • Not sure what home should be doing anyway, but it's not doing much when I press '5'

The diagonals in the numpad do work! (Though because my keyboard only has one diagonal on it for some reason, I can't test all directions)

edit: check the repo, yes indeed flatpak isn't on last version it's on the commit of december 2. I guess your changes weren't implemented yet, so my comment is useless

Edited: 2019-12-10, 19:53

Top Quote