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

View File

@@ -48,7 +48,7 @@ ScrollPanel@FACTION_DROPDOWN_TEMPLATE:
Background: panel-black Background: panel-black
Children: Children:
ScrollItem@HEADER: ScrollItem@HEADER:
BaseName: scrollheader Background: scrollheader
Width: PARENT_RIGHT - 27 Width: PARENT_RIGHT - 27
Height: 13 Height: 13
X: 2 X: 2

View File

@@ -732,7 +732,7 @@ Container@OBSERVER_WIDGETS:
Y: 0 Y: 0
Width: 705 Width: 705
Height: 24 Height: 24
BaseName: scrollitem-nohover Background: scrollitem-nohover
Children: Children:
ColorBlock@PLAYER_COLOR: ColorBlock@PLAYER_COLOR:
X: 0 X: 0
@@ -819,7 +819,7 @@ Container@OBSERVER_WIDGETS:
Y: 0 Y: 0
Width: 730 Width: 730
Height: 24 Height: 24
BaseName: scrollitem-nohover Background: scrollitem-nohover
Children: Children:
ColorBlock@PLAYER_COLOR: ColorBlock@PLAYER_COLOR:
X: 0 X: 0
@@ -899,7 +899,7 @@ Container@OBSERVER_WIDGETS:
Y: 0 Y: 0
Width: 400 Width: 400
Height: 24 Height: 24
BaseName: scrollitem-nohover Background: scrollitem-nohover
Children: Children:
ColorBlock@PLAYER_COLOR: ColorBlock@PLAYER_COLOR:
X: 0 X: 0
@@ -936,7 +936,7 @@ Container@OBSERVER_WIDGETS:
Y: 0 Y: 0
Width: 400 Width: 400
Height: 24 Height: 24
BaseName: scrollitem-nohover Background: scrollitem-nohover
Children: Children:
ColorBlock@PLAYER_COLOR: ColorBlock@PLAYER_COLOR:
X: 0 X: 0
@@ -973,7 +973,7 @@ Container@OBSERVER_WIDGETS:
Y: 0 Y: 0
Width: 400 Width: 400
Height: 24 Height: 24
BaseName: scrollitem-nohover Background: scrollitem-nohover
Children: Children:
ColorBlock@PLAYER_COLOR: ColorBlock@PLAYER_COLOR:
X: 0 X: 0
@@ -1010,7 +1010,7 @@ Container@OBSERVER_WIDGETS:
Y: 0 Y: 0
Width: 730 Width: 730
Height: 24 Height: 24
BaseName: scrollitem-nohover Background: scrollitem-nohover
Children: Children:
ColorBlock@PLAYER_COLOR: ColorBlock@PLAYER_COLOR:
X: 0 X: 0

View File

@@ -24,7 +24,7 @@ Container@MISSIONBROWSER_PANEL:
Height: PARENT_BOTTOM - 30 Height: PARENT_BOTTOM - 30
Children: Children:
ScrollItem@HEADER: ScrollItem@HEADER:
BaseName: scrollheader Background: scrollheader
Width: PARENT_RIGHT - 27 Width: PARENT_RIGHT - 27
Height: 13 Height: 13
X: 2 X: 2

View File

@@ -2,7 +2,7 @@ ScrollPanel@LABEL_DROPDOWN_TEMPLATE:
Width: DROPDOWN_WIDTH Width: DROPDOWN_WIDTH
Children: Children:
ScrollItem@HEADER: ScrollItem@HEADER:
BaseName: scrollheader Background: scrollheader
Width: PARENT_RIGHT - 27 Width: PARENT_RIGHT - 27
Height: 13 Height: 13
X: 2 X: 2
@@ -81,7 +81,7 @@ ScrollPanel@SPECTATOR_DROPDOWN_TEMPLATE:
Button: observer-scrollpanel-button Button: observer-scrollpanel-button
Children: Children:
ScrollItem@HEADER: ScrollItem@HEADER:
BaseName: observer-scrollheader Background: observer-scrollheader
Width: PARENT_RIGHT - 27 Width: PARENT_RIGHT - 27
Height: 13 Height: 13
X: 2 X: 2
@@ -94,7 +94,7 @@ ScrollPanel@SPECTATOR_DROPDOWN_TEMPLATE:
Height: 10 Height: 10
Align: Center Align: Center
ScrollItem@TEMPLATE: ScrollItem@TEMPLATE:
BaseName: observer-scrollitem Background: observer-scrollitem
Width: PARENT_RIGHT - 27 Width: PARENT_RIGHT - 27
Height: 25 Height: 25
X: 2 X: 2
@@ -124,7 +124,7 @@ ScrollPanel@SPECTATOR_LABEL_DROPDOWN_TEMPLATE:
Button: observer-scrollpanel-button Button: observer-scrollpanel-button
Children: Children:
ScrollItem@HEADER: ScrollItem@HEADER:
BaseName: observer-scrollitem Background: observer-scrollitem
Width: PARENT_RIGHT - 27 Width: PARENT_RIGHT - 27
Height: 13 Height: 13
X: 2 X: 2
@@ -137,7 +137,7 @@ ScrollPanel@SPECTATOR_LABEL_DROPDOWN_TEMPLATE:
Height: 10 Height: 10
Align: Center Align: Center
ScrollItem@TEMPLATE: ScrollItem@TEMPLATE:
BaseName: observer-scrollitem Background: observer-scrollitem
Width: PARENT_RIGHT - 27 Width: PARENT_RIGHT - 27
Height: 25 Height: 25
X: 2 X: 2

View File

@@ -65,7 +65,7 @@ Container@SKIRMISH_STATS:
ItemSpacing: 5 ItemSpacing: 5
Children: Children:
ScrollItem@TEAM_TEMPLATE: ScrollItem@TEAM_TEMPLATE:
BaseName: scrollheader Background: scrollheader
Width: PARENT_RIGHT - 26 Width: PARENT_RIGHT - 26
Height: 20 Height: 20
X: 2 X: 2

View File

@@ -605,7 +605,7 @@ Container@OBSERVER_WIDGETS:
Y: 0 Y: 0
Width: 700 Width: 700
Height: 25 Height: 25
BaseName: scrollitem-nohover Background: scrollitem-nohover
Children: Children:
ColorBlock@PLAYER_COLOR: ColorBlock@PLAYER_COLOR:
X: 0 X: 0
@@ -690,7 +690,7 @@ Container@OBSERVER_WIDGETS:
Y: 0 Y: 0
Width: 640 Width: 640
Height: 25 Height: 25
BaseName: scrollitem-nohover Background: scrollitem-nohover
Children: Children:
ColorBlock@PLAYER_COLOR: ColorBlock@PLAYER_COLOR:
X: 0 X: 0
@@ -761,7 +761,7 @@ Container@OBSERVER_WIDGETS:
Y: 0 Y: 0
Width: 400 Width: 400
Height: 25 Height: 25
BaseName: scrollitem-nohover Background: scrollitem-nohover
Children: Children:
ColorBlock@PLAYER_COLOR: ColorBlock@PLAYER_COLOR:
X: 0 X: 0
@@ -796,7 +796,7 @@ Container@OBSERVER_WIDGETS:
Y: 0 Y: 0
Width: 400 Width: 400
Height: 25 Height: 25
BaseName: scrollitem-nohover Background: scrollitem-nohover
Children: Children:
ColorBlock@PLAYER_COLOR: ColorBlock@PLAYER_COLOR:
X: 0 X: 0
@@ -831,7 +831,7 @@ Container@OBSERVER_WIDGETS:
Y: 0 Y: 0
Width: 400 Width: 400
Height: 25 Height: 25
BaseName: scrollitem-nohover Background: scrollitem-nohover
Children: Children:
ColorBlock@PLAYER_COLOR: ColorBlock@PLAYER_COLOR:
X: 0 X: 0
@@ -868,7 +868,7 @@ Container@OBSERVER_WIDGETS:
Y: 0 Y: 0
Width: 735 Width: 735
Height: 25 Height: 25
BaseName: scrollitem-nohover Background: scrollitem-nohover
Children: Children:
ColorBlock@PLAYER_COLOR: ColorBlock@PLAYER_COLOR:
X: 0 X: 0

View File

@@ -474,7 +474,7 @@ ScrollPanel@FACTION_DROPDOWN_TEMPLATE:
Width: DROPDOWN_WIDTH Width: DROPDOWN_WIDTH
Children: Children:
ScrollItem@HEADER: ScrollItem@HEADER:
BaseName: scrollheader Background: scrollheader
Width: PARENT_RIGHT - 27 Width: PARENT_RIGHT - 27
Height: 13 Height: 13
X: 2 X: 2

View File

@@ -67,7 +67,7 @@ Container@LOBBY_SERVERS_BIN:
X: 2 X: 2
Width: PARENT_RIGHT - 27 Width: PARENT_RIGHT - 27
Height: 20 Height: 20
BaseName: scrollheader Background: scrollheader
Visible: false Visible: false
Children: Children:
Label@LABEL: Label@LABEL:

View File

@@ -83,7 +83,7 @@ Background@MULTIPLAYER_PANEL:
X: 2 X: 2
Width: PARENT_RIGHT - 27 Width: PARENT_RIGHT - 27
Height: 20 Height: 20
BaseName: scrollheader Background: scrollheader
Visible: false Visible: false
Children: Children:
Label@LABEL: Label@LABEL:

View File

@@ -4,7 +4,7 @@ ScrollPanel@MULTIPLAYER_CLIENT_LIST:
IgnoreChildMouseOver: true IgnoreChildMouseOver: true
Children: Children:
ScrollItem@HEADER: ScrollItem@HEADER:
BaseName: scrollheader Background: scrollheader
Width: PARENT_RIGHT - 27 Width: PARENT_RIGHT - 27
Height: 13 Height: 13
X: 2 X: 2

View File

@@ -69,7 +69,7 @@ Container@SKIRMISH_STATS:
ItemSpacing: 5 ItemSpacing: 5
Children: Children:
ScrollItem@TEAM_TEMPLATE: ScrollItem@TEAM_TEMPLATE:
BaseName: scrollheader Background: scrollheader
Width: PARENT_RIGHT - 27 Width: PARENT_RIGHT - 27
Height: 20 Height: 20
X: 2 X: 2

View File

@@ -625,7 +625,7 @@ Container@OBSERVER_WIDGETS:
Y: 0 Y: 0
Width: 700 Width: 700
Height: 25 Height: 25
BaseName: scrollitem-nohover Background: scrollitem-nohover
Children: Children:
ColorBlock@PLAYER_COLOR: ColorBlock@PLAYER_COLOR:
X: 0 X: 0
@@ -710,7 +710,7 @@ Container@OBSERVER_WIDGETS:
Y: 0 Y: 0
Width: 640 Width: 640
Height: 25 Height: 25
BaseName: scrollitem-nohover Background: scrollitem-nohover
Children: Children:
ColorBlock@PLAYER_COLOR: ColorBlock@PLAYER_COLOR:
X: 0 X: 0
@@ -781,7 +781,7 @@ Container@OBSERVER_WIDGETS:
Y: 0 Y: 0
Width: 400 Width: 400
Height: 25 Height: 25
BaseName: scrollitem-nohover Background: scrollitem-nohover
Children: Children:
ColorBlock@PLAYER_COLOR: ColorBlock@PLAYER_COLOR:
X: 0 X: 0
@@ -817,7 +817,7 @@ Container@OBSERVER_WIDGETS:
Y: 0 Y: 0
Width: 400 Width: 400
Height: 25 Height: 25
BaseName: scrollitem-nohover Background: scrollitem-nohover
Children: Children:
ColorBlock@PLAYER_COLOR: ColorBlock@PLAYER_COLOR:
X: 0 X: 0
@@ -853,7 +853,7 @@ Container@OBSERVER_WIDGETS:
Y: 0 Y: 0
Width: 400 Width: 400
Height: 25 Height: 25
BaseName: scrollitem-nohover Background: scrollitem-nohover
Children: Children:
ColorBlock@PLAYER_COLOR: ColorBlock@PLAYER_COLOR:
X: 0 X: 0
@@ -891,7 +891,7 @@ Container@OBSERVER_WIDGETS:
Y: 0 Y: 0
Width: 735 Width: 735
Height: 25 Height: 25
BaseName: scrollitem-nohover Background: scrollitem-nohover
Children: Children:
ColorBlock@PLAYER_COLOR: ColorBlock@PLAYER_COLOR:
X: 0 X: 0

View File

@@ -474,7 +474,7 @@ ScrollPanel@FACTION_DROPDOWN_TEMPLATE:
Width: DROPDOWN_WIDTH Width: DROPDOWN_WIDTH
Children: Children:
ScrollItem@HEADER: ScrollItem@HEADER:
BaseName: scrollheader Background: scrollheader
Width: PARENT_RIGHT - 27 Width: PARENT_RIGHT - 27
Height: 13 Height: 13
X: 2 X: 2

View File

@@ -4,7 +4,7 @@ ScrollPanel@MULTIPLAYER_CLIENT_LIST:
IgnoreChildMouseOver: true IgnoreChildMouseOver: true
Children: Children:
ScrollItem@HEADER: ScrollItem@HEADER:
BaseName: scrollheader Background: scrollheader
Width: PARENT_RIGHT - 27 Width: PARENT_RIGHT - 27
Height: 13 Height: 13
X: 2 X: 2

View File

@@ -675,7 +675,7 @@ Container@OBSERVER_WIDGETS:
Y: 0 Y: 0
Width: 705 Width: 705
Height: 24 Height: 24
BaseName: scrollitem-nohover Background: scrollitem-nohover
Children: Children:
ColorBlock@PLAYER_COLOR: ColorBlock@PLAYER_COLOR:
X: 0 X: 0
@@ -762,7 +762,7 @@ Container@OBSERVER_WIDGETS:
Y: 0 Y: 0
Width: 735 Width: 735
Height: 24 Height: 24
BaseName: scrollitem-nohover Background: scrollitem-nohover
Children: Children:
ColorBlock@PLAYER_COLOR: ColorBlock@PLAYER_COLOR:
X: 0 X: 0
@@ -842,7 +842,7 @@ Container@OBSERVER_WIDGETS:
Y: 0 Y: 0
Width: 400 Width: 400
Height: 24 Height: 24
BaseName: scrollitem-nohover Background: scrollitem-nohover
Children: Children:
ColorBlock@PLAYER_COLOR: ColorBlock@PLAYER_COLOR:
X: 0 X: 0
@@ -879,7 +879,7 @@ Container@OBSERVER_WIDGETS:
Y: 0 Y: 0
Width: 400 Width: 400
Height: 24 Height: 24
BaseName: scrollitem-nohover Background: scrollitem-nohover
Children: Children:
ColorBlock@PLAYER_COLOR: ColorBlock@PLAYER_COLOR:
X: 0 X: 0
@@ -916,7 +916,7 @@ Container@OBSERVER_WIDGETS:
Y: 0 Y: 0
Width: 400 Width: 400
Height: 24 Height: 24
BaseName: scrollitem-nohover Background: scrollitem-nohover
Children: Children:
ColorBlock@PLAYER_COLOR: ColorBlock@PLAYER_COLOR:
X: 0 X: 0
@@ -953,7 +953,7 @@ Container@OBSERVER_WIDGETS:
Y: 0 Y: 0
Width: 740 Width: 740
Height: 24 Height: 24
BaseName: scrollitem-nohover Background: scrollitem-nohover
Children: Children:
ColorBlock@PLAYER_COLOR: ColorBlock@PLAYER_COLOR:
X: 0 X: 0

View File

@@ -625,7 +625,7 @@ Container@OBSERVER_WIDGETS:
Y: 0 Y: 0
Width: 705 Width: 705
Height: 24 Height: 24
BaseName: scrollitem-nohover Background: scrollitem-nohover
Children: Children:
ColorBlock@PLAYER_COLOR: ColorBlock@PLAYER_COLOR:
X: 0 X: 0
@@ -712,7 +712,7 @@ Container@OBSERVER_WIDGETS:
Y: 0 Y: 0
Width: 645 Width: 645
Height: 24 Height: 24
BaseName: scrollitem-nohover Background: scrollitem-nohover
Children: Children:
ColorBlock@PLAYER_COLOR: ColorBlock@PLAYER_COLOR:
X: 0 X: 0
@@ -785,7 +785,7 @@ Container@OBSERVER_WIDGETS:
Y: 0 Y: 0
Width: 400 Width: 400
Height: 24 Height: 24
BaseName: scrollitem-nohover Background: scrollitem-nohover
Children: Children:
ColorBlock@PLAYER_COLOR: ColorBlock@PLAYER_COLOR:
X: 0 X: 0
@@ -823,7 +823,7 @@ Container@OBSERVER_WIDGETS:
Y: 0 Y: 0
Width: 400 Width: 400
Height: 24 Height: 24
BaseName: scrollitem-nohover Background: scrollitem-nohover
Children: Children:
ColorBlock@PLAYER_COLOR: ColorBlock@PLAYER_COLOR:
X: 0 X: 0
@@ -861,7 +861,7 @@ Container@OBSERVER_WIDGETS:
Y: 0 Y: 0
Width: 400 Width: 400
Height: 24 Height: 24
BaseName: scrollitem-nohover Background: scrollitem-nohover
Children: Children:
ColorBlock@PLAYER_COLOR: ColorBlock@PLAYER_COLOR:
X: 0 X: 0
@@ -898,7 +898,7 @@ Container@OBSERVER_WIDGETS:
Y: 0 Y: 0
Width: 740 Width: 740
Height: 24 Height: 24
BaseName: scrollitem-nohover Background: scrollitem-nohover
Children: Children:
ColorBlock@PLAYER_COLOR: ColorBlock@PLAYER_COLOR:
X: 0 X: 0