Rename ScrollWidget BaseName to Background

To match button
This commit is contained in:
Gustas
2022-09-16 18:39:35 +03:00
committed by Matthias Mailänder
parent 5e6f14c9ee
commit 6b63114aaa
17 changed files with 50 additions and 50 deletions

View File

@@ -17,7 +17,7 @@ namespace OpenRA.Mods.Common.Widgets
{
public class ScrollItemWidget : ButtonWidget
{
public readonly string BaseName = "scrollitem";
public new readonly string Background = "scrollitem";
public readonly bool EnableChildMouseOver = false;
public string ItemKey;
@@ -29,7 +29,7 @@ namespace OpenRA.Mods.Common.Widgets
{
IsVisible = () => false;
VisualHeight = 0;
getPanelCache = WidgetUtils.GetCachedStatefulPanelImages(BaseName);
getPanelCache = WidgetUtils.GetCachedStatefulPanelImages(Background);
}
protected ScrollItemWidget(ScrollItemWidget other)
@@ -38,9 +38,9 @@ namespace OpenRA.Mods.Common.Widgets
IsVisible = () => false;
VisualHeight = 0;
Key = other.Key;
BaseName = other.BaseName;
Background = other.Background;
EnableChildMouseOver = other.EnableChildMouseOver;
getPanelCache = WidgetUtils.GetCachedStatefulPanelImages(BaseName);
getPanelCache = WidgetUtils.GetCachedStatefulPanelImages(Background);
}
public override void Initialize(WidgetArgs args)
@@ -56,7 +56,7 @@ namespace OpenRA.Mods.Common.Widgets
public override void Draw()
{
if (string.IsNullOrEmpty(BaseName))
if (string.IsNullOrEmpty(Background))
return;
// PERF: Only check for ourself or our direct children