Decouple color picker palette definitions to their own trait.
This commit is contained in:
@@ -235,11 +235,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
orderManager.IssueOrder(Order.Command($"color {client.Index} {colorManager.Color}"));
|
||||
};
|
||||
|
||||
Action<Color> onChange = c => colorManager.Update(worldRenderer, c);
|
||||
|
||||
var colorChooser = Game.LoadWidget(worldRenderer.World, "COLOR_CHOOSER", null, new WidgetArgs()
|
||||
{
|
||||
{ "onChange", onChange },
|
||||
{ "onChange", (Action<Color>)(c => colorManager.Color = c) },
|
||||
{ "initialColor", client.Color },
|
||||
{ "initialFaction", client.Faction }
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user