Minor bug/improvement: disable edge scroll when you don't have focus

The Galaxy Lives On! Distant Worlds, the critically acclaimed 4X space strategy game is back with a brand new 64-bit engine, 3D graphics and a polished interface to begin an epic new Distant Worlds series with Distant Worlds 2. Distant Worlds 2 is a vast, pausable real-time 4X space strategy game. Experience the full depth and detail of turn-based strategy, but with the simplicity and ease of real-time, and on the scale of a massively-multiplayer online game.

Moderator: MOD_DW2

Post Reply
mordachai
Posts: 800
Joined: Fri Mar 06, 2015 4:55 pm

Minor bug/improvement: disable edge scroll when you don't have focus

Post by mordachai »

If I'm letting the game run in background - but interacting with other software - it's annoying that the game wanders all over the galaxy (and beyond) because I move my mouse need screen edge.

It doesn't have focus - it shouldn't be responding to window's edge :P
User avatar
Radamanthe
Posts: 54
Joined: Tue Mar 01, 2022 12:40 pm
Location: FRANCE

Re: Minor bug/improvement: disable edge scroll when you don't have focus

Post by Radamanthe »

The UI mouse management is quite wrong TBH.
  1. Mouse clicks: the mouse up/release events are not tied to previous mouse down/click (ie. you click a button, you move the mouse, you release on another button -> the other button is validated). This is definitely not how this should work. Making the mouse up the validating event is ok most of the time, but it should not work if the previously clicked area was elsewhere (even in empty areas). This leads to annoying behaviors in many ways. Notably in research screen where it happens frequently if you click in empty space to drag-scroll and the mouse changes focus in the view due to blocking borders: if then the mouse is on a button of a possible research when you release, it brings the modal dialog to start it, which is not what you intended to do. So annoying that I found myself always taking care avoiding it when scrolling there.
  2. Mouse moves: in-game windows in the background always react to moves. Happens frequently when the big window with colony details is open, and then other windows appear in front of it (like the ones which open automatically when hovering elements in selection). The latter reacts to mouse moves to show tooltips (ok), but if there are elements in the colony window behind, they react too. Clicks also leak through!
  3. As you stated, the game window by itself also reacts to mouse move events when in background (but not through another tinnier foreground application window like in 2.). Frankly, I sometimes make use of it, but really, this should also not work like that. Applications windows which do not have the focus generally ignore mouse events (systems API often allow setting this, but ignoring is usually the default behavior).
Granted building a good UI from scratch by ourselves (ie. not using the operating system GUI API like in DW1) is not something that easy compared to the rest of a game engine, but these issues are basic UI QoL and I hope these will be fixed at some point.
Last edited by Radamanthe on Thu Jun 16, 2022 10:56 am, edited 1 time in total.
User avatar
rxnnxs
Posts: 662
Joined: Sat Jun 01, 2013 10:25 am
Location: what goes on
Contact:

Re: Minor bug/improvement: disable edge scroll when you don't have focus

Post by rxnnxs »

Thank you explaining in detail those really game play improving observations.
I hope all of those tiny little things will some day find implementation.
It will in that case be one really awesome masterpiece. But all those things have to be reported and taken care of.
I really look forward but for myself am done explaining all those things that disturb me.
So thank you for that input, it really is needed and the game deserves it!

Hail to distant worlds and long lives the updating process.
User avatar
Radamanthe
Posts: 54
Joined: Tue Mar 01, 2022 12:40 pm
Location: FRANCE

Re: Minor bug/improvement: disable edge scroll when you don't have focus

Post by Radamanthe »

rxnnxs wrote: Wed Jun 15, 2022 1:42 pm But all those things have to be reported
Well, I already reported that few weeks ago here. Problem is that it's difficult to explain shortly and I'm not sure my english is good enough to make sense out of it ;)

Now, implementation details to cope with such things is a bit of work. I already had to do this in some projects of mine. Message queues, event propagation, tests... but this is normally not a "too late" thing to do, so I guess it's very low priority currently, if considered at all. After all, it's just QoL and even if perfectible, it's usable as is.

DW1 did not have to bother with such issues because it was obviously done with Windows API which already deal with mouse and its interactions with windows since ages. That's the kind of things you must bother with when you render everything by yourself.
Post Reply

Return to “Distant Worlds 2”