Menu

#3203 position of context menu on right click

Unspecified
closed-out-of-date
nobody
None
5
2022-04-22
2020-09-05
Pepe Bere
No

Hey there! :)
first of all thank you for pushing freecol forward again. a few years ago i played it a lot, then lost trace and am back again now, testing the current nightly and amazed about all of the new stuff!
sadly i'm facing a lot of little, but annoying issues (but used to it - using windows for games), like:

the context menu doesn't open right next to the position where I right-click, which worked correctly in 0.11.6. I experienced the same issue in 0.11.6 running on linux, too. Therefore it's probably not a brandnew problem, I'd say. But a very annoying one.

freecol: git-20200715 (Revision: 8baaf7a)
OS: Win 10 64bit, Version 1909, Build: 18363.1016
Java version: 1.8.0_211

1 Attachments

Discussion

  • forgesourcer

    forgesourcer - 2020-09-12

    I beleive the context menu is positioned aside from the tile you have clicked on, so the tile doesn't get obscured. I personally find it reasonable.

    By the way, when I right-click on a uint in the colony window, the context manu always pops up in the top-left corner of the main window, which is real annoyance.

     
    • Mike Pope

      Mike Pope - 2020-09-16

      I beleive the context menu is positioned aside from the tile you have clicked on, so the tile doesn't get obscured

      This is correct, and was done in response to user complaints/suggestions.

      By the way, when I right-click on a uint in the colony window, the context manu always pops up in the top-left corner of the main window

      There are two ways the top left corner can be selected:
      1. As a result of a weird bug in windows and/or java that we have never managed to track down
      2. Because everywhere else that was tried was unacceptable-- top left corner is the last resort.

      Let us assume it is #2, which is easier to trigger if you have a colony panel up already. Usually the colony panel will be centered on the line defining the left third of the screen and the colony tile on that for the right third, or vice versa. Clicking in the colony panel will bring up a popup that we want to avoid overwriting the colony panel itself, and also the colony tile. This is sometimes hard on small screens, and in general might be impossible. Simplifying a bit here, the routine that finds popup positions tries the preferred third-spots above (which will fail here), then directly below to the right and left of the parent panel, and some perturbations of each of those... but if they all fail... well we could keep searching but at some point the responsiveness of the GUI is going to suffer (there is no cheap collision detection available so checking a new point takes time). Currently we favour responsiveness at the expense of throwing the hard cases up into the top corner.

      Summary:
      1. I do not think the original report is a bug
      2. The top-left-corner behaviour may be WAD, but I might be convinced it could do better.

       
      • forgesourcer

        forgesourcer - 2020-09-19

        I'm currently playing on a small screen indeed, so #2 must be the case.

        I don't quite understand why try to avoid overlapping the colony panel, this is the context menu for something that is inside the panel. It's OK for it to temporarily overlap anything but its very context, i.e. unit clicked. And it won't overlap much, this menu can't be huge or multi-level, unlike tile context menu. The convenience to have it at the expected place and the time to move the mouse to the expected command are more important IMO. This time by the way adds to user's perception of "responsiveness".

        I'd suggest to just place it aside from the unit clicked, not considering colony panel or tile positions, at least in the "small screen" situation. (A simple check could be colony panel actually overlaps the tile.)

         
  • Mike Pope

    Mike Pope - 2020-09-20

    I don't quite understand why try to avoid overlapping the colony panel,

    IIRC that was because someone complained they did not like the popup obscuring the surroundings of the unit being clicked on, as they wanted to see what other units where present in the "outside colony" area to decide which one to equip. After a few of these cases, I think we ended up with a general rule that popups should avoid obscuring other popups if reasonably possible.

    I'd suggest to just place it aside from the unit clicked

    That is how it used to be. I fear we are in one of these "can not please everyone" situations.

    [small screen mode]

    Many years ago there used to be special case code for small screen configurations. It was fragile, and the gui-wrangler at the time decided it was causing more problems than it solved. IIRC the consensus on the developer mailing list at the time was that FreeCol should work on the minimum supported screen size, but making small screens work well was low priority.

     
    • forgesourcer

      forgesourcer - 2020-09-23

      we are in one of these "can not please everyone" situations

      I see. Then a user-configurable preference might be a solution? I mean prefernce for "just place it aside from the unit clicked", not the "small screen special mode".

      FreeCol should work on the minimum supported screen size

      And what this size is now, may I ask? I'm currently playing at 1366x768. Documentation states:

      FreeCol works best with a screen resolution of at least 1024x768 pixels

       
      • wintertime

        wintertime - 2020-09-25

        I'd recommend Full HD for the game. It may be playable at 1024x768 or even lower, although it can get annoying to have the large panels cover the whole screen and to need to scroll, move or resize the (sub-)panels constantly.

         
  • Mike Pope

    Mike Pope - 2022-04-22
    • status: open --> closed-out-of-date
    • Group: Current --> Unspecified
     
  • Mike Pope

    Mike Pope - 2022-04-22

    The scaling and gui work that happened recently has probably changed the behaviour here beyond recognition. Closing.

     

Log in to post a comment.