Count direct children of text fields and buttons for mouseover.
This improves polish when mousing over prefix glyphs.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user