mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-18 05:19:57 +00:00

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. (cherry-picked from commit db5abb7e637fd87699fce49a9543faafc3f58068)
919 lines
16 KiB
INI
919 lines
16 KiB
INI
#textdomain wesnoth-lib
|
|
###
|
|
### Definition of the lobby screen
|
|
###
|
|
|
|
#define _GUI_GAME_LIST
|
|
[listbox]
|
|
id = "game_list"
|
|
definition = "default"
|
|
|
|
vertical_scrollbar_mode = "always"
|
|
horizontal_scrollbar_mode = "never" # Revert to "auto" if it becomes necessary
|
|
|
|
[header]
|
|
|
|
[row]
|
|
|
|
[column]
|
|
grow_factor = 1
|
|
horizontal_grow = true
|
|
border = "bottom,right"
|
|
border_size = 5
|
|
|
|
[label]
|
|
id = "map"
|
|
definition = "default"
|
|
label = _ "Games"
|
|
[/label]
|
|
[/column]
|
|
[/row]
|
|
[/header]
|
|
|
|
[list_definition]
|
|
|
|
[row]
|
|
|
|
[column]
|
|
horizontal_grow = true
|
|
|
|
[toggle_panel]
|
|
id = "panel"
|
|
definition = "default"
|
|
|
|
[grid]
|
|
|
|
[row]
|
|
|
|
[column]
|
|
grow_factor = 0
|
|
vertical_alignment = "center"
|
|
|
|
{GUI_FORCE_WIDGET_MINIMUM_SIZE 82 82 (
|
|
border = "all"
|
|
border_size = 5
|
|
[minimap]
|
|
id = "minimap"
|
|
definition = "no_size"
|
|
[/minimap]
|
|
)}
|
|
[/column]
|
|
|
|
[column]
|
|
grow_factor = 0
|
|
horizontal_grow = true
|
|
|
|
[grid]
|
|
|
|
[row]
|
|
|
|
[column]
|
|
grow_factor = 1
|
|
border = "all"
|
|
border_size = 3
|
|
horizontal_alignment = "left"
|
|
|
|
[label]
|
|
id = "scenario"
|
|
definition = "default_large"
|
|
[/label]
|
|
[/column]
|
|
[/row]
|
|
|
|
[row]
|
|
|
|
[column]
|
|
grow_factor = 1
|
|
horizontal_grow = true
|
|
border = "left,right"
|
|
border_size = 3
|
|
|
|
[label]
|
|
id = "name"
|
|
definition = "default"
|
|
[/label]
|
|
[/column]
|
|
[/row]
|
|
|
|
[/grid]
|
|
|
|
[/column]
|
|
|
|
[column]
|
|
grow_factor = 1
|
|
border = "all"
|
|
border_size = 5
|
|
horizontal_grow = true
|
|
[label]
|
|
id = "status"
|
|
definition = "default_large"
|
|
text_alignment = "right"
|
|
[/label]
|
|
[/column]
|
|
|
|
[column]
|
|
grow_factor = 0
|
|
border = "all"
|
|
border_size = 5
|
|
horizontal_alignment = "right"
|
|
vertical_grow = true
|
|
|
|
[image]
|
|
id = "game_info"
|
|
definition = "centered"
|
|
label = "icons/icon-info.png"
|
|
[/image]
|
|
[/column]
|
|
|
|
[column]
|
|
horizontal_alignment = "right"
|
|
|
|
[grid]
|
|
|
|
[row]
|
|
|
|
[column]
|
|
grow_factor = 0
|
|
horizontal_grow = true
|
|
border = "all"
|
|
border_size = 5
|
|
|
|
[image]
|
|
id = "needs_password"
|
|
definition = "default"
|
|
label = "misc/key.png"
|
|
tooltip = _ "Requires a password to join"
|
|
[/image]
|
|
[/column]
|
|
|
|
[column]
|
|
grow_factor = 1
|
|
horizontal_alignment = "right"
|
|
border = "top,left,right"
|
|
border_size = 5
|
|
|
|
[button]
|
|
id = "join"
|
|
definition = "default"
|
|
label = _ "Join"
|
|
[/button]
|
|
[/column]
|
|
[/row]
|
|
|
|
[row]
|
|
|
|
[column]
|
|
grow_factor = 0
|
|
horizontal_grow = true
|
|
border = "all"
|
|
border_size = 5
|
|
|
|
[image]
|
|
id = "observer_icon"
|
|
definition = "default"
|
|
label = "misc/eye.png"
|
|
[/image]
|
|
[/column]
|
|
|
|
[column]
|
|
grow_factor = 1
|
|
horizontal_alignment = "right"
|
|
border = "all"
|
|
border_size = 5
|
|
|
|
[button]
|
|
id = "observe"
|
|
definition = "default"
|
|
label = _ "Observe"
|
|
[/button]
|
|
[/column]
|
|
[/row]
|
|
[/grid]
|
|
[/column]
|
|
[/row]
|
|
[/grid]
|
|
[/toggle_panel]
|
|
[/column]
|
|
[/row]
|
|
[/list_definition]
|
|
[/listbox]
|
|
#enddef
|
|
|
|
#define _GUI_PLAYER_TREE_AREA
|
|
[row]
|
|
grow_factor = 0
|
|
|
|
[column]
|
|
border = "top"
|
|
border_size = 5
|
|
horizontal_alignment = "left"
|
|
vertical_grow = true
|
|
|
|
[grid]
|
|
|
|
[row]
|
|
|
|
[column]
|
|
grow_factor = 0
|
|
border = "all"
|
|
border_size = 5
|
|
|
|
[label]
|
|
definition = "default_small"
|
|
label = _ "Sort players:"
|
|
[/label]
|
|
[/column]
|
|
|
|
[column]
|
|
grow_factor = 0
|
|
border = "left,right"
|
|
border_size = 5
|
|
|
|
[toggle_button]
|
|
id = "player_list_sort_relation"
|
|
definition = "icon"
|
|
icon = "lobby/sort-friend-off.png"
|
|
tooltip = _ "Friends first, ignored people last"
|
|
[/toggle_button]
|
|
[/column]
|
|
|
|
[column]
|
|
grow_factor = 0
|
|
border = "left,right"
|
|
border_size = 5
|
|
|
|
[toggle_button]
|
|
id = "player_list_sort_name"
|
|
definition = "icon"
|
|
icon = "lobby/sort-az-off.png"
|
|
tooltip = _ "Alphabetically"
|
|
[/toggle_button]
|
|
[/column]
|
|
|
|
[/row]
|
|
|
|
[/grid]
|
|
|
|
[/column]
|
|
|
|
[/row]
|
|
|
|
[row]
|
|
grow_factor = 1
|
|
|
|
[column]
|
|
border = "all"
|
|
border_size = 5
|
|
vertical_grow = true
|
|
horizontal_grow = true
|
|
|
|
[tree_view]
|
|
id = "player_tree"
|
|
definition = "default"
|
|
|
|
horizontal_scrollbar_mode = "never"
|
|
vertical_scrollbar_mode = "auto"
|
|
|
|
# TODO: use 25?
|
|
#indentation_step_size = 25
|
|
indentation_step_size = 0
|
|
|
|
[node]
|
|
id = "player_group"
|
|
[node_definition]
|
|
|
|
[row]
|
|
|
|
[column]
|
|
grow_factor = 0
|
|
|
|
[toggle_button]
|
|
id = "tree_view_node_toggle"
|
|
definition = "tree_view_node"
|
|
[/toggle_button]
|
|
|
|
[/column]
|
|
|
|
[column]
|
|
grow_factor = 1
|
|
horizontal_grow = true
|
|
border = "top,bottom,right"
|
|
border_size = 5
|
|
|
|
[label]
|
|
id = "tree_view_node_label"
|
|
definition = "default_small"
|
|
label = "group"
|
|
[/label]
|
|
|
|
[/column]
|
|
|
|
[column]
|
|
grow_factor = 0
|
|
horizontal_grow = true
|
|
border = "top,bottom,right"
|
|
border_size = 5
|
|
|
|
[label]
|
|
id = "player_count"
|
|
definition = "default_small"
|
|
label = "group"
|
|
[/label]
|
|
|
|
[/column]
|
|
|
|
[/row]
|
|
|
|
[/node_definition]
|
|
|
|
[/node]
|
|
|
|
[node]
|
|
id = "player"
|
|
[node_definition]
|
|
|
|
return_value_id = "ok"
|
|
[row]
|
|
|
|
[column]
|
|
horizontal_grow = true
|
|
|
|
[toggle_panel]
|
|
id = "tree_view_node_label"
|
|
definition = "default"
|
|
|
|
[grid]
|
|
|
|
[row]
|
|
|
|
[column]
|
|
border = "all"
|
|
border_size = 5
|
|
vertical_alignment = "center"
|
|
|
|
[image]
|
|
id = "icon"
|
|
definition = "default"
|
|
[/image]
|
|
|
|
[/column]
|
|
|
|
[column]
|
|
grow_factor = 1
|
|
horizontal_grow = true
|
|
|
|
border = "all"
|
|
border_size = 5
|
|
|
|
[label]
|
|
id = "name"
|
|
definition = "default"
|
|
[/label]
|
|
|
|
[/column]
|
|
|
|
[/row]
|
|
|
|
[/grid]
|
|
|
|
[/toggle_panel]
|
|
|
|
[/column]
|
|
|
|
[/row]
|
|
|
|
[/node_definition]
|
|
|
|
[/node]
|
|
|
|
[/tree_view]
|
|
|
|
[/column]
|
|
|
|
[/row]
|
|
#enddef
|
|
|
|
#define _GUI_FILTER_AREA
|
|
[grid]
|
|
[row]
|
|
[column]
|
|
grow_factor = 0
|
|
horizontal_grow = true
|
|
border = "all"
|
|
border_size = 5
|
|
|
|
[text_box]
|
|
definition = "default"
|
|
id = "filter_text"
|
|
{FITER_TEXT_BOX_HINT}
|
|
[/text_box]
|
|
[/column]
|
|
|
|
[column]
|
|
grow_factor = 1
|
|
border = "all"
|
|
border_size = 5
|
|
|
|
[toggle_button]
|
|
definition = "default"
|
|
id = "filter_with_friends"
|
|
label = _ "Friends"
|
|
[/toggle_button]
|
|
[/column]
|
|
|
|
[column]
|
|
grow_factor = 1
|
|
border = "all"
|
|
border_size = 5
|
|
|
|
[toggle_button]
|
|
definition = "default"
|
|
id = "filter_without_ignored"
|
|
label = _ "No ignored"
|
|
[/toggle_button]
|
|
[/column]
|
|
|
|
[column]
|
|
grow_factor = 1
|
|
border = "all"
|
|
border_size = 5
|
|
|
|
[toggle_button]
|
|
definition = "default"
|
|
id = "filter_vacant_slots"
|
|
label = _ "Vacant slots"
|
|
[/toggle_button]
|
|
[/column]
|
|
|
|
[column]
|
|
grow_factor = 1
|
|
border = "all"
|
|
border_size = 5
|
|
[toggle_button]
|
|
definition = "default"
|
|
id = "filter_invert"
|
|
label = _ "Invert filter"
|
|
[/toggle_button]
|
|
[/column]
|
|
[/row]
|
|
[/grid]
|
|
#enddef
|
|
|
|
#define _GUI_CONTROL_AREA
|
|
[grid]
|
|
[row]
|
|
[column]
|
|
horizontal_grow = true
|
|
[grid]
|
|
[row]
|
|
[column]
|
|
border = "all"
|
|
border_size = 5
|
|
[button]
|
|
id = "quit"
|
|
definition = "large"
|
|
label = _ "Log Out"
|
|
[/button]
|
|
[/column]
|
|
|
|
[column]
|
|
border = "all"
|
|
border_size = 5
|
|
[button]
|
|
id = "refresh"
|
|
definition = "large"
|
|
label = _ "Refresh"
|
|
[/button]
|
|
[/column]
|
|
[/row]
|
|
|
|
[row]
|
|
|
|
[column]
|
|
border = "all"
|
|
border_size = 5
|
|
[button]
|
|
id = "create"
|
|
definition = "large"
|
|
label = _ "Create Game"
|
|
[/button]
|
|
[/column]
|
|
|
|
[column]
|
|
border = "all"
|
|
border_size = 5
|
|
[button]
|
|
id = "show_preferences"
|
|
definition = "large"
|
|
label = _ "Preferences"
|
|
[/button]
|
|
[/column]
|
|
|
|
[/row]
|
|
|
|
[row]
|
|
[column]
|
|
border = "all"
|
|
border_size = 5
|
|
[button]
|
|
id = "join_global"
|
|
definition = "large"
|
|
label = _ "Join"
|
|
[/button]
|
|
[/column]
|
|
|
|
[column]
|
|
border = "all"
|
|
border_size = 5
|
|
[button]
|
|
id = "observe_global"
|
|
definition = "large"
|
|
label = _ "Observe"
|
|
[/button]
|
|
[/column]
|
|
[/row]
|
|
[/grid]
|
|
[/column]
|
|
[/row]
|
|
|
|
[row]
|
|
[column]
|
|
border = "left,right,top"
|
|
border_size = 5
|
|
horizontal_grow = true
|
|
|
|
[menu_button]
|
|
id = "replay_options"
|
|
definition = "default"
|
|
|
|
[option]
|
|
label = _ "Normal Replays"
|
|
[/option]
|
|
|
|
[option]
|
|
label = _ "Quick Replays"
|
|
tooltip = _ "Skip quickly to the active turn when observing"
|
|
[/option]
|
|
|
|
[option]
|
|
label = _ "Enter Blindfolded"
|
|
tooltip = _ "Do not show the map until given control of a side"
|
|
[/option]
|
|
[/menu_button]
|
|
[/column]
|
|
|
|
[/row]
|
|
|
|
{GUI_HORIZONTAL_SPACER_LINE}
|
|
|
|
{_GUI_PLAYER_TREE_AREA}
|
|
|
|
[/grid]
|
|
#enddef
|
|
|
|
[window]
|
|
id = "mp_lobby"
|
|
description = "Lobby screen."
|
|
|
|
#
|
|
# Low resolution
|
|
#
|
|
[resolution]
|
|
window_height = 600
|
|
definition = "borderless"
|
|
|
|
{GUI_WINDOW_FULLSCREEN}
|
|
|
|
[tooltip]
|
|
id = "tooltip"
|
|
[/tooltip]
|
|
|
|
[helptip]
|
|
id = "tooltip"
|
|
[/helptip]
|
|
|
|
[grid]
|
|
|
|
[row]
|
|
grow_factor = 0
|
|
|
|
[column]
|
|
horizontal_grow = true
|
|
|
|
[grid]
|
|
[row]
|
|
grow_factor = 0
|
|
|
|
[column]
|
|
grow_factor = 1
|
|
horizontal_alignment = "left"
|
|
border = "all"
|
|
border_size = 5
|
|
[label]
|
|
definition = "title"
|
|
label = _ "Multiplayer Lobby"
|
|
[/label]
|
|
[/column]
|
|
|
|
[column]
|
|
grow_factor = 0
|
|
border = "left,right,top"
|
|
horizontal_alignment = "right"
|
|
border_size = 5
|
|
[button]
|
|
id = "refresh"
|
|
definition = "default"
|
|
label = _ "Refresh"
|
|
[/button]
|
|
[/column]
|
|
|
|
[column]
|
|
grow_factor = 0
|
|
horizontal_alignment = "right"
|
|
border = "left,right,top"
|
|
border_size = 5
|
|
[button]
|
|
id = "quit"
|
|
definition = "default"
|
|
label = _ "Log Out"
|
|
[/button]
|
|
[/column]
|
|
[/row]
|
|
[/grid]
|
|
[/column]
|
|
[/row]
|
|
|
|
[row]
|
|
grow_factor = 0
|
|
|
|
[column]
|
|
horizontal_grow = true
|
|
|
|
[grid]
|
|
[row]
|
|
grow_factor = 0
|
|
|
|
[column]
|
|
grow_factor = 0
|
|
border = "all"
|
|
horizontal_alignment = "left"
|
|
border_size = 5
|
|
[button]
|
|
id = "show_preferences"
|
|
definition = "default"
|
|
label = _ "Preferences"
|
|
[/button]
|
|
[/column]
|
|
|
|
[column]
|
|
grow_factor = 0
|
|
border = "all"
|
|
horizontal_alignment = "right"
|
|
border_size = 5
|
|
[button]
|
|
id = "create"
|
|
definition = "default"
|
|
label = _ "Create Game"
|
|
[/button]
|
|
[/column]
|
|
|
|
[column]
|
|
grow_factor = 0
|
|
border = "all"
|
|
horizontal_alignment = "right"
|
|
border_size = 5
|
|
[button]
|
|
id = "join_global"
|
|
definition = "default"
|
|
label = _ "Join"
|
|
[/button]
|
|
[/column]
|
|
|
|
[column]
|
|
grow_factor = 0
|
|
border = "all"
|
|
horizontal_alignment = "right"
|
|
border_size = 5
|
|
[button]
|
|
id = "observe_global"
|
|
definition = "default"
|
|
label = _ "Observe"
|
|
[/button]
|
|
[/column]
|
|
|
|
[column]
|
|
grow_factor = 1
|
|
border = "all"
|
|
border_size = 5
|
|
horizontal_grow = true
|
|
|
|
[menu_button]
|
|
id = "replay_options"
|
|
definition = "default"
|
|
|
|
[option]
|
|
label = _ "Normal Replays"
|
|
[/option]
|
|
|
|
[option]
|
|
label = _ "Quick Replays"
|
|
tooltip = _ "Skip quickly to the active turn when observing"
|
|
[/option]
|
|
|
|
[option]
|
|
label = _ "Enter Blindfolded"
|
|
tooltip = _ "Do not show the map until given control of a side"
|
|
[/option]
|
|
[/menu_button]
|
|
[/column]
|
|
[/row]
|
|
[/grid]
|
|
[/column]
|
|
[/row]
|
|
|
|
[row]
|
|
grow_factor = 0
|
|
|
|
[column]
|
|
horizontal_grow = true
|
|
vertical_grow = true
|
|
border = "all"
|
|
border_size = 5
|
|
|
|
{GUI_FORCE_WIDGET_MINIMUM_SIZE 0 "((screen_height * 35) / 100)" (
|
|
{_GUI_GAME_LIST}
|
|
)}
|
|
[/column]
|
|
[/row]
|
|
|
|
[row]
|
|
grow_factor = 0
|
|
|
|
[column]
|
|
horizontal_grow = true
|
|
|
|
{_GUI_FILTER_AREA}
|
|
[/column]
|
|
[/row]
|
|
|
|
{GUI_HORIZONTAL_SPACER_LINE}
|
|
|
|
[row]
|
|
grow_factor = 1
|
|
|
|
[column]
|
|
horizontal_grow = true
|
|
vertical_grow = true
|
|
|
|
{GUI_FORCE_WIDGET_SIZE 0 "((screen_height * 20) / 100)" (
|
|
[grid]
|
|
[row]
|
|
grow_factor = 1
|
|
|
|
[column]
|
|
grow_factor = 1
|
|
border = "all"
|
|
border_size = 5
|
|
horizontal_grow = true
|
|
vertical_grow = true
|
|
|
|
[chatbox]
|
|
id = "chat"
|
|
[/chatbox]
|
|
[/column]
|
|
|
|
[column]
|
|
grow_factor = 0
|
|
border = "top"
|
|
border_size = 5
|
|
horizontal_grow = true
|
|
vertical_grow = true
|
|
|
|
[grid]
|
|
{_GUI_PLAYER_TREE_AREA}
|
|
[/grid]
|
|
[/column]
|
|
[/row]
|
|
[/grid]
|
|
)}
|
|
[/column]
|
|
[/row]
|
|
[/grid]
|
|
[/resolution]
|
|
|
|
#
|
|
# Default resolution
|
|
#
|
|
[resolution]
|
|
window_height = 660
|
|
definition = "borderless"
|
|
|
|
{GUI_WINDOW_FULLSCREEN}
|
|
|
|
[tooltip]
|
|
id = "tooltip"
|
|
[/tooltip]
|
|
|
|
[helptip]
|
|
id = "tooltip"
|
|
[/helptip]
|
|
|
|
[grid]
|
|
|
|
[row]
|
|
grow_factor = 0
|
|
|
|
[column]
|
|
grow_factor = 1
|
|
horizontal_alignment = "left"
|
|
border = "all"
|
|
border_size = 5
|
|
|
|
[label]
|
|
definition = "title"
|
|
label = _ "Multiplayer Lobby"
|
|
[/label]
|
|
[/column]
|
|
[/row]
|
|
|
|
[row]
|
|
grow_factor = 1
|
|
|
|
[column]
|
|
horizontal_grow = true
|
|
vertical_grow = true
|
|
|
|
[grid]
|
|
|
|
[row]
|
|
|
|
[column]
|
|
grow_factor = 1
|
|
vertical_grow = true
|
|
horizontal_grow = true
|
|
|
|
[grid]
|
|
|
|
[row]
|
|
grow_factor = 0
|
|
[column]
|
|
vertical_grow = true
|
|
horizontal_grow = true
|
|
{_GUI_FILTER_AREA}
|
|
[/column]
|
|
[/row]
|
|
|
|
#{GUI_HORIZONTAL_SPACER_LINE}
|
|
|
|
[row]
|
|
grow_factor = 1
|
|
[column]
|
|
border = "all"
|
|
border_size = 5
|
|
horizontal_grow = true
|
|
vertical_grow = true
|
|
|
|
{_GUI_GAME_LIST}
|
|
[/column]
|
|
[/row]
|
|
|
|
#{GUI_HORIZONTAL_SPACER_LINE}
|
|
|
|
[row]
|
|
grow_factor = 0
|
|
|
|
[column]
|
|
border = "all"
|
|
border_size = 5
|
|
horizontal_grow = true
|
|
vertical_grow = true
|
|
|
|
{GUI_FORCE_WIDGET_SIZE 0 "((screen_height * 28) / 100)" (
|
|
[chatbox]
|
|
id = "chat"
|
|
[/chatbox]
|
|
)}
|
|
[/column]
|
|
[/row]
|
|
[/grid]
|
|
[/column]
|
|
|
|
[column]
|
|
grow_factor = 0
|
|
vertical_grow = true
|
|
|
|
{_GUI_CONTROL_AREA}
|
|
[/column]
|
|
[/row]
|
|
[/grid]
|
|
[/column]
|
|
[/row]
|
|
[/grid]
|
|
[/resolution]
|
|
[/window]
|
|
|
|
#undef _GUI_CONTROL_AREA
|
|
#undef _GUI_FILTER_AREA
|
|
#undef _GUI_GAME_LIST
|
|
#undef _GUI_PLAYER_TREE_AREA
|