fix #1082; setting a bot's color no longer clobbers saved player color

This commit is contained in:
Chris Forbes
2011-07-28 21:56:10 +12:00
parent 5a9cb18881
commit 8844ea8e2f

View File

@@ -380,17 +380,18 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
void ShowColorDropDown(DropDownButtonWidget color, Session.Client client)
{
Action<ColorRamp> onSelect = c =>
{
if (client.Bot == null)
{
Game.Settings.Player.ColorRamp = c;
Game.Settings.Save();
}
color.RemovePanel();
orderManager.IssueOrder(Order.Command("color {0} {1}".F(client.Index, c)));
};
Action<ColorRamp> onChange = c =>
{
PlayerPalettePreview.Ramp = c;
};
Action<ColorRamp> onChange = c => PlayerPalettePreview.Ramp = c;
var colorChooser = Game.LoadWidget(orderManager.world, "COLOR_CHOOSER", null, new WidgetArgs()
{