The International Simutrans Forum

Development => Bug Reports => Topic started by: An_dz on December 14, 2013, 04:05:53 AM

Title: Unclickable drop down menus
Post by: An_dz on December 14, 2013, 04:05:53 AM
Drop down menus that flow outside their windows can't be used. This is easily spotted in the player list frame.
Title: Re: Unclickable drop down menus
Post by: Dwachs on December 14, 2013, 09:02:22 AM
This is a known bug. And an old one, too.
Title: Re: Unclickable drop down menus
Post by: prissi on December 14, 2013, 10:41:37 PM
Maybe those should just open upwards. I will try what I can do about it.

EDIT: That does not work. The proper way is aparently to create a new window, which covers the whole screen (but is transparent) and closes when the droplist is not hit or untopped (other window opens). That woudl also remove a lot of the code checking if in dropbox or not.
Title: Re: Unclickable drop down menus
Post by: Ters on December 15, 2013, 12:19:04 PM
How is that easier than just giving the window the size and position of the droplist? I would imagine a full screen window would block access to other windows.
Title: Re: Unclickable drop down menus
Post by: prissi on December 15, 2013, 09:35:16 PM
The droplist should also catch clicks outside the window to close it. It will close when the focus is lost, but this does not always happen. A third option is to register the droplist as a special UI element and close it be the window manager. However, this is almost identical to just special dialoge without frame and its only element the droplist, which could reuse the existing infrastructure.

EDIT:
see attached patch
Title: Re: Unclickable drop down menus
Post by: Ters on December 16, 2013, 05:57:56 AM
I just thought that if you had a global windows, you'd have to click once to close the global window with the drop list, and a second time to actually activate the wanted window, since the global window ate the first event.
Title: Re: Unclickable drop down menus
Post by: prissi on December 17, 2013, 12:05:30 AM
If you return false for infowin, it should hand it through (and it seems to work indeed liek this).