Merge pull request #3169 from pchote/colorpicker

New Colorpicker with graphical mixer
This commit is contained in:
Matthias Mailänder
2013-04-27 03:12:53 -07:00
20 changed files with 572 additions and 270 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 }
});