Skip to content

Commit

Permalink
Merge pull request #603 from CelticMinstrel/prefs_stuff
Browse files Browse the repository at this point in the history
Font scaling and reimplemented orb colors
  • Loading branch information
CelticMinstrel committed Feb 21, 2016
2 parents b0344fe + 6848a6d commit 742d179
Show file tree
Hide file tree
Showing 30 changed files with 657 additions and 133 deletions.
4 changes: 2 additions & 2 deletions data/advanced_preferences.cfg
Expand Up @@ -176,13 +176,13 @@
type=custom
[/advanced_preference]

#ifdef __UNUSED__
[advanced_preference]
field=orb_color
name= _ "Customize orb colors (unimplemented)"
name= _ "Customize orb colors"
type=custom
[/advanced_preference]

#ifdef __UNUSED__
[advanced_preference]
field=joystick_support_enabled
name= _ "Joystick support"
Expand Down
48 changes: 1 addition & 47 deletions data/core/team-colors.cfg
Expand Up @@ -13,28 +13,13 @@
rgb=FF0000,FFFFFF,000000,FF0000
name= _ "Red"
[/color_range]
[color_range]
id=orb_3red
rgb=FF0000,FFFFFF,000000,FF0000
name= _ "Red"
[/color_range]

[color_range]
id=orb_lightred
rgb=D1620D,FFFFFF,000000,FF0000
name= _ "Light Red"
[/color_range]
[color_range]
id=lightred
rgb=D1620D,FFFFFF,000000,FF0000
name= _ "Light Red"
[/color_range]

[color_range]
id=orb_darkred
rgb=8A0808,FFFFFF,000000,FF0000
name= _ "Dark Red"
[/color_range]
[color_range]
id=darkred
rgb=8A0808,FFFFFF,000000,FF0000
Expand All @@ -46,17 +31,7 @@
rgb=2E419B,FFFFFF,0F0F0F,0000FF
name= _ "Blue"
[/color_range]
[color_range]
id=orb_6blue
rgb=2E419B,FFFFFF,0F0F0F,0000FF
name= _ "Blue"
[/color_range]

[color_range]
id=orb_5lightblue
rgb=00A4FF,FFFFFF,000A21,00A4FF
name= _ "Light blue"
[/color_range]
[color_range]
id=lightblue
rgb=00A4FF,FFFFFF,000A21,00A4FF
Expand All @@ -69,11 +44,6 @@
name= _ "Green"
[/color_range]

[color_range]
id=orb_1brightgreen
rgb=8CFF00,EBFFBF,2D4001,8CFF00
name= _ "Bright green"
[/color_range]
[color_range]
id=brightgreen
rgb=8CFF00,EBFFBF,2D4001,8CFF00
Expand All @@ -92,12 +62,6 @@
name= _ "Black"
[/color_range]

[color_range]
id=orb_6black
rgb=5A5A5A,FFFFFF,000000,000000
name= _ "Black"
[/color_range]

[color_range]
id=brown
rgb=945027,FFFFFF,000000,AA4600
Expand All @@ -111,7 +75,7 @@
[/color_range]

[color_range]
id=orb_2brightorange
id=brightorange
rgb=FFC600,FFF7E6,792A00,FFC600
name= _ "Bright orange"
[/color_range]
Expand All @@ -121,11 +85,6 @@
rgb=E1E1E1,FFFFFF,1E1E1E,FFFFFF
name= _ "White"
[/color_range]
[color_range]
id=orb_7white
rgb=E1E1E1,FFFFFF,1E1E1E,FFFFFF
name= _ "White"
[/color_range]

[color_range]
id=teal
Expand All @@ -138,11 +97,6 @@
rgb=FFF35A,FFF8D2,994F13,FFF35A
name= _ "Gold"
[/color_range]
[color_range]
id=orb_8gold
rgb=FFF35A,FFF8D2,994F13,FFF35A
name= _ "Gold"
[/color_range]

# The following team colors are an extended palette meant specifically to recolor the background of terrain type icons
# Each color range is named after the terrain type it corresponds to.
Expand Down
10 changes: 5 additions & 5 deletions data/game_config.cfg
Expand Up @@ -47,11 +47,11 @@
footprint_teleport_exit="footsteps/teleport-out.png"

[colors]
enemy_orb_color="orb_6black"
unmoved_orb_color="orb_1brightgreen"
ally_orb_color="orb_5lightblue"
partial_orb_color="orb_2brightorange"
moved_orb_color="orb_3red"
enemy_orb_color="black"
unmoved_orb_color="brightgreen"
ally_orb_color="lightblue"
partial_orb_color="brightorange"
moved_orb_color="red"
[/colors]

[images]
Expand Down
112 changes: 112 additions & 0 deletions data/gui/default/widget/toggle_button_orb.cfg
@@ -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/misc/orb-pressed-bg.png"
[/image]
{_GUI_ICON ({SIZE}) (-pressed)}
[/draw]
[/enabled]
[disabled]
[draw]
[image]
x = 0
y = 0
w = {SIZE}
h = {SIZE}
name = "buttons/misc/orb-pressed-bg.png"
[/image]
{_GUI_ICON ({SIZE}) (-pressed)}
[/draw]
[/disabled]
[focused]
[draw]
[image]
x = 0
y = 0
w = {SIZE}
h = {SIZE}
name = "buttons/misc/orb-pressed-bg-active.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
14 changes: 14 additions & 0 deletions data/gui/default/window/preferences/02_display.cfg
Expand Up @@ -208,6 +208,20 @@
[/grid]
[/column]
[/row]
{_GUI_PREFERENCES_SPACER_ROW}
[row]
[column]
horizontal_grow = true
{_GUI_PREFERENCES_MAIN_COMPOSITE_SLIDER
scaling_value ( _ "Font scale:")
scaling_slider (
minimum_value,maximum_value=100,200
step_size=5
tooltip= _ "Set the scaling factor of fonts"
)
}
[/column]
[/row]
#enddef

#define _GUI_PREFERENCES_DISPLAY_GRID_2
Expand Down

0 comments on commit 742d179

Please sign in to comment.