Previously, I had implemented the hint text ("Search)" and image (the magnifying glass)
as a custom text box definition. This caused some problems, though. Since the string was
hard-coded as part of a WFL formula, it couldn't be translated (see #2709 and #2732). It
also wasn't expandable to any other usecase.
Instead, I've added two new hint_text= and hint_image= keys to [text_box], wrapped the
"Search" text and magnifying image path in a helper macro, and refactored the default
definition to display the hint text and image when appropriate.
This also fixes a minor issue where selected text wouldn't remain highlighted when the
box wasn't focused when using the filter definition (it did with the default one).
This should fix the untranslatable "Search" text issue mentioned in both issues above.
The new string is in the wesnoth-lib textdomain.
Previously, MP Staging was using connect_engine::connected_users() to fill in the user list.
However, I noticed that the server was already sending the user list to all clients, including
the host, so I could unify the handling between Staging and Join Game by just using the server
data for both.
I've also added appropriate indicators for host, observer, and self in the list for both dialogs.
Additional host= and observer= status keys are sent by the server for that purpose.
I've also made the server dispatch the player list to the host when a game is created. This is
slightly redundant, since the host is the only player at that point, but it's easier than creating
a user config locally, or using connected_users(), not to mention easier to maintain.
The wesnothd::game::send_user_list function no longer exists early id `description_` is null.
No idea why it did that. It's not even used in the function. Anyway, it needed to be removed in
order for the above change to work.
Speaking of the host's copy of the player list, I haven't touched that. It's still needed for
managing things in the connect_engine. Might simplify things further in the future by delegating
more handling to the server, since it has a lot of the data needed already, but that's a different
project.
This makes it so the "selected" segment of the groove (towards the
slider origin) is drawn with a brighter color than the "empty" segment
(opposite from the origin). Since this obviously wouldn't work with
RGB #FFFFFF, and the color is too distracting anyway (it was pretty much
the only widget using the general *text* color), we now use the standard
UI border colors to match buttons, checkboxes and so on. This should
hopefully help with harmonizing Wesnoth's UI color scheme across the
board.
For this purpose we also introduce a macro for a darker/shaded disabled
text color, used for the unselected segment of disabled sliders.