Implement the new color picker.

This commit is contained in:
Paul Chote
2013-04-27 01:28:35 +12:00
parent e240b9ca3d
commit 70f705bdc7
13 changed files with 162 additions and 235 deletions

View File

@@ -155,12 +155,12 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
bool ShowColorPicker(DropDownButtonWidget color, PlayerSettings s)
{
Action<ColorRamp> onSelect = c => {s.ColorRamp = c; color.RemovePanel();};
Action<ColorRamp> onExit = c => {s.ColorRamp = c; color.RemovePanel();};
Action<ColorRamp> onChange = c => {colorPreview.Ramp = c;};
var colorChooser = Game.LoadWidget(world, "COLOR_CHOOSER", null, new WidgetArgs()
{
{ "onSelect", onSelect },
{ "onExit", onExit },
{ "onChange", onChange },
{ "initialRamp", s.ColorRamp }
});