GUI2: made new toggle panel selection style a separate definition (needs deployment)
The new style isn't appropriate in every context. This temporarily makes the old style default again.
This commit is contained in:
parent
faaa412dc5
commit
441b0f7691
1 changed files with 146 additions and 74 deletions
|
@ -1,6 +1,6 @@
|
|||
#textdomain wesnoth-lib
|
||||
###
|
||||
### Definition of the default toggle panel.
|
||||
### Definition of toggle panels.
|
||||
###
|
||||
|
||||
#define _GUI_RECT FILL_COLOR
|
||||
|
@ -13,7 +13,108 @@
|
|||
[/rectangle]
|
||||
#enddef
|
||||
|
||||
#define _GUI_TOGGLE_PANEL_SELECTED
|
||||
#define _GUI_TOGGLE_PANEL_DEFINITION_BASE ID DESCRIPTION NON_SELECTED_STATE SELECTED_STATE
|
||||
[toggle_panel_definition]
|
||||
|
||||
id = {ID}
|
||||
description = {DESCRIPTION}
|
||||
|
||||
[resolution]
|
||||
|
||||
# The minimum required height is due to the size required for
|
||||
# {GUI__LISTBOX_SELECTED_CELL}
|
||||
# The issue was found bug #22144
|
||||
# Bug #22046 showed the minimum width should also be set.
|
||||
min_width = 26
|
||||
min_height = 26
|
||||
|
||||
default_width = 0
|
||||
default_height = 0
|
||||
|
||||
max_width = 0
|
||||
max_height = 0
|
||||
|
||||
###
|
||||
### Normal
|
||||
###
|
||||
|
||||
[state]
|
||||
{NON_SELECTED_STATE}
|
||||
[/state]
|
||||
|
||||
###
|
||||
### Selected
|
||||
###
|
||||
|
||||
[state]
|
||||
{SELECTED_STATE}
|
||||
[/state]
|
||||
|
||||
[/resolution]
|
||||
|
||||
[/toggle_panel_definition]
|
||||
#enddef
|
||||
|
||||
{_GUI_TOGGLE_PANEL_DEFINITION_BASE ("default") ("Default panel") (
|
||||
[enabled]
|
||||
|
||||
[draw]
|
||||
{_GUI_RECT ({GUI__BACKGROUND_COLOR_ENABLED}) }
|
||||
[/draw]
|
||||
|
||||
[/enabled]
|
||||
|
||||
[disabled]
|
||||
|
||||
[draw]
|
||||
{_GUI_RECT ({GUI__BACKGROUND_COLOR_DISABLED}) }
|
||||
[/draw]
|
||||
|
||||
[/disabled]
|
||||
|
||||
[focused]
|
||||
|
||||
[draw]
|
||||
|
||||
[image]
|
||||
x = 0
|
||||
y = 0
|
||||
w = "(width)"
|
||||
h = "(height)"
|
||||
name = "dialogs/selection-background.png"
|
||||
[/image]
|
||||
|
||||
[/draw]
|
||||
|
||||
[/focused]
|
||||
) (
|
||||
[enabled]
|
||||
|
||||
[draw]
|
||||
{GUI__LISTBOX_SELECTED_CELL}
|
||||
[/draw]
|
||||
|
||||
[/enabled]
|
||||
|
||||
[disabled]
|
||||
|
||||
[draw]
|
||||
{GUI__LISTBOX_SELECTED_CELL}
|
||||
[/draw]
|
||||
|
||||
[/disabled]
|
||||
|
||||
[focused]
|
||||
|
||||
[draw]
|
||||
{GUI__LISTBOX_SELECTED_CELL}
|
||||
[/draw]
|
||||
|
||||
[/focused]
|
||||
)}
|
||||
|
||||
|
||||
#define _GUI_TOGGLE_PANEL_SELECTED_FANCY
|
||||
{_GUI_RECT ({GUI__BACKGROUND_COLOR_ENABLED}) }
|
||||
|
||||
[image]
|
||||
|
@ -21,7 +122,7 @@
|
|||
y = 0
|
||||
w = "(width)"
|
||||
h = "(height)"
|
||||
name = "dialogs/selection-background.png"
|
||||
name = "dialogs/selection-background-fancy.png"
|
||||
#name = "dialogs/selection2-background.png~ADJUST_ALPHA(abs(255 - (floor(x / width * 255))))"
|
||||
[/image]
|
||||
|
||||
|
@ -44,94 +145,65 @@
|
|||
[/rectangle]
|
||||
#enddef
|
||||
|
||||
[toggle_panel_definition]
|
||||
{_GUI_TOGGLE_PANEL_DEFINITION_BASE ("fancy") ("Fancy panel") (
|
||||
[enabled]
|
||||
|
||||
id = "default"
|
||||
description = "Default panel"
|
||||
[draw]
|
||||
{_GUI_RECT ({GUI__BACKGROUND_COLOR_ENABLED}) }
|
||||
[/draw]
|
||||
|
||||
[resolution]
|
||||
[/enabled]
|
||||
|
||||
# The minimum required height is due to the size required for
|
||||
# {GUI__LISTBOX_SELECTED_CELL}
|
||||
# The issue was found bug #22144
|
||||
# Bug #22046 showed the minimum width should also be set.
|
||||
min_width = 26
|
||||
min_height = 26
|
||||
[disabled]
|
||||
|
||||
default_width = 0
|
||||
default_height = 0
|
||||
[draw]
|
||||
{_GUI_RECT ({GUI__BACKGROUND_COLOR_DISABLED}) }
|
||||
[/draw]
|
||||
|
||||
max_width = 0
|
||||
max_height = 0
|
||||
[/disabled]
|
||||
|
||||
[state]
|
||||
[enabled]
|
||||
[focused]
|
||||
|
||||
[draw]
|
||||
{_GUI_RECT ({GUI__BACKGROUND_COLOR_ENABLED}) }
|
||||
[/draw]
|
||||
[draw]
|
||||
{_GUI_RECT ({GUI__BACKGROUND_COLOR_ENABLED}) }
|
||||
|
||||
[/enabled]
|
||||
[image]
|
||||
x = 0
|
||||
y = 0
|
||||
w = "(width)"
|
||||
h = "(height)"
|
||||
name = "dialogs/selection-background-fancy.png~O(75%)"
|
||||
[/image]
|
||||
|
||||
[disabled]
|
||||
[/draw]
|
||||
|
||||
[draw]
|
||||
{_GUI_RECT ({GUI__BACKGROUND_COLOR_DISABLED}) }
|
||||
[/draw]
|
||||
[/focused]
|
||||
) (
|
||||
[enabled]
|
||||
|
||||
[/disabled]
|
||||
[draw]
|
||||
{_GUI_TOGGLE_PANEL_SELECTED_FANCY}
|
||||
[/draw]
|
||||
|
||||
[focused]
|
||||
[/enabled]
|
||||
|
||||
[draw]
|
||||
{_GUI_RECT ({GUI__BACKGROUND_COLOR_ENABLED}) }
|
||||
[disabled]
|
||||
|
||||
[image]
|
||||
x = 0
|
||||
y = 0
|
||||
w = "(width)"
|
||||
h = "(height)"
|
||||
name = "dialogs/selection-background.png~O(75%)"
|
||||
[/image]
|
||||
[draw]
|
||||
{GUI__LISTBOX_SELECTED_CELL}
|
||||
[/draw]
|
||||
|
||||
[/draw]
|
||||
[/disabled]
|
||||
|
||||
[/focused]
|
||||
[/state]
|
||||
[focused]
|
||||
|
||||
###
|
||||
### Selected
|
||||
###
|
||||
[draw]
|
||||
{_GUI_TOGGLE_PANEL_SELECTED_FANCY}
|
||||
[/draw]
|
||||
|
||||
[state]
|
||||
[enabled]
|
||||
|
||||
[draw]
|
||||
{_GUI_TOGGLE_PANEL_SELECTED}
|
||||
[/draw]
|
||||
|
||||
[/enabled]
|
||||
|
||||
[disabled]
|
||||
|
||||
[draw]
|
||||
{GUI__LISTBOX_SELECTED_CELL}
|
||||
[/draw]
|
||||
|
||||
[/disabled]
|
||||
|
||||
[focused]
|
||||
|
||||
[draw]
|
||||
{_GUI_TOGGLE_PANEL_SELECTED}
|
||||
[/draw]
|
||||
|
||||
[/focused]
|
||||
[/state]
|
||||
|
||||
[/resolution]
|
||||
|
||||
[/toggle_panel_definition]
|
||||
[/focused]
|
||||
)}
|
||||
|
||||
#undef _GUI_RECT
|
||||
#undef _GUI_TOGGLE_PANEL_SELECTED
|
||||
#undef _GUI_TOGGLE_PANEL_SELECTED_FANCY
|
||||
#undef _GUI_TOGGLE_PANEL_DEFINITION_BASE
|
||||
|
|
Loading…
Add table
Reference in a new issue