Open InappropriatePenguin opened 2 years ago
Does it have to be exact match? I like the suggestion of doing it if there's only 1 match in the dropdown.
The problem with that is that you could never select "Nauvis" because "Nauvis Orbit" would always be a possible match.
Actually, if you were talking about it in the context of on_gui_confirmed
, it would be fine.
Good point. Yeah I meant it would apply if you press enter (on_gui_confirmed) Maybe both then? Either exact match or there's only 1 non-exact match? Could be useful in some cases like if a player wants to go to an orbit, or if they hid specific orbits from the list using the priority filter.
If a player hits
<Enter>
while in a destination search field and their search text is an exact match for a zone/spaceship name and that zone/spaceship exists in the dropdown (ie. is a valid target for the relevant entity/force), then set the destination to the player's search text.Modified from original suggestion by stringweasel: