wesnoth/data/gui/window/server_info.cfg
Charles Dang 7188781f91 GUI2: made link_aware a per-instance config option rather than per-definition
Back when link awareness was first added (https://github.com/wesnoth/wesnoth/pull/300), this key was added
globally to label definitions alongside link_color. This had the unintended side effect of making *all* labels
link aware, leading to issues such as being able to open a do-you-want-to-open prompt from an instance of the
same ad-infinitum.

This became an active issue after 213453e6cf78371360471ac4d110602aafecd9f3, since now that labels could capture
focus if link_aware was true - which it always was for most labels - labels in toggle panels would always
grab mouse_motion events and no longer allow their parent toggle panels to gain their hovered states. That
appears to be in keeping with the design of GUI2, and a further evaluation of that issue is needed at a later
time. However, the fact remains that almost every single label was marked as link-aware, even when in almost every
case that was not the desired behavior.

This change move the link_aware config option to individual label and scroll_label instances. The following uses
had this explicitly enabled:

- Addon license prompt
- Addon descriptions
- Campaign descriptions
- The Server Info popup
- The chatbox
2020-12-12 03:03:09 +11:00

273 lines
5.7 KiB
INI

#textdomain wesnoth-lib
#define _GUI_HORIZONTAL_TAB ID
[row]
[column]
horizontal_grow = true
vertical_alignment = top
[grid]
[row]
grow_factor = 0
[column]
grow_factor = 0
border = "all"
border_size = 5
horizontal_alignment = "left"
[label]
id = {ID}
definition = "default"
label = ""
use_markup = true
wrap = true
link_aware = true
[/label]
[/column]
[/row]
[/grid]
[/column]
[/row]
#enddef
[window]
id = "server_info"
description = "A window to show announcements and other information in the MP lobby."
[resolution]
definition = "default"
maximum_width = 800
maximum_height = 600
[tooltip]
id = "tooltip"
[/tooltip]
[helptip]
id = "tooltip"
[/helptip]
[linked_group]
id = "tabs"
fixed_width = true
fixed_height = true
[/linked_group]
[grid]
[row]
[column]
border = "all"
border_size = 5
horizontal_alignment = "left"
vertical_alignment = "top"
[label]
id = "asdf"
definition = "title"
label = _ "Server Information"
[/label]
[/column]
[/row]
[row]
[column]
horizontal_alignment = left
vertical_alignment = top
[grid]
[row]
[column]
horizontal_grow = true
vertical_alignment = top
[grid]
[row]
[column]
border = all
border_size = 5
[horizontal_listbox]
id = "tab_bar"
horizontal_scrollbar_mode = "never"
vertical_scrollbar_mode = "never"
[list_definition]
[row]
[column]
[toggle_panel]
linked_group = "tabs"
[grid]
[row]
[column]
border = all
border_size = 5
[spacer][/spacer]
[/column]
[column]
grow_factor = 1
border = all
border_size = 5
[label]
id = "tab_label"
wrap = true
[/label]
[/column]
[column]
border = all
border_size = 5
[spacer][/spacer]
[/column]
[/row]
[/grid]
[/toggle_panel]
[/column]
[/row]
[/list_definition]
[list_data]
[row]
[column]
[widget]
id = "tab_label"
label = _ "Announcements"
[/widget]
[/column]
[/row]
[row]
[column]
[widget]
id = "tab_label"
label = _ "General"
[/widget]
[/column]
[/row]
[/list_data]
[/horizontal_listbox]
[/column]
[/row]
[row]
grow_factor = 1
[column]
grow_factor = 1
horizontal_grow = true
[stacked_widget]
id = tabs_container
[layer]
{_GUI_HORIZONTAL_TAB announcements}
[/layer]
[layer]
{_GUI_HORIZONTAL_TAB server_information}
[/layer]
[/stacked_widget]
[/column]
[/row]
[/grid]
[/column]
[/row]
[/grid]
[/column]
[/row]
[row]
grow_factor = 0
[column]
horizontal_grow = true
[grid]
[row]
grow_factor = 0
[column]
grow_factor = 1
horizontal_alignment = right
border = "all"
border_size = 5
[button]
id = "ok"
definition = "default"
label = _ "Close"
[/button]
[/column]
[/row]
[/grid]
[/column]
[/row]
[/grid]
[/resolution]
[/window]
#undef _GUI_HORIZONTAL_TAB