diff --git a/OpenRA.Game/Widgets/ScrollItemWidget.cs b/OpenRA.Game/Widgets/ScrollItemWidget.cs index 99de7c2dc3..df9f845c1b 100644 --- a/OpenRA.Game/Widgets/ScrollItemWidget.cs +++ b/OpenRA.Game/Widgets/ScrollItemWidget.cs @@ -15,6 +15,7 @@ namespace OpenRA.Widgets public class ScrollItemWidget : ButtonWidget { public string ItemKey; + public string BaseName = "scrollitem"; public ScrollItemWidget() : base() @@ -31,14 +32,15 @@ namespace OpenRA.Widgets VisualHeight = 0; IgnoreChildMouseOver = true; Key = other.Key; + BaseName = other.BaseName; } public Func IsSelected = () => false; public override void Draw() { - var state = IsSelected() ? "scrollitem-selected" : - Ui.MouseOverWidget == this ? "scrollitem-hover" : + var state = IsSelected() ? BaseName+"-selected" : + Ui.MouseOverWidget == this ? BaseName+"-hover" : null; if (state != null) diff --git a/mods/d2k/chrome.yaml b/mods/d2k/chrome.yaml index e161cc76cc..90e5563610 100644 --- a/mods/d2k/chrome.yaml +++ b/mods/d2k/chrome.yaml @@ -527,3 +527,16 @@ scrollitem-hover: dialog.png corner-tr: 594,0,1,1 corner-bl: 512,82,1,1 corner-br: 594,82,1,1 + +# A copy of dialog3 +scrollheader-selected: dialog.png + background: 641,1,126,126 + border-r: 767,1,1,126 + border-l: 640,1,1,126 + border-b: 641,127,126,1 + border-t: 641,0,126,1 + corner-tl: 640,0,1,1 + corner-tr: 722,0,1,1 + corner-bl: 640,82,1,1 + corner-br: 722,82,1,1 + diff --git a/mods/ra/chrome.yaml b/mods/ra/chrome.yaml index ab70ea6cee..1387294fa7 100644 --- a/mods/ra/chrome.yaml +++ b/mods/ra/chrome.yaml @@ -521,7 +521,19 @@ scrollitem-hover: dialog.png corner-tr: 594,0,1,1 corner-bl: 512,82,1,1 corner-br: 594,82,1,1 - + +# A copy of dialog2 +scrollheader-selected: dialog.png + background: 513,1,126,126 + border-r: 639,1,1,126 + border-l: 512,1,1,126 + border-b: 513,127,126,1 + border-t: 513,0,126,1 + corner-tl: 512,0,1,1 + corner-tr: 594,0,1,1 + corner-bl: 512,82,1,1 + corner-br: 594,82,1,1 + logos: loadscreen.png logo: 0,0,256,256 diff --git a/mods/ra/chrome/dropdowns.yaml b/mods/ra/chrome/dropdowns.yaml index 59fdfd9345..92b8ac3c3e 100644 --- a/mods/ra/chrome/dropdowns.yaml +++ b/mods/ra/chrome/dropdowns.yaml @@ -2,6 +2,7 @@ ScrollPanel@LABEL_DROPDOWN_TEMPLATE: Width:DROPDOWN_WIDTH Children: ScrollItem@HEADER: + BaseName:scrollheader Width:PARENT_RIGHT-27 Height:13 X:2 diff --git a/mods/ts/chrome.yaml b/mods/ts/chrome.yaml index 17a1d3a74a..435d5aba1f 100644 --- a/mods/ts/chrome.yaml +++ b/mods/ts/chrome.yaml @@ -515,7 +515,19 @@ scrollitem-hover: dialog.png corner-tr: 594,0,1,1 corner-bl: 512,82,1,1 corner-br: 594,82,1,1 - + +# A copy of dialog3 +scrollheader-selected: dialog.png + background: 641,1,126,126 + border-r: 767,1,1,126 + border-l: 640,1,1,126 + border-b: 641,127,126,1 + border-t: 641,0,126,1 + corner-tl: 640,0,1,1 + corner-tr: 722,0,1,1 + corner-bl: 640,82,1,1 + corner-br: 722,82,1,1 + logos: loadscreen.png logo: 0,0,256,256