From 528198977a9ec44aff2ac629a6fd152a6042c755 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sat, 29 Jun 2013 13:00:43 +1200 Subject: [PATCH] Move color picker remap indices into a chrome metric. --- OpenRA.Mods.RA/Widgets/ColorPreviewManagerWidget.cs | 2 +- mods/cnc/chrome/lobby.yaml | 1 - mods/cnc/chrome/settings.yaml | 1 - mods/cnc/metrics.yaml | 3 ++- mods/d2k/chrome/lobby.yaml | 1 - mods/d2k/metrics.yaml | 1 + mods/ra/chrome/lobby.yaml | 1 - mods/ra/metrics.yaml | 1 + 8 files changed, 5 insertions(+), 6 deletions(-) diff --git a/OpenRA.Mods.RA/Widgets/ColorPreviewManagerWidget.cs b/OpenRA.Mods.RA/Widgets/ColorPreviewManagerWidget.cs index 9097ae2ae8..d1c26ddd1e 100755 --- a/OpenRA.Mods.RA/Widgets/ColorPreviewManagerWidget.cs +++ b/OpenRA.Mods.RA/Widgets/ColorPreviewManagerWidget.cs @@ -21,7 +21,7 @@ namespace OpenRA.Mods.RA.Widgets public class ColorPreviewManagerWidget : Widget { public readonly string Palette = "colorpicker"; - public readonly int[] RemapIndices = {}; + public readonly int[] RemapIndices = ChromeMetrics.Get("ColorPickerRemapIndices"); public readonly float Ramp = 0.05f; public HSLColor Color; diff --git a/mods/cnc/chrome/lobby.yaml b/mods/cnc/chrome/lobby.yaml index ee5a380462..2d54745c34 100644 --- a/mods/cnc/chrome/lobby.yaml +++ b/mods/cnc/chrome/lobby.yaml @@ -6,7 +6,6 @@ Container@SERVER_LOBBY: Height:535 Children: ColorPreviewManager@COLOR_MANAGER: - RemapIndices: 176, 178, 180, 182, 184, 186, 189, 191, 177, 179, 181, 183, 185, 187, 188, 190 Label@SERVER_NAME: Width:740 Y:0-25 diff --git a/mods/cnc/chrome/settings.yaml b/mods/cnc/chrome/settings.yaml index 64c6adda52..6d92e735c1 100644 --- a/mods/cnc/chrome/settings.yaml +++ b/mods/cnc/chrome/settings.yaml @@ -6,7 +6,6 @@ Container@SETTINGS_PANEL: Height:535 Children: ColorPreviewManager@COLOR_MANAGER: - RemapIndices: 176, 178, 180, 182, 184, 186, 189, 191, 177, 179, 181, 183, 185, 187, 188, 190 Label@TITLE: Width:740 Y:0-25 diff --git a/mods/cnc/metrics.yaml b/mods/cnc/metrics.yaml index 8910d7374b..80121ae959 100644 --- a/mods/cnc/metrics.yaml +++ b/mods/cnc/metrics.yaml @@ -3,4 +3,5 @@ Metrics: ButtonDepth: 0 ButtonFont: Bold - CheckboxPressedState: true \ No newline at end of file + CheckboxPressedState: true + ColorPickerRemapIndices: 176, 178, 180, 182, 184, 186, 189, 191, 177, 179, 181, 183, 185, 187, 188, 190 \ No newline at end of file diff --git a/mods/d2k/chrome/lobby.yaml b/mods/d2k/chrome/lobby.yaml index 5e214f4df8..c0ae9c819d 100644 --- a/mods/d2k/chrome/lobby.yaml +++ b/mods/d2k/chrome/lobby.yaml @@ -6,7 +6,6 @@ Background@SERVER_LOBBY: Height:600 Children: ColorPreviewManager@COLOR_MANAGER: - RemapIndices: 255, 254, 253, 252, 251, 250, 249, 248, 247, 246, 245, 244, 243, 242, 241, 240 Label@SERVER_NAME: X:0 Y:17 diff --git a/mods/d2k/metrics.yaml b/mods/d2k/metrics.yaml index f9ebcca321..c88a8055d8 100644 --- a/mods/d2k/metrics.yaml +++ b/mods/d2k/metrics.yaml @@ -4,3 +4,4 @@ Metrics: ButtonDepth: 1 ButtonFont: Regular CheckboxPressedState: false + ColorPickerRemapIndices: 255, 254, 253, 252, 251, 250, 249, 248, 247, 246, 245, 244, 243, 242, 241, 240 diff --git a/mods/ra/chrome/lobby.yaml b/mods/ra/chrome/lobby.yaml index 55688ddc0e..c27de95af0 100644 --- a/mods/ra/chrome/lobby.yaml +++ b/mods/ra/chrome/lobby.yaml @@ -6,7 +6,6 @@ Background@SERVER_LOBBY: Height:600 Children: ColorPreviewManager@COLOR_MANAGER: - RemapIndices: 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95 Label@SERVER_NAME: X:0 Y:17 diff --git a/mods/ra/metrics.yaml b/mods/ra/metrics.yaml index f9ebcca321..e5ae5dd388 100644 --- a/mods/ra/metrics.yaml +++ b/mods/ra/metrics.yaml @@ -4,3 +4,4 @@ Metrics: ButtonDepth: 1 ButtonFont: Regular CheckboxPressedState: false + ColorPickerRemapIndices: 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95