Rename ScrollWidget BaseName to Background
To match button
This commit is contained in:
committed by
Matthias Mailänder
parent
5e6f14c9ee
commit
6b63114aaa
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -83,7 +83,7 @@ Background@MULTIPLAYER_PANEL:
|
||||
X: 2
|
||||
Width: PARENT_RIGHT - 27
|
||||
Height: 20
|
||||
BaseName: scrollheader
|
||||
Background: scrollheader
|
||||
Visible: false
|
||||
Children:
|
||||
Label@LABEL:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user