The International Simutrans Forum

 

Author Topic: Unclickable drop down menus  (Read 2021 times)

0 Members and 1 Guest are viewing this topic.

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2844
  • D'oh
    • by An_dz
  • Languages: pt, en, it, (de)
Unclickable drop down menus
« 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.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4568
  • Languages: EN, DE, AT
Re: Unclickable drop down menus
« Reply #1 on: December 14, 2013, 09:02:22 AM »
This is a known bug. And an old one, too.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9460
  • Languages: De,EN,JP
Re: Unclickable drop down menus
« Reply #2 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.
« Last Edit: December 15, 2013, 12:01:54 AM by prissi »

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5478
  • Languages: EN, NO
Re: Unclickable drop down menus
« Reply #3 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.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9460
  • Languages: De,EN,JP
Re: Unclickable drop down menus
« Reply #4 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
« Last Edit: December 15, 2013, 11:54:29 PM by prissi »

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5478
  • Languages: EN, NO
Re: Unclickable drop down menus
« Reply #5 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.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9460
  • Languages: De,EN,JP
Re: Unclickable drop down menus
« Reply #6 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).