Mudlet / Mudlet

⚔️ A cross-platform, open source, and super fast MUD client with scripting in Lua
https://mudlet.org
GNU General Public License v2.0
731 stars 266 forks source link

Select current area in map "Area" popup #5221

Open Kebap opened 3 years ago

Kebap commented 3 years ago

Brief summary of issue / Description of requested feature:

Select current area in popup list of areas, and not the alphabetically first

Steps to reproduce the issue / Reasons for adding feature:

  1. Right click 2d map
  2. Select "Area" from list
  3. A popup window is shown
  4. A dropdown menu lists all areas
  5. You are to select the destination area
  6. The alphabetically first area is selected up front

Error output / Expected result of feature

  1. The current area should be selected up front

My areas have names that reflect geographical vicinity, so if I want to move rooms to an adjacent area, it will have an adjacent name. Always scrolling through the list of all areas seems superfluous.

Extra information, such as Mudlet version, operating system and ideas for how to solve / implement:

SlySven commented 3 years ago

So it seems that you want the list to be sorted by area ID number and the initial selection to be that for the rooms that are selected

{:thinking: BTW is it possible to select rooms from more than one area at a time - by selecting some, then changing the displayed area and then selecting some more in a different area before trying to move ALL of them to yet another area? If so, the concept of the current area becomes a little ambiguous!)

Kebap commented 3 years ago

So it seems that you want the list to be sorted by area ID number

No, I did not mention changing the order of sorting at all, merely the initial selection. I actually like the alphabetical order of names, so would oppose changing it now you mention. Because I tend to think of my areas in names rather than numbers. Do you not?

You see, I could sometimes create a couple of areas with names like "Polar - Tundra", "Polar - Castle", etc. Then create other areas elsewhere and only much later create "Polar - Iceberg" - and that should be sorted near the aforementioned, not arbitrarily elsewhere because of differing area numbers.

For all I care, the number could even be dropped from the name shown there, but may be useful in rare cases, so I'll let it be.

BTW is it possible to select rooms from more than one area

Yes okay you found an edge case that may require special treatment indeed.

Could you meanwhile also comment on the general case? I did not find any.

~How about this: If rooms from multiple areas get selected, just store the lastly selected and set that as initial selection.~ ~Therefore, if more rooms from other areas get selected, they override the storage immediately and do not bother.~ ~Easy to solve and easy to use, I reckon.~ That is too complicated still as solution for a rather theoretical case. Simply preselect the area that is currently displayed in map. No matter where the room selection (if any) stems from.