Merge pull request #11693 from obrakmann/player-color-contrast

Add contrast to text drawn in player colors
This commit is contained in:
Paul Chote
2016-09-02 20:24:22 +01:00
committed by GitHub
36 changed files with 259 additions and 46 deletions

View File

@@ -14,6 +14,7 @@ using System.Drawing;
using System.Linq;
using OpenRA.Primitives;
using OpenRA.Support;
using OpenRA.Widgets;
using SharpFont;
namespace OpenRA.Graphics
@@ -93,6 +94,24 @@ namespace OpenRA.Graphics
DrawText(text, location, fg);
}
public void DrawTextWithContrast(string text, float2 location, Color fg, Color bgDark, Color bgLight, int offset)
{
DrawTextWithContrast(text, location, fg, WidgetUtils.GetContrastColor(fg, bgDark, bgLight), offset);
}
public void DrawTextWithShadow(string text, float2 location, Color fg, Color bg, int offset)
{
if (offset != 0)
DrawText(text, location + new float2(offset, offset), bg);
DrawText(text, location, fg);
}
public void DrawTextWithShadow(string text, float2 location, Color fg, Color bgDark, Color bgLight, int offset)
{
DrawTextWithShadow(text, location, fg, WidgetUtils.GetContrastColor(fg, bgDark, bgLight), offset);
}
public int2 Measure(string text)
{
if (string.IsNullOrEmpty(text))

View File

@@ -250,6 +250,12 @@ namespace OpenRA.Widgets
return trimmed;
}
public static Color GetContrastColor(Color fgColor, Color bgDark, Color bgLight)
{
var fg = new HSLColor(fgColor);
return fg.RGB == Color.White || fg.L > 80 ? bgDark : bgLight;
}
}
public class CachedTransform<T, U>

View File

@@ -12,6 +12,7 @@
using System;
using System.Drawing;
using OpenRA.Graphics;
using OpenRA.Widgets;
namespace OpenRA.Mods.Common.Graphics
{
@@ -21,17 +22,27 @@ namespace OpenRA.Mods.Common.Graphics
readonly WPos pos;
readonly int zOffset;
readonly Color color;
readonly Color bgDark;
readonly Color bgLight;
readonly string text;
public TextRenderable(SpriteFont font, WPos pos, int zOffset, Color color, string text)
public TextRenderable(SpriteFont font, WPos pos, int zOffset, Color color, Color bgDark, Color bgLight, string text)
{
this.font = font;
this.pos = pos;
this.zOffset = zOffset;
this.color = color;
this.bgDark = bgDark;
this.bgLight = bgLight;
this.text = text;
}
public TextRenderable(SpriteFont font, WPos pos, int zOffset, Color color, string text)
: this(font, pos, zOffset, color,
ChromeMetrics.Get<Color>("TextContrastColorDark"),
ChromeMetrics.Get<Color>("TextContrastColorLight"),
text) { }
public WPos Pos { get { return pos; } }
public PaletteReference Palette { get { return null; } }
public int ZOffset { get { return zOffset; } }
@@ -47,7 +58,7 @@ namespace OpenRA.Mods.Common.Graphics
{
var screenPos = wr.Viewport.Zoom * (wr.ScreenPosition(pos) - wr.Viewport.TopLeft.ToFloat2()) - 0.5f * font.Measure(text).ToFloat2();
var screenPxPos = new float2((float)Math.Round(screenPos.X), (float)Math.Round(screenPos.Y));
font.DrawTextWithContrast(text, screenPxPos, color, Color.Black, 1);
font.DrawTextWithContrast(text, screenPxPos, color, bgDark, bgLight, 1);
}
public void RenderDebugGeometry(WorldRenderer wr)

View File

@@ -36,13 +36,16 @@ namespace OpenRA.Mods.Common.Widgets
public Color TextColor = ChromeMetrics.Get<Color>("ButtonTextColor");
public Color TextColorDisabled = ChromeMetrics.Get<Color>("ButtonTextColorDisabled");
public bool Contrast = ChromeMetrics.Get<bool>("ButtonTextContrast");
public Color ContrastColor = ChromeMetrics.Get<Color>("ButtonTextContrastColor");
public bool Shadow = ChromeMetrics.Get<bool>("ButtonTextShadow");
public Color ContrastColorDark = ChromeMetrics.Get<Color>("ButtonTextContrastColorDark");
public Color ContrastColorLight = ChromeMetrics.Get<Color>("ButtonTextContrastColorLight");
public bool Disabled = false;
public bool Highlighted = false;
public Func<string> GetText;
public Func<Color> GetColor;
public Func<Color> GetColorDisabled;
public Func<Color> GetContrastColor;
public Func<Color> GetContrastColorDark;
public Func<Color> GetContrastColorLight;
public Func<bool> IsDisabled;
public Func<bool> IsHighlighted;
public Action<MouseInput> OnMouseDown = _ => { };
@@ -67,7 +70,8 @@ namespace OpenRA.Mods.Common.Widgets
GetText = () => Text;
GetColor = () => TextColor;
GetColorDisabled = () => TextColorDisabled;
GetContrastColor = () => ContrastColor;
GetContrastColorDark = () => ContrastColorDark;
GetContrastColorLight = () => ContrastColorLight;
OnMouseUp = _ => OnClick();
OnKeyPress = _ => OnClick();
IsDisabled = () => Disabled;
@@ -88,14 +92,17 @@ namespace OpenRA.Mods.Common.Widgets
TextColor = other.TextColor;
TextColorDisabled = other.TextColorDisabled;
Contrast = other.Contrast;
ContrastColor = other.ContrastColor;
Shadow = other.Shadow;
Depressed = other.Depressed;
Background = other.Background;
VisualHeight = other.VisualHeight;
GetText = other.GetText;
GetColor = other.GetColor;
GetColorDisabled = other.GetColorDisabled;
GetContrastColor = other.GetContrastColor;
ContrastColorDark = other.ContrastColorDark;
ContrastColorLight = other.ContrastColorLight;
GetContrastColorDark = other.GetContrastColorDark;
GetContrastColorLight = other.GetContrastColorLight;
OnMouseDown = other.OnMouseDown;
Disabled = other.Disabled;
IsDisabled = other.IsDisabled;
@@ -213,12 +220,12 @@ namespace OpenRA.Mods.Common.Widgets
var rb = RenderBounds;
var disabled = IsDisabled();
var highlighted = IsHighlighted();
var font = Game.Renderer.Fonts[Font];
var text = GetText();
var color = GetColor();
var colordisabled = GetColorDisabled();
var contrast = GetContrastColor();
var bgDark = GetContrastColorDark();
var bgLight = GetContrastColorLight();
var s = font.Measure(text);
var stateOffset = Depressed ? new int2(VisualHeight, VisualHeight) : new int2(0, 0);
var position = new int2(rb.X + (UsableWidth - s.X) / 2, rb.Y - BaseLine + (Bounds.Height - s.Y) / 2);
@@ -226,7 +233,9 @@ namespace OpenRA.Mods.Common.Widgets
DrawBackground(rb, disabled, Depressed, Ui.MouseOverWidget == this, highlighted);
if (Contrast)
font.DrawTextWithContrast(text, position + stateOffset,
disabled ? colordisabled : color, contrast, 2);
disabled ? colordisabled : color, bgDark, bgLight, 2);
else if (Shadow)
font.DrawTextWithShadow(text, position, color, bgDark, bgLight, 1);
else
font.DrawText(text, position + stateOffset,
disabled ? colordisabled : color);

View File

@@ -21,6 +21,9 @@ namespace OpenRA.Mods.Common.Widgets
{
public readonly int RemoveTime = 0;
public readonly bool UseContrast = false;
public readonly bool UseShadow = false;
public readonly Color BackgroundColorDark = ChromeMetrics.Get<Color>("TextContrastColorDark");
public readonly Color BackgroundColorLight = ChromeMetrics.Get<Color>("TextContrastColorLight");
public string Notification = "";
const int LogLength = 9;
@@ -56,12 +59,24 @@ namespace OpenRA.Mods.Common.Widgets
if (owner != null)
{
font.DrawTextWithContrast(owner, chatpos,
line.Color, Color.Black, UseContrast ? 1 : 0);
if (UseContrast)
font.DrawTextWithContrast(owner, chatpos,
line.Color, BackgroundColorDark, BackgroundColorLight, 1);
else if (UseShadow)
font.DrawTextWithShadow(owner, chatpos,
line.Color, BackgroundColorDark, BackgroundColorLight, 1);
else
font.DrawText(owner, chatpos, line.Color);
}
font.DrawTextWithContrast(text, chatpos + new int2(inset, 0),
Color.White, Color.Black, UseContrast ? 1 : 0);
if (UseContrast)
font.DrawTextWithContrast(text, chatpos + new int2(inset, 0),
Color.White, Color.Black, 1);
else if (UseShadow)
font.DrawTextWithShadow(text, chatpos + new int2(inset, 0),
Color.White, Color.Black, 1);
else
font.DrawText(text, chatpos + new int2(inset, 0), Color.White);
}
Game.Renderer.DisableScissor();

View File

@@ -48,7 +48,8 @@ namespace OpenRA.Mods.Common.Widgets
var font = Game.Renderer.Fonts[Font];
var color = GetColor();
var colordisabled = GetColorDisabled();
var contrast = GetContrastColor();
var bgDark = GetContrastColorDark();
var bgLight = GetContrastColorLight();
var rect = RenderBounds;
var text = GetText();
var textSize = font.Measure(text);
@@ -64,7 +65,7 @@ namespace OpenRA.Mods.Common.Widgets
if (Contrast)
font.DrawTextWithContrast(text, position,
disabled ? colordisabled : color, contrast, 2);
disabled ? colordisabled : color, bgDark, bgLight, 2);
else
font.DrawText(text, position,
disabled ? colordisabled : color);

View File

@@ -27,17 +27,21 @@ namespace OpenRA.Mods.Common.Widgets
public string Font = ChromeMetrics.Get<string>("TextFont");
public Color TextColor = ChromeMetrics.Get<Color>("TextColor");
public bool Contrast = ChromeMetrics.Get<bool>("TextContrast");
public Color ContrastColor = ChromeMetrics.Get<Color>("TextContrastColor");
public bool Shadow = ChromeMetrics.Get<bool>("TextShadow");
public Color ContrastColorDark = ChromeMetrics.Get<Color>("TextContrastColorDark");
public Color ContrastColorLight = ChromeMetrics.Get<Color>("TextContrastColorLight");
public bool WordWrap = false;
public Func<string> GetText;
public Func<Color> GetColor;
public Func<Color> GetContrastColor;
public Func<Color> GetContrastColorDark;
public Func<Color> GetContrastColorLight;
public LabelWidget()
{
GetText = () => Text;
GetColor = () => TextColor;
GetContrastColor = () => ContrastColor;
GetContrastColorDark = () => ContrastColorDark;
GetContrastColorLight = () => ContrastColorLight;
}
protected LabelWidget(LabelWidget other)
@@ -48,11 +52,14 @@ namespace OpenRA.Mods.Common.Widgets
Font = other.Font;
TextColor = other.TextColor;
Contrast = other.Contrast;
ContrastColor = other.ContrastColor;
ContrastColorDark = other.ContrastColorDark;
ContrastColorLight = other.ContrastColorLight;
Shadow = other.Shadow;
WordWrap = other.WordWrap;
GetText = other.GetText;
GetColor = other.GetColor;
GetContrastColor = other.GetContrastColor;
GetContrastColorDark = other.GetContrastColorDark;
GetContrastColorLight = other.GetContrastColorLight;
}
public override void Draw()
@@ -84,9 +91,12 @@ namespace OpenRA.Mods.Common.Widgets
text = WidgetUtils.WrapText(text, Bounds.Width, font);
var color = GetColor();
var contrast = GetContrastColor();
var bgDark = GetContrastColorDark();
var bgLight = GetContrastColorLight();
if (Contrast)
font.DrawTextWithContrast(text, position, color, contrast, 2);
font.DrawTextWithContrast(text, position, color, bgDark, bgLight, 2);
else if (Shadow)
font.DrawTextWithShadow(text, position, color, bgDark, bgLight, 1);
else
font.DrawText(text, position, color);
}

View File

@@ -40,6 +40,8 @@ namespace OpenRA.Mods.Common.Widgets
public bool DisplayFirstYAxisValue = false;
public string LabelFont;
public string AxisFont;
public Color BackgroundColorDark = ChromeMetrics.Get<Color>("TextContrastColorDark");
public Color BackgroundColorLight = ChromeMetrics.Get<Color>("TextContrastColorLight");
public LineGraphWidget()
{
@@ -79,6 +81,8 @@ namespace OpenRA.Mods.Common.Widgets
DisplayFirstYAxisValue = other.DisplayFirstYAxisValue;
LabelFont = other.LabelFont;
AxisFont = other.AxisFont;
BackgroundColorDark = other.BackgroundColorDark;
BackgroundColorLight = other.BackgroundColorLight;
}
public override void Draw()
@@ -131,10 +135,12 @@ namespace OpenRA.Mods.Common.Widgets
}), 1, color);
if (lastPoint != 0f)
tiny.DrawText(GetValueFormat().F(lastPoint), origin + new float2(lastX * xStep, -lastPoint * scale - 2), color);
tiny.DrawTextWithShadow(GetValueFormat().F(lastPoint), origin + new float2(lastX * xStep, -lastPoint * scale - 2),
color, BackgroundColorDark, BackgroundColorLight, 1);
}
tiny.DrawText(key, new float2(rect.Left, rect.Top) + new float2(5, 10 * keyOffset + 3), color);
tiny.DrawTextWithShadow(key, new float2(rect.Left, rect.Top) + new float2(5, 10 * keyOffset + 3),
color, BackgroundColorDark, BackgroundColorLight, 1);
keyOffset++;
}

View File

@@ -29,7 +29,8 @@ namespace OpenRA.Mods.Common.Widgets
readonly int timestep;
readonly IEnumerable<SupportPowerInstance> powers;
Tuple<string, Color, Color>[] texts;
readonly Color bgDark, bgLight;
Pair<string, Color>[] texts;
[ObjectCreator.UseCtor]
public SupportPowerTimerWidget(World world)
@@ -43,6 +44,9 @@ namespace OpenRA.Mods.Common.Widgets
timestep = world.Timestep;
if (world.IsReplay)
timestep = world.WorldActor.Trait<MapOptions>().GameSpeed.Timestep;
bgDark = ChromeMetrics.Get<Color>("TextContrastColorDark");
bgLight = ChromeMetrics.Get<Color>("TextContrastColorLight");
}
public override void Tick()
@@ -66,11 +70,7 @@ namespace OpenRA.Mods.Common.Widgets
var color = !p.Ready || Game.LocalTick % 50 < 25 ? playerColor : Color.White;
var inversedColor = self.Owner.Color;
var inversedL = color == Color.White || inversedColor.L > 128 ? (byte)0 : (byte)255;
inversedColor = new HSLColor(inversedColor.H, 0, inversedL);
return Tuple.Create(text, color, inversedColor.RGB);
return Pair.New(text, color);
}).ToArray();
}
@@ -83,8 +83,8 @@ namespace OpenRA.Mods.Common.Widgets
foreach (var t in texts)
{
var font = Game.Renderer.Fonts[Font];
font.DrawTextWithContrast(t.Item1, new float2(Bounds.Location) + new float2(0, y), t.Item2, t.Item3, 1);
y += (font.Measure(t.Item1).Y + 5) * (int)Order;
font.DrawTextWithShadow(t.First, new float2(Bounds.Location) + new float2(0, y), t.Second, bgDark, bgLight, 1);
y += (font.Measure(t.First).Y + 5) * (int)Order;
}
}

View File

@@ -128,10 +128,12 @@ ScrollPanel@SPECTATOR_DROPDOWN_TEMPLATE:
X: 40
Width: 60
Height: 25
Shadow: True
Label@NOFLAG_LABEL:
X: 5
Width: PARENT_RIGHT
Height: 25
Shadow: True
Background@THREEBUTTON_PROMPT:
X: (WINDOW_RIGHT - WIDTH)/2

View File

@@ -14,7 +14,7 @@ Container@CHAT_PANEL:
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
RemoveTime: 250
UseContrast: yes
UseShadow: True
Container@CHAT_CHROME:
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
@@ -59,9 +59,11 @@ Container@CHAT_PANEL:
Width: 50
Height: 15
VAlign: Top
Shadow: True
Label@TEXT:
X: 12
Width: PARENT_RIGHT - 17
Height: 15
WordWrap: true
VAlign: Top
Shadow: True

View File

@@ -88,6 +88,7 @@ Container@SKIRMISH_STATS:
X: 10
Width: 210
Height: 25
Shadow: True
ClientTooltipRegion@CLIENT_REGION:
TooltipContainer: TOOLTIP_CONTAINER
Template: INGAME_CLIENT_TOOLTIP
@@ -103,8 +104,10 @@ Container@SKIRMISH_STATS:
X: 264
Width: 86
Height: 25
Shadow: True
Label@SCORE:
X: 360
Width: 75
Height: 25
Align: Right
Shadow: True

View File

@@ -308,57 +308,67 @@ Background@INGAME_OBSERVERSTATS_BG:
Width: 160
Height: PARENT_BOTTOM
Font: Bold
Shadow: True
Label@CASH:
X: 215
Y: 0
Width: 80
Height: PARENT_BOTTOM
Shadow: True
Label@EARNED_MIN:
X: 295
Y: 0
Width: 60
Height: PARENT_BOTTOM
Shadow: True
Label@POWER:
X: 395
Y: 0
Width: 80
Height: PARENT_BOTTOM
Shadow: True
Label@KILLS:
X: 455
Y: 0
Width: 60
Height: PARENT_BOTTOM
Align: Right
Shadow: True
Label@DEATHS:
X: 515
Y: 0
Width: 60
Height: PARENT_BOTTOM
Align: Right
Shadow: True
Label@ASSETS_DESTROYED:
X: 575
Y: 0
Width: 80
Height: PARENT_BOTTOM
Align: Right
Shadow: True
Label@ASSETS_LOST:
X: 655
Y: 0
Width: 80
Height: PARENT_BOTTOM
Align: Right
Shadow: True
Label@EXPERIENCE:
X: 735
Y: 0
Width: 95
Height: PARENT_BOTTOM
Align: Right
Shadow: True
Label@ACTIONS_MIN:
X: 830
Y: 0
Width: 90
Height: PARENT_BOTTOM
Align: Right
Shadow: True
ScrollItem@ECONOMY_PLAYER_TEMPLATE:
X: 0
Y: 0
@@ -378,42 +388,50 @@ Background@INGAME_OBSERVERSTATS_BG:
Width: 160
Height: PARENT_BOTTOM
Font: Bold
Shadow: True
Label@CASH:
X: 215
Y: 0
Width: 80
Height: PARENT_BOTTOM
Shadow: True
Label@EARNED_MIN:
X: 295
Y: 0
Width: 60
Height: PARENT_BOTTOM
Shadow: True
Label@EARNED_THIS_MIN:
X: 395
Y: 0
Width: 60
Height: PARENT_BOTTOM
Shadow: True
Label@ASSETS:
X: 535
Y: 0
Width: 60
Height: PARENT_BOTTOM
Shadow: True
Label@EARNED:
X: 615
Y: 0
Width: 60
Height: PARENT_BOTTOM
Shadow: True
Label@SPENT:
X: 695
Y: 0
Width: 60
Height: PARENT_BOTTOM
Shadow: True
Label@HARVESTERS:
X: 775
Y: 0
Width: 60
Height: PARENT_BOTTOM
Align: Right
Shadow: True
ScrollItem@PRODUCTION_PLAYER_TEMPLATE:
X: 0
Y: 0
@@ -433,6 +451,7 @@ Background@INGAME_OBSERVERSTATS_BG:
Width: 160
Height: PARENT_BOTTOM
Font: Bold
Shadow: True
ObserverProductionIcons@PRODUCTION_ICONS:
X: 215
Y: 0
@@ -462,40 +481,47 @@ Background@INGAME_OBSERVERSTATS_BG:
Width: 160
Height: PARENT_BOTTOM
Font: Bold
Shadow: True
Label@ASSETS_DESTROYED:
X: 215
Y: 0
Width: 60
Height: PARENT_BOTTOM
Shadow: True
Label@ASSETS_LOST:
X: 295
Y: 0
Width: 60
Height: PARENT_BOTTOM
Shadow: True
Label@UNITS_KILLED:
X: 395
Y: 0
Width: 40
Height: PARENT_BOTTOM
Align: Right
Shadow: True
Label@UNITS_DEAD:
X: 495
Y: 0
Width: 40
Height: PARENT_BOTTOM
Align: Right
Shadow: True
Label@BUILDINGS_KILLED:
X: 615
Y: 0
Width: 40
Height: PARENT_BOTTOM
Align: Right
Shadow: True
Label@BUILDINGS_DEAD:
X: 715
Y: 0
Width: 40
Height: PARENT_BOTTOM
Align: Right
Shadow: True
Container@EARNED_THIS_MIN_GRAPH_TEMPLATE:
X: 10
Y: 10

View File

@@ -220,10 +220,12 @@ Container@OBSERVER_WIDGETS:
X: 40
Width: 60
Height: 25
Shadow: True
Label@NOFLAG_LABEL:
X: 5
Width: PARENT_RIGHT
Height: 25
Shadow: True
Container@PLAYER_WIDGETS:
Children:

View File

@@ -92,17 +92,20 @@ Container@SERVER_LOBBY:
Width: 50
Height: 15
VAlign: Top
Shadow: True
Label@NAME:
X: 45
Width: 50
Height: 15
VAlign: Top
Shadow: True
Label@TEXT:
X: 55
Width: PARENT_RIGHT - 60
Height: 15
WordWrap: true
VAlign: Top
Shadow: True
TextField@CHAT_TEXTFIELD:
X: 200
Y: PARENT_BOTTOM - HEIGHT

View File

@@ -275,6 +275,7 @@ Container@REPLAYBROWSER_PANEL:
X: 40
Width: PARENT_RIGHT-50
Height: 25
Shadow: True
Label@NOFLAG_LABEL:
X: 5
Width: PARENT_RIGHT

View File

@@ -49,6 +49,7 @@ Background@WORLD_TOOLTIP:
Y: 19
Height: 23
Font: Bold
Shadow: True
Label@EXTRA:
X: 5
Y: 47

View File

@@ -6,7 +6,9 @@ Metrics:
ButtonTextColor: FFFFFF
ButtonTextColorDisabled: 808080
ButtonTextContrast: false
ButtonTextContrastColor: 000000
ButtonTextShadow: false
ButtonTextContrastColorDark: 000000
ButtonTextContrastColorLight: 7F7F7F
ButtonBaseLine: 0
CheckboxPressedState: true
HotkeyFont: Regular
@@ -19,6 +21,8 @@ Metrics:
TextFont: Regular
TextColor: FFFFFF
TextContrast: false
TextContrastColor: 000000
TextShadow: false
TextContrastColorDark: 000000
TextContrastColorLight: 7F7F7F
ColorPickerRemapIndices: 176, 178, 180, 182, 184, 186, 189, 191, 177, 179, 181, 183, 185, 187, 188, 190
ColorPickerActorType: ^fact.colorpicker

View File

@@ -90,10 +90,12 @@ ScrollPanel@SPECTATOR_DROPDOWN_TEMPLATE:
X: 34
Width: 60
Height: 25
Shadow: True
Label@NOFLAG_LABEL:
X: 5
Width: PARENT_RIGHT
Height: 25
Shadow: True
ScrollPanel@NEWS_PANEL:
Width: 400

View File

@@ -89,6 +89,7 @@ Container@SKIRMISH_STATS:
X: 10
Width: 210
Height: 25
Shadow: True
ClientTooltipRegion@CLIENT_REGION:
TooltipContainer: TOOLTIP_CONTAINER
Template: INGAME_CLIENT_TOOLTIP
@@ -104,8 +105,10 @@ Container@SKIRMISH_STATS:
X: 264
Width: 86
Height: 25
Shadow: True
Label@SCORE:
X: 360
Width: 75
Height: 25
Align: Right
Shadow: True

View File

@@ -73,10 +73,12 @@ Container@OBSERVER_WIDGETS:
X: 34
Width: 60
Height: 25
Shadow: True
Label@NOFLAG_LABEL:
X: 5
Width: PARENT_RIGHT
Height: 25
Shadow: True
Container@REPLAY_PLAYER:
Logic: ReplayControlBarLogic
Y: 39

View File

@@ -52,6 +52,7 @@ Background@WORLD_TOOLTIP:
Y: 25
Height: 23
Font: Bold
Shadow: True
Label@EXTRA:
X: 7
Y: 57

View File

@@ -5,7 +5,9 @@ Metrics:
ButtonTextColor: FFFFFF
ButtonTextColorDisabled: 808080
ButtonTextContrast: false
ButtonTextContrastColor: 000000
ButtonTextShadow: false
ButtonTextContrastColorDark: 000000
ButtonTextContrastColorLight: 7F7F7F
ButtonBaseLine: 0
CheckboxPressedState: false
HotkeyFont: Regular
@@ -18,6 +20,8 @@ Metrics:
TextFont: Regular
TextColor: FFFFFF
TextContrast: false
TextContrastColor: 000000
TextShadow: false
TextContrastColorDark: 000000
TextContrastColorLight: 7F7F7F
ColorPickerRemapIndices: 255, 254, 253, 252, 251, 250, 249, 248, 247, 246, 245, 244, 243, 242, 241, 240
ColorPickerActorType: ^carryall.colorpicker

View File

@@ -6,7 +6,9 @@ Metrics:
ButtonTextColor: FFFFFF
ButtonTextColorDisabled: 808080
ButtonTextContrast: false
ButtonTextContrastColor: 000000
ButtonTextShadow: false
ButtonTextContrastColorDark: 000000
ButtonTextContrastColorLight: 7F7F7F
ButtonBaseLine: 2
CheckboxPressedState: true
HotkeyFont: Regular
@@ -19,5 +21,7 @@ Metrics:
TextFont: Regular
TextColor: FFFFFF
TextContrast: false
TextContrastColor: 000000
ColorPickerRemapIndices: 176, 178, 180, 182, 184, 186, 189, 191, 177, 179, 181, 183, 185, 187, 188, 190
TextShadow: false
TextContrastColorDark: 000000
TextContrastColorLight: 7F7F7F
ColorPickerRemapIndices: 176, 178, 180, 182, 184, 186, 189, 191, 177, 179, 181, 183, 185, 187, 188, 190

View File

@@ -93,10 +93,12 @@ ScrollPanel@SPECTATOR_DROPDOWN_TEMPLATE:
X: 40
Width: 60
Height: 25
Shadow: True
Label@NOFLAG_LABEL:
X: 5
Width: PARENT_RIGHT
Height: 25
Shadow: True
ScrollPanel@NEWS_PANEL:
Width: 400

View File

@@ -14,7 +14,7 @@ Container@CHAT_PANEL:
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
RemoveTime: 250
UseContrast: yes
UseShadow: True
Container@CHAT_CHROME:
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
@@ -55,9 +55,11 @@ Container@CHAT_PANEL:
Width: 50
Height: 15
VAlign: Top
Shadow: True
Label@TEXT:
X: 12
Width: PARENT_RIGHT - 17
Height: 15
WordWrap: true
VAlign: Top
Shadow: True

View File

@@ -89,6 +89,7 @@ Container@SKIRMISH_STATS:
X: 10
Width: 210
Height: 25
Shadow: True
ClientTooltipRegion@CLIENT_REGION:
TooltipContainer: TOOLTIP_CONTAINER
Template: INGAME_CLIENT_TOOLTIP
@@ -104,8 +105,10 @@ Container@SKIRMISH_STATS:
X: 264
Width: 86
Height: 25
Shadow: True
Label@SCORE:
X: 360
Width: 75
Height: 25
Align: Right
Shadow: True

View File

@@ -101,10 +101,12 @@ Container@OBSERVER_WIDGETS:
X: 40
Width: 60
Height: 25
Shadow: True
Label@NOFLAG_LABEL:
X: 5
Width: PARENT_RIGHT
Height: 25
Shadow: True
Image@SIDEBAR_BACKGROUND_BOTTOM:
X: WINDOW_RIGHT - 250
Y: 297

View File

@@ -308,57 +308,67 @@ Background@INGAME_OBSERVERSTATS_BG:
Width: 160
Height: PARENT_BOTTOM
Font: Bold
Shadow: True
Label@CASH:
X: 215
Y: 0
Width: 80
Height: PARENT_BOTTOM
Shadow: True
Label@EARNED_MIN:
X: 295
Y: 0
Width: 60
Height: PARENT_BOTTOM
Shadow: True
Label@POWER:
X: 395
Y: 0
Width: 80
Height: PARENT_BOTTOM
Shadow: True
Label@KILLS:
X: 455
Y: 0
Width: 60
Height: PARENT_BOTTOM
Align: Right
Shadow: True
Label@DEATHS:
X: 515
Y: 0
Width: 60
Height: PARENT_BOTTOM
Align: Right
Shadow: True
Label@ASSETS_DESTROYED:
X: 575
Y: 0
Width: 80
Height: PARENT_BOTTOM
Align: Right
Shadow: True
Label@ASSETS_LOST:
X: 655
Y: 0
Width: 80
Height: PARENT_BOTTOM
Align: Right
Shadow: True
Label@EXPERIENCE:
X: 735
Y: 0
Width: 95
Height: PARENT_BOTTOM
Align: Right
Shadow: True
Label@ACTIONS_MIN:
X: 830
Y: 0
Width: 90
Height: PARENT_BOTTOM
Align: Right
Shadow: True
ScrollItem@ECONOMY_PLAYER_TEMPLATE:
X: 0
Y: 0
@@ -378,42 +388,50 @@ Background@INGAME_OBSERVERSTATS_BG:
Width: 160
Height: PARENT_BOTTOM
Font: Bold
Shadow: True
Label@CASH:
X: 215
Y: 0
Width: 80
Height: PARENT_BOTTOM
Shadow: True
Label@EARNED_MIN:
X: 295
Y: 0
Width: 60
Height: PARENT_BOTTOM
Shadow: True
Label@EARNED_THIS_MIN:
X: 395
Y: 0
Width: 60
Height: PARENT_BOTTOM
Shadow: True
Label@ASSETS:
X: 535
Y: 0
Width: 60
Height: PARENT_BOTTOM
Shadow: True
Label@EARNED:
X: 615
Y: 0
Width: 60
Height: PARENT_BOTTOM
Shadow: True
Label@SPENT:
X: 695
Y: 0
Width: 60
Height: PARENT_BOTTOM
Shadow: True
Label@HARVESTERS:
X: 775
Y: 0
Width: 60
Height: PARENT_BOTTOM
Align: Right
Shadow: True
ScrollItem@PRODUCTION_PLAYER_TEMPLATE:
X: 0
Y: 0
@@ -433,6 +451,7 @@ Background@INGAME_OBSERVERSTATS_BG:
Width: 160
Height: PARENT_BOTTOM
Font: Bold
Shadow: True
ObserverProductionIcons@PRODUCTION_ICONS:
X: 215
Y: 0
@@ -462,40 +481,47 @@ Background@INGAME_OBSERVERSTATS_BG:
Width: 160
Height: PARENT_BOTTOM
Font: Bold
Shadow: True
Label@ASSETS_DESTROYED:
X: 215
Y: 0
Width: 60
Height: PARENT_BOTTOM
Shadow: True
Label@ASSETS_LOST:
X: 295
Y: 0
Width: 60
Height: PARENT_BOTTOM
Shadow: True
Label@UNITS_KILLED:
X: 395
Y: 0
Width: 40
Height: PARENT_BOTTOM
Align: Right
Shadow: True
Label@UNITS_DEAD:
X: 495
Y: 0
Width: 40
Height: PARENT_BOTTOM
Align: Right
Shadow: True
Label@BUILDINGS_KILLED:
X: 615
Y: 0
Width: 40
Height: PARENT_BOTTOM
Align: Right
Shadow: True
Label@BUILDINGS_DEAD:
X: 715
Y: 0
Width: 40
Height: PARENT_BOTTOM
Align: Right
Shadow: True
Container@EARNED_THIS_MIN_GRAPH_TEMPLATE:
X: 0
Y: 0

View File

@@ -93,17 +93,20 @@ Background@SERVER_LOBBY:
Width: 50
Height: 15
VAlign: Top
Shadow: True
Label@NAME:
X: 45
Width: 50
Height: 15
VAlign: Top
Shadow: True
Label@TEXT:
X: 55
Width: PARENT_RIGHT - 60
Height: 15
WordWrap: true
VAlign: Top
Shadow: True
TextField@CHAT_TEXTFIELD:
X: 205
Y: PARENT_BOTTOM - HEIGHT

View File

@@ -264,6 +264,7 @@ Background@REPLAYBROWSER_PANEL:
X: 40
Width: PARENT_RIGHT-50
Height: 25
Shadow: True
Label@NOFLAG_LABEL:
X: 5
Width: PARENT_RIGHT

View File

@@ -52,6 +52,7 @@ Background@WORLD_TOOLTIP:
Y: 22
Height: 23
Font: Bold
Shadow: True
Label@EXTRA:
X: 7
Y: 50

View File

@@ -6,7 +6,9 @@ Metrics:
ButtonTextColor: FFFFFF
ButtonTextColorDisabled: 808080
ButtonTextContrast: false
ButtonTextContrastColor: 000000
ButtonTextShadow: false
ButtonTextContrastColorDark: 000000
ButtonTextContrastColorLight: 7F7F7F
ButtonBaseLine: 0
CheckboxPressedState: false
HotkeyFont: Regular
@@ -19,7 +21,9 @@ Metrics:
TextFont: Regular
TextColor: FFFFFF
TextContrast: false
TextContrastColor: 000000
TextShadow: false
TextContrastColorDark: 000000
TextContrastColorLight: 7F7F7F
ColorPickerRemapIndices: 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95
ColorPickerActorType: ^fact.colorpicker
FactionSuffix-allies: allies

View File

@@ -90,10 +90,12 @@ ScrollPanel@SPECTATOR_DROPDOWN_TEMPLATE:
X: 40
Width: 60
Height: 25
Shadow: True
Label@NOFLAG_LABEL:
X: 5
Width: PARENT_RIGHT
Height: 25
Shadow: True
ScrollPanel@NEWS_PANEL:
Width: 400

View File

@@ -308,57 +308,67 @@ Background@INGAME_OBSERVERSTATS_BG:
Width: 160
Height: PARENT_BOTTOM
Font: Bold
Shadow: True
Label@CASH:
X: 215
Y: 0
Width: 80
Height: PARENT_BOTTOM
Shadow: True
Label@EARNED_MIN:
X: 295
Y: 0
Width: 60
Height: PARENT_BOTTOM
Shadow: True
Label@POWER:
X: 395
Y: 0
Width: 80
Height: PARENT_BOTTOM
Shadow: True
Label@KILLS:
X: 455
Y: 0
Width: 60
Height: PARENT_BOTTOM
Align: Right
Shadow: True
Label@DEATHS:
X: 515
Y: 0
Width: 60
Height: PARENT_BOTTOM
Align: Right
Shadow: True
Label@ASSETS_DESTROYED:
X: 575
Y: 0
Width: 80
Height: PARENT_BOTTOM
Align: Right
Shadow: True
Label@ASSETS_LOST:
X: 655
Y: 0
Width: 80
Height: PARENT_BOTTOM
Align: Right
Shadow: True
Label@EXPERIENCE:
X: 735
Y: 0
Width: 95
Height: PARENT_BOTTOM
Align: Right
Shadow: True
Label@ACTIONS_MIN:
X: 830
Y: 0
Width: 90
Height: PARENT_BOTTOM
Align: Right
Shadow: True
ScrollItem@ECONOMY_PLAYER_TEMPLATE:
X: 0
Y: 0
@@ -378,42 +388,50 @@ Background@INGAME_OBSERVERSTATS_BG:
Width: 160
Height: PARENT_BOTTOM
Font: Bold
Shadow: True
Label@CASH:
X: 215
Y: 0
Width: 80
Height: PARENT_BOTTOM
Shadow: True
Label@EARNED_MIN:
X: 295
Y: 0
Width: 60
Height: PARENT_BOTTOM
Shadow: True
Label@EARNED_THIS_MIN:
X: 395
Y: 0
Width: 60
Height: PARENT_BOTTOM
Shadow: True
Label@ASSETS:
X: 535
Y: 0
Width: 60
Height: PARENT_BOTTOM
Shadow: True
Label@EARNED:
X: 615
Y: 0
Width: 60
Height: PARENT_BOTTOM
Shadow: True
Label@SPENT:
X: 695
Y: 0
Width: 60
Height: PARENT_BOTTOM
Shadow: True
Label@HARVESTERS:
X: 775
Y: 0
Width: 60
Height: PARENT_BOTTOM
Align: Right
Shadow: True
ScrollItem@PRODUCTION_PLAYER_TEMPLATE:
X: 0
Y: 0
@@ -433,6 +451,7 @@ Background@INGAME_OBSERVERSTATS_BG:
Width: 160
Height: PARENT_BOTTOM
Font: Bold
Shadow: True
ObserverProductionIcons@PRODUCTION_ICONS:
X: 215
Y: 0
@@ -464,40 +483,47 @@ Background@INGAME_OBSERVERSTATS_BG:
Width: 160
Height: PARENT_BOTTOM
Font: Bold
Shadow: True
Label@ASSETS_DESTROYED:
X: 215
Y: 0
Width: 60
Height: PARENT_BOTTOM
Shadow: True
Label@ASSETS_LOST:
X: 295
Y: 0
Width: 60
Height: PARENT_BOTTOM
Shadow: True
Label@UNITS_KILLED:
X: 395
Y: 0
Width: 40
Height: PARENT_BOTTOM
Align: Right
Shadow: True
Label@UNITS_DEAD:
X: 495
Y: 0
Width: 40
Height: PARENT_BOTTOM
Align: Right
Shadow: True
Label@BUILDINGS_KILLED:
X: 615
Y: 0
Width: 40
Height: PARENT_BOTTOM
Align: Right
Shadow: True
Label@BUILDINGS_DEAD:
X: 715
Y: 0
Width: 40
Height: PARENT_BOTTOM
Align: Right
Shadow: True
Container@EARNED_THIS_MIN_GRAPH_TEMPLATE:
X: 0
Y: 0

View File

@@ -5,7 +5,9 @@ Metrics:
ButtonTextColor: FFFFFF
ButtonTextColorDisabled: 808080
ButtonTextContrast: false
ButtonTextContrastColor: 000000
ButtonTextShadow: false
ButtonTextContrastColorDark: 000000
ButtonTextContrastColorLight: 7F7F7F
ButtonBaseLine: 0
CheckboxPressedState: false
HotkeyFont: Regular
@@ -18,6 +20,8 @@ Metrics:
TextFont: Regular
TextColor: FFFFFF
TextContrast: false
TextContrastColor: 000000
TextShadow: false
TextContrastColorDark: 000000
TextContrastColorLight: 7F7F7F
ColorPickerRemapIndices: 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31
ColorPickerActorType: ^mmch.colorpicker