diff --git a/OpenRA.Mods.Common/Widgets/ButtonWidget.cs b/OpenRA.Mods.Common/Widgets/ButtonWidget.cs index c23466c294..c41c8aa0a4 100644 --- a/OpenRA.Mods.Common/Widgets/ButtonWidget.cs +++ b/OpenRA.Mods.Common/Widgets/ButtonWidget.cs @@ -11,6 +11,7 @@ using System; using System.Drawing; +using System.Linq; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets @@ -240,7 +241,8 @@ namespace OpenRA.Mods.Common.Widgets var position = GetTextPosition(textSize, rb); - DrawBackground(rb, disabled, Depressed, Ui.MouseOverWidget == this, highlighted); + var hover = Ui.MouseOverWidget == this || Children.Any(c => c == Ui.MouseOverWidget); + DrawBackground(rb, disabled, Depressed, hover, highlighted); if (Contrast) font.DrawTextWithContrast(text, position + stateOffset, disabled ? colordisabled : color, bgDark, bgLight, 2); diff --git a/OpenRA.Mods.Common/Widgets/TextFieldWidget.cs b/OpenRA.Mods.Common/Widgets/TextFieldWidget.cs index e04ccdf27c..f9209fa0d5 100644 --- a/OpenRA.Mods.Common/Widgets/TextFieldWidget.cs +++ b/OpenRA.Mods.Common/Widgets/TextFieldWidget.cs @@ -567,7 +567,7 @@ namespace OpenRA.Mods.Common.Widgets var disabled = IsDisabled(); var state = disabled ? "textfield-disabled" : HasKeyboardFocus ? "textfield-focused" : - Ui.MouseOverWidget == this ? "textfield-hover" : + Ui.MouseOverWidget == this || Children.Any(c => c == Ui.MouseOverWidget) ? "textfield-hover" : "textfield"; WidgetUtils.DrawPanel(state,