Fix hover for ra dropdowns (also scrollpanels)

This commit is contained in:
Paul Chote
2011-05-22 17:45:10 +12:00
parent 325fd509b0
commit 53426030ee
4 changed files with 15 additions and 7 deletions

View File

@@ -15,9 +15,7 @@ using OpenRA.Graphics;
namespace OpenRA.Widgets
{
public class ScrollItemWidget : ButtonWidget
{
public int EnableHover = ChromeMetrics.GetInt("EnableHover");
{
public ScrollItemWidget()
: base()
{
@@ -37,7 +35,7 @@ namespace OpenRA.Widgets
public override void DrawInner()
{
var state = IsSelected() ? "scrollitem-selected" :
EnableHover == 1 && RenderBounds.Contains(Viewport.LastMousePos) ? "scrollitem-hover" :
RenderBounds.Contains(Viewport.LastMousePos) ? "scrollitem-hover" :
null;
if (state != null)