Count direct children of text fields and buttons for mouseover.

This improves polish when mousing over prefix glyphs.
This commit is contained in:
Paul Chote
2018-07-07 15:00:30 +01:00
committed by abcdefg30
parent df20ae1aec
commit f08bfae9a0
2 changed files with 4 additions and 2 deletions

View File

@@ -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,