Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Preferences: Reimplement orb color options
- Loading branch information
1 parent
d8268c0
commit 38ddbb9
Showing
9 changed files
with
479 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
#textdomain wesnoth-lib | ||
### | ||
### Definition of a selectable orb button. | ||
### | ||
|
||
#define _GUI_ICON SIZE STATE | ||
[image] | ||
x = 0 | ||
y = 0 | ||
w = {SIZE} | ||
h = {SIZE} | ||
name = "('buttons/misc/orb{STATE}.png" + <<~RC(magenta>{icon})')>> | ||
[/image] | ||
#enddef | ||
#define _GUI_RESOLUTION RESOLUTION SIZE | ||
[resolution] | ||
{RESOLUTION} | ||
min_width = {SIZE} | ||
min_height = {SIZE} | ||
default_width = {SIZE} | ||
default_height = {SIZE} | ||
max_width = {SIZE} | ||
max_height = {SIZE} | ||
text_extra_width = 0 | ||
text_font_size = 0 | ||
[state] | ||
[enabled] | ||
[draw] | ||
{_GUI_ICON ({SIZE}) ()} | ||
[/draw] | ||
[/enabled] | ||
[disabled] | ||
[draw] | ||
{_GUI_ICON ({SIZE}) ()} | ||
[/draw] | ||
[/disabled] | ||
[focused] | ||
[draw] | ||
{_GUI_ICON ({SIZE}) (-active)} | ||
[/draw] | ||
[/focused] | ||
[/state] | ||
### | ||
### Selected | ||
### | ||
[state] | ||
[enabled] | ||
[draw] | ||
[image] | ||
x = 0 | ||
y = 0 | ||
w = {SIZE} | ||
h = {SIZE} | ||
name = "buttons/button_square/button_square_30-pressed.png" | ||
[/image] | ||
{_GUI_ICON ({SIZE}) (-pressed)} | ||
[/draw] | ||
[/enabled] | ||
[disabled] | ||
[draw] | ||
[image] | ||
x = 0 | ||
y = 0 | ||
w = {SIZE} | ||
h = {SIZE} | ||
name = "buttons/button_square/button_square_30-pressed.png" | ||
[/image] | ||
{_GUI_ICON ({SIZE}) (-pressed)} | ||
[/draw] | ||
[/disabled] | ||
[focused] | ||
[draw] | ||
[image] | ||
x = 0 | ||
y = 0 | ||
w = {SIZE} | ||
h = {SIZE} | ||
name = "buttons/button_square/button_square_30-active-pressed.png" | ||
[/image] | ||
{_GUI_ICON ({SIZE}) (-active)} | ||
[/draw] | ||
[/focused] | ||
[/state] | ||
[/resolution] | ||
#enddef | ||
[toggle_button_definition] | ||
id = "orb" | ||
description = "This toggle button is meant to be used in the select orbs dialog." | ||
{_GUI_RESOLUTION ({GUI_NORMAL__RESOLUTION}) 30 } | ||
[/toggle_button_definition] | ||
#undef _GUI_RESOLUTION | ||
#undef _GUI_ICON | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
|
||
#define _GUI_ORB_CELL PURPOSE COLOR | ||
[column] | ||
border = "all" | ||
border_size = 5 | ||
[toggle_button] | ||
id = "orb_{PURPOSE}_{COLOR}" | ||
definition = "orb" | ||
icon = "{COLOR}" | ||
[/toggle_button] | ||
[/column] | ||
#enddef | ||
|
||
#define _GUI_ORB_ROW PURPOSE | ||
[grid] | ||
id = "orb_{PURPOSE}_selection" | ||
[row] | ||
{_GUI_ORB_CELL {PURPOSE} brightgreen} | ||
{_GUI_ORB_CELL {PURPOSE} brightorange} | ||
{_GUI_ORB_CELL {PURPOSE} red} | ||
{_GUI_ORB_CELL {PURPOSE} lightblue} | ||
{_GUI_ORB_CELL {PURPOSE} black} | ||
{_GUI_ORB_CELL {PURPOSE} blue} | ||
{_GUI_ORB_CELL {PURPOSE} white} | ||
{_GUI_ORB_CELL {PURPOSE} gold} | ||
{_GUI_ORB_CELL {PURPOSE} darkred} | ||
{_GUI_ORB_CELL {PURPOSE} lightred} | ||
[/row] | ||
[/grid] | ||
#enddef | ||
|
||
#define _GUI_ORB_GROUP PURPOSE LABEL | ||
[row] | ||
[column] | ||
horizontal_alignment = "left" | ||
border = "all" | ||
border_size = 5 | ||
[toggle_button] | ||
id = "orb_{PURPOSE}_show" | ||
definition = "default" | ||
label = {LABEL} | ||
[/toggle_button] | ||
[/column] | ||
[/row] | ||
[row] | ||
[column] | ||
horizontal_alignment = "left" | ||
{_GUI_ORB_ROW {PURPOSE}} | ||
[/column] | ||
[/row] | ||
#enddef | ||
|
||
[window] | ||
id = "select_orb_colors" | ||
description = "Select the colors of orbs displayed on units for various purposes." | ||
|
||
[resolution] | ||
definition = "default" | ||
|
||
click_dismiss = "true" | ||
maximum_width = 600 | ||
maximum_height = 480 | ||
|
||
[tooltip] | ||
id = "tooltip_large" | ||
[/tooltip] | ||
[helptip] | ||
id = "tooltip_large" | ||
[/helptip] | ||
|
||
[grid] | ||
[row] | ||
[column] | ||
border = "all" | ||
border_size = 5 | ||
horizontal_alignment = "left" | ||
[label] | ||
definition = "title" | ||
label = _ "Choose Orb/Minimap Colors" | ||
[/label] | ||
[/column] | ||
[/row] | ||
{_GUI_ORB_GROUP unmoved (_"Show unmoved orb")} | ||
{_GUI_ORB_GROUP partial (_"Show partial moved orb")} | ||
{_GUI_ORB_GROUP moved (_"Show moved orb")} | ||
{_GUI_ORB_GROUP ally (_"Show ally orb")} | ||
{_GUI_ORB_GROUP enemy (_"Show enemy orb")} | ||
[row] | ||
[column] | ||
horizontal_grow = "true" | ||
[grid] | ||
[row] | ||
[column] | ||
horizontal_alignment = "left" | ||
grow_factor = 1 | ||
border = "all" | ||
border_size = 5 | ||
[button] | ||
id = "orb_defaults" | ||
definition = "default" | ||
label = _ "Defaults" | ||
[/button] | ||
[/column] | ||
[column] | ||
horizontal_alignment = "right" | ||
grow_factor = 0 | ||
border = "all" | ||
border_size = 5 | ||
[button] | ||
id = "ok" | ||
definition = "default" | ||
label = _ "OK" | ||
[/button] | ||
[/column] | ||
[column] | ||
horizontal_alignment = "right" | ||
grow_factor = 0 | ||
border = "all" | ||
border_size = 5 | ||
[button] | ||
id = "cancel" | ||
definition = "default" | ||
label = _ "Cancel" | ||
[/button] | ||
[/column] | ||
[/row] | ||
[/grid] | ||
[/column] | ||
[/row] | ||
[/grid] | ||
[/resolution] | ||
[/window] | ||
|
||
#undef _GUI_ORB_GROUP | ||
#undef _GUI_ORB_ROW | ||
#undef _GUI_ORB_CELL |
Oops, something went wrong.