Fix IDE0053

This commit is contained in:
RoosterDragon
2023-03-04 19:21:09 +00:00
committed by Pavel Penev
parent 37afd6094e
commit 939f715e3c
28 changed files with 41 additions and 91 deletions

View File

@@ -68,10 +68,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
var hotkeyValidColor = ChromeMetrics.Get<Color>("HotkeyColor");
var hotkeyInvalidColor = ChromeMetrics.Get<Color>("HotkeyColorInvalid");
remapButton.GetColor = () =>
{
return hd.HasDuplicates ? hotkeyInvalidColor : hotkeyValidColor;
};
remapButton.GetColor = () => hd.HasDuplicates ? hotkeyInvalidColor : hotkeyValidColor;
if (selectedHotkeyDefinition == hd)
{
@@ -253,9 +250,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
hotkeyEntryWidget.IsValid = () => isHotkeyValid;
hotkeyEntryWidget.OnLoseFocus = ValidateHotkey;
hotkeyEntryWidget.OnEscKey = _ =>
{
hotkeyEntryWidget.Key = modData.Hotkeys[selectedHotkeyDefinition.Name].GetValue();
};
hotkeyEntryWidget.IsDisabled = () => selectedHotkeyDefinition.Readonly;
validHotkeyEntryWidth = hotkeyEntryWidget.Bounds.Width;