Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error message opening nowhere near my mouse #9029

Open
TrueBrain opened this issue Apr 12, 2021 · 6 comments
Open

Error message opening nowhere near my mouse #9029

TrueBrain opened this issue Apr 12, 2021 · 6 comments

Comments

@TrueBrain
Copy link
Member

@TrueBrain TrueBrain commented Apr 12, 2021

Version of OpenTTD

1.11.0

Expected result

Error message near my mouse. The reason for this is simple:

You are focused close to your mouse, as that is where you perform the action. So instead of the error appearing .. "somewhere", do it relative close to the mouse so it is seen by the user.
Focus should be localized, and while this wasn't an issue when screens were 640x480, with modern resolutions this is more of an issue.

Alternatively, another form of feedback that the action failed, so I know to look for the error message, works fine for me to. But I was just clicking and clicking being annoyed nothing happened.

Actual result

Error message somewhere on my screen, maybe in this corner? or this? No there? Owh, wait, here. Mostly caused by a 2k monitor and not scaling the UI (which works fine for most things except this).

It seems they mostly want to be in some corner, far away from you. Like it is scared of being seen.

Steps to reproduce

  • Have a sufficient large screen.
  • Open some windows.
  • Try to build something that fails.
  • Be confused, try again.
  • And again.
  • Find out that somewhere far away from your mouse is an error telling you it cannot be done.

I have to admit this might be a me-problem, but I think/hope I am not alone in the frustration here.

@nielsmh
Copy link
Contributor

@nielsmh nielsmh commented Apr 12, 2021

I think error messages open in the corner furthest from the mouse, on the idea that they will have less risk of blocking something the player wanted to click to do the actual intended/would-work action. But that logic might not be appropriate any longer now resolutions are typically greater than 1024x768.

Loading

@giantkin
Copy link

@giantkin giantkin commented May 9, 2021

thats not a bug, its a feature. (stemming from the original game!) sometimes, ive had it 'stick' to the same spot where the last one was displayed, ie: if i moved it to the top right corner, from then on, it would always popup there. (until the nxt install)

Loading

@LordAro
Copy link
Member

@LordAro LordAro commented Jul 21, 2021

Replacing the positioning logic in

Point OnInitialPosition(int16 sm_width, int16 sm_height, int window_number) override
with the below seems to work well. (though untested with error-messages-with-faces)

return {_cursor.pos.x, _cursor.pos.y - (sm_height + 20) };

Loading

@LC-Zorg
Copy link

@LC-Zorg LC-Zorg commented Nov 25, 2021

But that logic might not be appropriate any longer

This logic is still appropriate. It would be very annoying if this information appeared right next to the cursor. Most of them are just a formality and the player knows perfectly well what is happening without this information, so bringing them closer will not help. Moreover it can be very difficult in situations where the player needs to do something as soon as possible, but cannot, because every now and then there is a "stupid" warning about nothing that covers the field of action.

Example:
Aghrrr

  1. You need to build signaling quickly, otherwise there will be an accident.
  2. You are in a very hurry, click, and you miss the track
  3. There is a warning above the place where you want to put the signaling that you cannot build it because... there is no track!
  4. You close this idiotic information at the moment by pressing delete... which also closed the build tool
  5. By the time you choose the tool again, it is too late and an accident has occurred.
  6. ...

Of course, this is only one of many possible situations. Even if this warning pops up a bit to the side, it will still be unnecessarily distracting and irritating with its intrusiveness and can still be the cause of a very unpleasant event. Here, optionally disabling messages would not be a good option, as sometimes they are actually useful.

An alternative solution would be to specify a fixed position at which these messages would be displayed.
Currently, it is possible to save the size of most windows using the square icon. Something similar could be done with regard to the position of these windows. This way, it could also solve another problem that players have already written about on the forum at least several times - about opening windows in a different place each time.
It could be a general option for the entire interface, or a button in each of the windows that you can use or not - after pressing the icon you can still move the window, but when you close it and reopen it, it will always appear in the remembered place.

Window position lock icon

I think that in the case of these messages, they could be more visible, and at the same time they would not be disturbing if they always appeared in the same, expected place.

Loading

@nielsmh
Copy link
Contributor

@nielsmh nielsmh commented Nov 25, 2021

How about: If the error message window was see-through and not clickable, instead clicks went to whatever is below it.

Loading

@LC-Zorg
Copy link

@LC-Zorg LC-Zorg commented Nov 28, 2021

the error message window was see-through and not clickable

You want to close the window, because it bothers you after all, but you can't... You can do it anywhere, but not here? I think it would be better if hovering over them would just close them. But in either case, the warning appearing in the player's spotlight in most situations would be really irritating. Especially since it appears really often and usually about things that the player knows very well - see that screenshot above. Do you really need this?

As an option? Ok. ("Approx the warning to mouse cursor" (0-100)?) But I believe that any fixed closering of these messages towards the center is a bad idea.

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants