diff --git a/OpenRA.Mods.Common/Widgets/ScrollItemWidget.cs b/OpenRA.Mods.Common/Widgets/ScrollItemWidget.cs index 1dc23fc93b..ce0d21f77d 100644 --- a/OpenRA.Mods.Common/Widgets/ScrollItemWidget.cs +++ b/OpenRA.Mods.Common/Widgets/ScrollItemWidget.cs @@ -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 diff --git a/mods/cnc/chrome/dialogs.yaml b/mods/cnc/chrome/dialogs.yaml index dd074c7b23..b5ca16168e 100644 --- a/mods/cnc/chrome/dialogs.yaml +++ b/mods/cnc/chrome/dialogs.yaml @@ -48,7 +48,7 @@ ScrollPanel@FACTION_DROPDOWN_TEMPLATE: Background: panel-black Children: ScrollItem@HEADER: - BaseName: scrollheader + Background: scrollheader Width: PARENT_RIGHT - 27 Height: 13 X: 2 diff --git a/mods/cnc/chrome/ingame.yaml b/mods/cnc/chrome/ingame.yaml index 88244efa31..71d29105b2 100644 --- a/mods/cnc/chrome/ingame.yaml +++ b/mods/cnc/chrome/ingame.yaml @@ -732,7 +732,7 @@ Container@OBSERVER_WIDGETS: Y: 0 Width: 705 Height: 24 - BaseName: scrollitem-nohover + Background: scrollitem-nohover Children: ColorBlock@PLAYER_COLOR: X: 0 @@ -819,7 +819,7 @@ Container@OBSERVER_WIDGETS: Y: 0 Width: 730 Height: 24 - BaseName: scrollitem-nohover + Background: scrollitem-nohover Children: ColorBlock@PLAYER_COLOR: X: 0 @@ -899,7 +899,7 @@ Container@OBSERVER_WIDGETS: Y: 0 Width: 400 Height: 24 - BaseName: scrollitem-nohover + Background: scrollitem-nohover Children: ColorBlock@PLAYER_COLOR: X: 0 @@ -936,7 +936,7 @@ Container@OBSERVER_WIDGETS: Y: 0 Width: 400 Height: 24 - BaseName: scrollitem-nohover + Background: scrollitem-nohover Children: ColorBlock@PLAYER_COLOR: X: 0 @@ -973,7 +973,7 @@ Container@OBSERVER_WIDGETS: Y: 0 Width: 400 Height: 24 - BaseName: scrollitem-nohover + Background: scrollitem-nohover Children: ColorBlock@PLAYER_COLOR: X: 0 @@ -1010,7 +1010,7 @@ Container@OBSERVER_WIDGETS: Y: 0 Width: 730 Height: 24 - BaseName: scrollitem-nohover + Background: scrollitem-nohover Children: ColorBlock@PLAYER_COLOR: X: 0 diff --git a/mods/cnc/chrome/missionbrowser.yaml b/mods/cnc/chrome/missionbrowser.yaml index 303d81fbd1..5953d0185a 100644 --- a/mods/cnc/chrome/missionbrowser.yaml +++ b/mods/cnc/chrome/missionbrowser.yaml @@ -24,7 +24,7 @@ Container@MISSIONBROWSER_PANEL: Height: PARENT_BOTTOM - 30 Children: ScrollItem@HEADER: - BaseName: scrollheader + Background: scrollheader Width: PARENT_RIGHT - 27 Height: 13 X: 2 diff --git a/mods/common/chrome/dropdowns.yaml b/mods/common/chrome/dropdowns.yaml index 4a81624144..39ed403707 100644 --- a/mods/common/chrome/dropdowns.yaml +++ b/mods/common/chrome/dropdowns.yaml @@ -2,7 +2,7 @@ ScrollPanel@LABEL_DROPDOWN_TEMPLATE: Width: DROPDOWN_WIDTH Children: ScrollItem@HEADER: - BaseName: scrollheader + Background: scrollheader Width: PARENT_RIGHT - 27 Height: 13 X: 2 @@ -81,7 +81,7 @@ ScrollPanel@SPECTATOR_DROPDOWN_TEMPLATE: Button: observer-scrollpanel-button Children: ScrollItem@HEADER: - BaseName: observer-scrollheader + Background: observer-scrollheader Width: PARENT_RIGHT - 27 Height: 13 X: 2 @@ -94,7 +94,7 @@ ScrollPanel@SPECTATOR_DROPDOWN_TEMPLATE: Height: 10 Align: Center ScrollItem@TEMPLATE: - BaseName: observer-scrollitem + Background: observer-scrollitem Width: PARENT_RIGHT - 27 Height: 25 X: 2 @@ -124,7 +124,7 @@ ScrollPanel@SPECTATOR_LABEL_DROPDOWN_TEMPLATE: Button: observer-scrollpanel-button Children: ScrollItem@HEADER: - BaseName: observer-scrollitem + Background: observer-scrollitem Width: PARENT_RIGHT - 27 Height: 13 X: 2 @@ -137,7 +137,7 @@ ScrollPanel@SPECTATOR_LABEL_DROPDOWN_TEMPLATE: Height: 10 Align: Center ScrollItem@TEMPLATE: - BaseName: observer-scrollitem + Background: observer-scrollitem Width: PARENT_RIGHT - 27 Height: 25 X: 2 diff --git a/mods/common/chrome/ingame-infostats.yaml b/mods/common/chrome/ingame-infostats.yaml index aff44ed39e..6769210296 100644 --- a/mods/common/chrome/ingame-infostats.yaml +++ b/mods/common/chrome/ingame-infostats.yaml @@ -65,7 +65,7 @@ Container@SKIRMISH_STATS: ItemSpacing: 5 Children: ScrollItem@TEAM_TEMPLATE: - BaseName: scrollheader + Background: scrollheader Width: PARENT_RIGHT - 26 Height: 20 X: 2 diff --git a/mods/common/chrome/ingame-observer.yaml b/mods/common/chrome/ingame-observer.yaml index d9fd3bbe1f..92ca19e699 100644 --- a/mods/common/chrome/ingame-observer.yaml +++ b/mods/common/chrome/ingame-observer.yaml @@ -605,7 +605,7 @@ Container@OBSERVER_WIDGETS: Y: 0 Width: 700 Height: 25 - BaseName: scrollitem-nohover + Background: scrollitem-nohover Children: ColorBlock@PLAYER_COLOR: X: 0 @@ -690,7 +690,7 @@ Container@OBSERVER_WIDGETS: Y: 0 Width: 640 Height: 25 - BaseName: scrollitem-nohover + Background: scrollitem-nohover Children: ColorBlock@PLAYER_COLOR: X: 0 @@ -761,7 +761,7 @@ Container@OBSERVER_WIDGETS: Y: 0 Width: 400 Height: 25 - BaseName: scrollitem-nohover + Background: scrollitem-nohover Children: ColorBlock@PLAYER_COLOR: X: 0 @@ -796,7 +796,7 @@ Container@OBSERVER_WIDGETS: Y: 0 Width: 400 Height: 25 - BaseName: scrollitem-nohover + Background: scrollitem-nohover Children: ColorBlock@PLAYER_COLOR: X: 0 @@ -831,7 +831,7 @@ Container@OBSERVER_WIDGETS: Y: 0 Width: 400 Height: 25 - BaseName: scrollitem-nohover + Background: scrollitem-nohover Children: ColorBlock@PLAYER_COLOR: X: 0 @@ -868,7 +868,7 @@ Container@OBSERVER_WIDGETS: Y: 0 Width: 735 Height: 25 - BaseName: scrollitem-nohover + Background: scrollitem-nohover Children: ColorBlock@PLAYER_COLOR: X: 0 diff --git a/mods/common/chrome/lobby-players.yaml b/mods/common/chrome/lobby-players.yaml index 00e08851fd..caacae59ed 100644 --- a/mods/common/chrome/lobby-players.yaml +++ b/mods/common/chrome/lobby-players.yaml @@ -474,7 +474,7 @@ ScrollPanel@FACTION_DROPDOWN_TEMPLATE: Width: DROPDOWN_WIDTH Children: ScrollItem@HEADER: - BaseName: scrollheader + Background: scrollheader Width: PARENT_RIGHT - 27 Height: 13 X: 2 diff --git a/mods/common/chrome/lobby-servers.yaml b/mods/common/chrome/lobby-servers.yaml index 7ef268c798..7692527fa4 100644 --- a/mods/common/chrome/lobby-servers.yaml +++ b/mods/common/chrome/lobby-servers.yaml @@ -67,7 +67,7 @@ Container@LOBBY_SERVERS_BIN: X: 2 Width: PARENT_RIGHT - 27 Height: 20 - BaseName: scrollheader + Background: scrollheader Visible: false Children: Label@LABEL: diff --git a/mods/common/chrome/multiplayer-browser.yaml b/mods/common/chrome/multiplayer-browser.yaml index f1dd5b4f37..d19d533349 100644 --- a/mods/common/chrome/multiplayer-browser.yaml +++ b/mods/common/chrome/multiplayer-browser.yaml @@ -83,7 +83,7 @@ Background@MULTIPLAYER_PANEL: X: 2 Width: PARENT_RIGHT - 27 Height: 20 - BaseName: scrollheader + Background: scrollheader Visible: false Children: Label@LABEL: diff --git a/mods/common/chrome/multiplayer-browserpanels.yaml b/mods/common/chrome/multiplayer-browserpanels.yaml index 1f8ea1e6c1..9e4edcaa37 100644 --- a/mods/common/chrome/multiplayer-browserpanels.yaml +++ b/mods/common/chrome/multiplayer-browserpanels.yaml @@ -4,7 +4,7 @@ ScrollPanel@MULTIPLAYER_CLIENT_LIST: IgnoreChildMouseOver: true Children: ScrollItem@HEADER: - BaseName: scrollheader + Background: scrollheader Width: PARENT_RIGHT - 27 Height: 13 X: 2 diff --git a/mods/d2k/chrome/ingame-infostats.yaml b/mods/d2k/chrome/ingame-infostats.yaml index 615ea370aa..1043d9bb76 100644 --- a/mods/d2k/chrome/ingame-infostats.yaml +++ b/mods/d2k/chrome/ingame-infostats.yaml @@ -69,7 +69,7 @@ Container@SKIRMISH_STATS: ItemSpacing: 5 Children: ScrollItem@TEAM_TEMPLATE: - BaseName: scrollheader + Background: scrollheader Width: PARENT_RIGHT - 27 Height: 20 X: 2 diff --git a/mods/d2k/chrome/ingame-observer.yaml b/mods/d2k/chrome/ingame-observer.yaml index ab78993e49..22c4f4f192 100644 --- a/mods/d2k/chrome/ingame-observer.yaml +++ b/mods/d2k/chrome/ingame-observer.yaml @@ -625,7 +625,7 @@ Container@OBSERVER_WIDGETS: Y: 0 Width: 700 Height: 25 - BaseName: scrollitem-nohover + Background: scrollitem-nohover Children: ColorBlock@PLAYER_COLOR: X: 0 @@ -710,7 +710,7 @@ Container@OBSERVER_WIDGETS: Y: 0 Width: 640 Height: 25 - BaseName: scrollitem-nohover + Background: scrollitem-nohover Children: ColorBlock@PLAYER_COLOR: X: 0 @@ -781,7 +781,7 @@ Container@OBSERVER_WIDGETS: Y: 0 Width: 400 Height: 25 - BaseName: scrollitem-nohover + Background: scrollitem-nohover Children: ColorBlock@PLAYER_COLOR: X: 0 @@ -817,7 +817,7 @@ Container@OBSERVER_WIDGETS: Y: 0 Width: 400 Height: 25 - BaseName: scrollitem-nohover + Background: scrollitem-nohover Children: ColorBlock@PLAYER_COLOR: X: 0 @@ -853,7 +853,7 @@ Container@OBSERVER_WIDGETS: Y: 0 Width: 400 Height: 25 - BaseName: scrollitem-nohover + Background: scrollitem-nohover Children: ColorBlock@PLAYER_COLOR: X: 0 @@ -891,7 +891,7 @@ Container@OBSERVER_WIDGETS: Y: 0 Width: 735 Height: 25 - BaseName: scrollitem-nohover + Background: scrollitem-nohover Children: ColorBlock@PLAYER_COLOR: X: 0 diff --git a/mods/d2k/chrome/lobby-players.yaml b/mods/d2k/chrome/lobby-players.yaml index 375803a9fe..8e970caa57 100644 --- a/mods/d2k/chrome/lobby-players.yaml +++ b/mods/d2k/chrome/lobby-players.yaml @@ -474,7 +474,7 @@ ScrollPanel@FACTION_DROPDOWN_TEMPLATE: Width: DROPDOWN_WIDTH Children: ScrollItem@HEADER: - BaseName: scrollheader + Background: scrollheader Width: PARENT_RIGHT - 27 Height: 13 X: 2 diff --git a/mods/d2k/chrome/multiplayer-browserpanels.yaml b/mods/d2k/chrome/multiplayer-browserpanels.yaml index b5d8ba7270..d2c9152224 100644 --- a/mods/d2k/chrome/multiplayer-browserpanels.yaml +++ b/mods/d2k/chrome/multiplayer-browserpanels.yaml @@ -4,7 +4,7 @@ ScrollPanel@MULTIPLAYER_CLIENT_LIST: IgnoreChildMouseOver: true Children: ScrollItem@HEADER: - BaseName: scrollheader + Background: scrollheader Width: PARENT_RIGHT - 27 Height: 13 X: 2 diff --git a/mods/ra/chrome/ingame-observer.yaml b/mods/ra/chrome/ingame-observer.yaml index 962fcc5c4e..c995cddb50 100644 --- a/mods/ra/chrome/ingame-observer.yaml +++ b/mods/ra/chrome/ingame-observer.yaml @@ -675,7 +675,7 @@ Container@OBSERVER_WIDGETS: Y: 0 Width: 705 Height: 24 - BaseName: scrollitem-nohover + Background: scrollitem-nohover Children: ColorBlock@PLAYER_COLOR: X: 0 @@ -762,7 +762,7 @@ Container@OBSERVER_WIDGETS: Y: 0 Width: 735 Height: 24 - BaseName: scrollitem-nohover + Background: scrollitem-nohover Children: ColorBlock@PLAYER_COLOR: X: 0 @@ -842,7 +842,7 @@ Container@OBSERVER_WIDGETS: Y: 0 Width: 400 Height: 24 - BaseName: scrollitem-nohover + Background: scrollitem-nohover Children: ColorBlock@PLAYER_COLOR: X: 0 @@ -879,7 +879,7 @@ Container@OBSERVER_WIDGETS: Y: 0 Width: 400 Height: 24 - BaseName: scrollitem-nohover + Background: scrollitem-nohover Children: ColorBlock@PLAYER_COLOR: X: 0 @@ -916,7 +916,7 @@ Container@OBSERVER_WIDGETS: Y: 0 Width: 400 Height: 24 - BaseName: scrollitem-nohover + Background: scrollitem-nohover Children: ColorBlock@PLAYER_COLOR: X: 0 @@ -953,7 +953,7 @@ Container@OBSERVER_WIDGETS: Y: 0 Width: 740 Height: 24 - BaseName: scrollitem-nohover + Background: scrollitem-nohover Children: ColorBlock@PLAYER_COLOR: X: 0 diff --git a/mods/ts/chrome/ingame-observer.yaml b/mods/ts/chrome/ingame-observer.yaml index 8e4c866cf1..cd3c8d8ccd 100644 --- a/mods/ts/chrome/ingame-observer.yaml +++ b/mods/ts/chrome/ingame-observer.yaml @@ -625,7 +625,7 @@ Container@OBSERVER_WIDGETS: Y: 0 Width: 705 Height: 24 - BaseName: scrollitem-nohover + Background: scrollitem-nohover Children: ColorBlock@PLAYER_COLOR: X: 0 @@ -712,7 +712,7 @@ Container@OBSERVER_WIDGETS: Y: 0 Width: 645 Height: 24 - BaseName: scrollitem-nohover + Background: scrollitem-nohover Children: ColorBlock@PLAYER_COLOR: X: 0 @@ -785,7 +785,7 @@ Container@OBSERVER_WIDGETS: Y: 0 Width: 400 Height: 24 - BaseName: scrollitem-nohover + Background: scrollitem-nohover Children: ColorBlock@PLAYER_COLOR: X: 0 @@ -823,7 +823,7 @@ Container@OBSERVER_WIDGETS: Y: 0 Width: 400 Height: 24 - BaseName: scrollitem-nohover + Background: scrollitem-nohover Children: ColorBlock@PLAYER_COLOR: X: 0 @@ -861,7 +861,7 @@ Container@OBSERVER_WIDGETS: Y: 0 Width: 400 Height: 24 - BaseName: scrollitem-nohover + Background: scrollitem-nohover Children: ColorBlock@PLAYER_COLOR: X: 0 @@ -898,7 +898,7 @@ Container@OBSERVER_WIDGETS: Y: 0 Width: 740 Height: 24 - BaseName: scrollitem-nohover + Background: scrollitem-nohover Children: ColorBlock@PLAYER_COLOR: X: 0