Rename ListBoxWidget -> ScrollPanelWidget.
This commit is contained in:
@@ -165,7 +165,6 @@
|
||||
<Compile Include="Widgets\ImageWidget.cs" />
|
||||
<Compile Include="Widgets\TextFieldWidget.cs" />
|
||||
<Compile Include="Widgets\ChatDisplayWidget.cs" />
|
||||
<Compile Include="Widgets\ListBoxWidget.cs" />
|
||||
<Compile Include="Widgets\SliderWidget.cs" />
|
||||
<Compile Include="Widgets\TimerWidget.cs" />
|
||||
<Compile Include="Widgets\ShpImageWidget.cs" />
|
||||
@@ -182,6 +181,7 @@
|
||||
<Compile Include="Traits\Armor.cs" />
|
||||
<Compile Include="Graphics\CursorProvider.cs" />
|
||||
<Compile Include="Server\TraitInterfaces.cs" />
|
||||
<Compile Include="Widgets\ScrollPanelWidget.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\OpenRA.FileFormats\OpenRA.FileFormats.csproj">
|
||||
|
||||
@@ -122,7 +122,7 @@ namespace OpenRA.Widgets
|
||||
Widget.RootWidget.AddChild(fullscreenMask);
|
||||
|
||||
var origin = w.RenderOrigin;
|
||||
var dropDown = new ListBoxWidget
|
||||
var dropDown = new ScrollPanelWidget
|
||||
{
|
||||
Bounds = new Rectangle(w.RenderOrigin.X, w.RenderOrigin.Y + w.Bounds.Height, w.Bounds.Width, 100),
|
||||
Visible = true,
|
||||
|
||||
@@ -13,7 +13,7 @@ using OpenRA.Graphics;
|
||||
|
||||
namespace OpenRA.Widgets
|
||||
{
|
||||
public class ListBoxWidget : Widget
|
||||
public class ScrollPanelWidget : Widget
|
||||
{
|
||||
public readonly string Background = "dialog3";
|
||||
public readonly int ScrollbarWidth = 24;
|
||||
@@ -30,8 +30,8 @@ namespace OpenRA.Widgets
|
||||
Rectangle backgroundRect;
|
||||
Rectangle scrollbarRect;
|
||||
|
||||
public ListBoxWidget() : base() {}
|
||||
protected ListBoxWidget(ListBoxWidget other)
|
||||
public ScrollPanelWidget() : base() {}
|
||||
protected ScrollPanelWidget(ScrollPanelWidget other)
|
||||
: base(other)
|
||||
{
|
||||
Background = other.Background;
|
||||
@@ -115,6 +115,6 @@ namespace OpenRA.Widgets
|
||||
return (UpPressed || DownPressed);
|
||||
}
|
||||
|
||||
public override Widget Clone() { return new ListBoxWidget(this); }
|
||||
public override Widget Clone() { return new ScrollPanelWidget(this); }
|
||||
}
|
||||
}
|
||||
@@ -31,7 +31,7 @@ namespace OpenRA.Mods.RA.Widgets.Delegates
|
||||
else
|
||||
Map = Game.modData.AvailableMaps.FirstOrDefault(m => m.Value.Selectable).Value;
|
||||
|
||||
var ml = bg.GetWidget<ListBoxWidget>("MAP_LIST");
|
||||
var ml = bg.GetWidget<ScrollPanelWidget>("MAP_LIST");
|
||||
bg.GetWidget<MapPreviewWidget>("MAPCHOOSER_MAP_PREVIEW").Map = () => Map;
|
||||
bg.GetWidget<LabelWidget>("CURMAP_TITLE").GetText = () => Map.Title;
|
||||
bg.GetWidget<LabelWidget>("CURMAP_SIZE").GetText = () => "{0}x{1}".F(Map.Bounds.Width, Map.Bounds.Height);
|
||||
|
||||
@@ -96,7 +96,7 @@ namespace OpenRA.Mods.RA.Widgets.Delegates
|
||||
Rules.Music[CurrentSong].Length / 60, Rules.Music[CurrentSong].Length % 60);
|
||||
};
|
||||
|
||||
var ml = bg.GetWidget<ListBoxWidget>("MUSIC_LIST");
|
||||
var ml = bg.GetWidget<ScrollPanelWidget>("MUSIC_LIST");
|
||||
var itemTemplate = ml.GetWidget<LabelWidget>("MUSIC_TEMPLATE");
|
||||
int offset = itemTemplate.Bounds.Y;
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace OpenRA.Mods.RA.Widgets.Delegates
|
||||
};
|
||||
|
||||
|
||||
var sl = bg.GetWidget<ListBoxWidget>("SERVER_LIST");
|
||||
var sl = bg.GetWidget<ScrollPanelWidget>("SERVER_LIST");
|
||||
ServerTemplate = sl.GetWidget<LabelWidget>("SERVER_TEMPLATE");
|
||||
|
||||
bg.GetWidget("REFRESH_BUTTON").OnMouseUp = mi =>
|
||||
@@ -137,7 +137,7 @@ namespace OpenRA.Mods.RA.Widgets.Delegates
|
||||
if (bg == null) // We got a MasterServer reply AFTER the browser is gone, just return to prevent crash - Gecko
|
||||
return;
|
||||
|
||||
var sl = bg.GetWidget<ListBoxWidget>("SERVER_LIST");
|
||||
var sl = bg.GetWidget<ScrollPanelWidget>("SERVER_LIST");
|
||||
|
||||
sl.Children.Clear();
|
||||
currentServer = null;
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace OpenRA.Mods.RA.Widgets.Delegates
|
||||
return true;
|
||||
};
|
||||
|
||||
var vl = bg.GetWidget<ListBoxWidget>("VIDEO_LIST");
|
||||
var vl = bg.GetWidget<ScrollPanelWidget>("VIDEO_LIST");
|
||||
var itemTemplate = vl.GetWidget<LabelWidget>("VIDEO_TEMPLATE");
|
||||
int offset = itemTemplate.Bounds.Y;
|
||||
|
||||
|
||||
@@ -408,7 +408,7 @@ Background@MAP_CHOOSER:
|
||||
Height:20
|
||||
Text:Choose Map
|
||||
Bold:True
|
||||
ListBox@MAP_LIST:
|
||||
ScrollPanel@MAP_LIST:
|
||||
Id:MAP_LIST
|
||||
X:20
|
||||
Y:50
|
||||
|
||||
@@ -241,7 +241,7 @@ Background@MUSIC_MENU:
|
||||
Width:140
|
||||
Height:25
|
||||
Align: Center
|
||||
ListBox@MUSIC_LIST:
|
||||
ScrollPanel@MUSIC_LIST:
|
||||
Id:MUSIC_LIST
|
||||
X:10
|
||||
Y:50
|
||||
|
||||
@@ -109,7 +109,7 @@ Background@JOINSERVER_BG:
|
||||
Text:Join Server
|
||||
Align:Center
|
||||
Bold:True
|
||||
ListBox@SERVER_LIST:
|
||||
ScrollPanel@SERVER_LIST:
|
||||
Id:SERVER_LIST
|
||||
X:20
|
||||
Y:50
|
||||
|
||||
@@ -20,7 +20,7 @@ Background@VIDEOPLAYER_MENU:
|
||||
Y:50
|
||||
Width:640
|
||||
Height:400
|
||||
ListBox@VIDEO_LIST:
|
||||
ScrollPanel@VIDEO_LIST:
|
||||
Id:VIDEO_LIST
|
||||
X:20
|
||||
Y:460
|
||||
|
||||
@@ -406,7 +406,7 @@ Background@MAP_CHOOSER:
|
||||
Height:20
|
||||
Text:Choose Map
|
||||
Bold:True
|
||||
ListBox@MAP_LIST:
|
||||
ScrollPanel@MAP_LIST:
|
||||
Id:MAP_LIST
|
||||
X:20
|
||||
Y:50
|
||||
|
||||
@@ -209,7 +209,7 @@ Background@MUSIC_MENU:
|
||||
Width:140
|
||||
Height:25
|
||||
Align: Center
|
||||
ListBox@MUSIC_LIST:
|
||||
ScrollPanel@MUSIC_LIST:
|
||||
Id:MUSIC_LIST
|
||||
X:10
|
||||
Y:50
|
||||
|
||||
@@ -111,7 +111,7 @@ Background@JOINSERVER_BG:
|
||||
Text:Join Server
|
||||
Align:Center
|
||||
Bold:True
|
||||
ListBox@SERVER_LIST:
|
||||
ScrollPanel@SERVER_LIST:
|
||||
Id:SERVER_LIST
|
||||
X:20
|
||||
Y:50
|
||||
|
||||
@@ -21,7 +21,7 @@ Background@VIDEOPLAYER_MENU:
|
||||
Y:50
|
||||
Width:640
|
||||
Height:400
|
||||
ListBox@VIDEO_LIST:
|
||||
ScrollPanel@VIDEO_LIST:
|
||||
Id:VIDEO_LIST
|
||||
X:20
|
||||
Y:460
|
||||
|
||||
@@ -29,7 +29,7 @@ Background@SERVER_LOBBY:
|
||||
Y:4
|
||||
Width:244
|
||||
Height:244
|
||||
ListBox@PLAYERSX:
|
||||
ScrollPanel@PLAYERSX:
|
||||
Id:PLAYERSX
|
||||
X:20
|
||||
Y:75
|
||||
@@ -439,7 +439,7 @@ Background@MAP_CHOOSER:
|
||||
Height:20
|
||||
Text:Choose Map
|
||||
Bold:True
|
||||
ListBox@MAP_LIST:
|
||||
ScrollPanel@MAP_LIST:
|
||||
Id:MAP_LIST
|
||||
X:20
|
||||
Y:50
|
||||
|
||||
@@ -242,7 +242,7 @@ Background@MUSIC_MENU:
|
||||
Width:140
|
||||
Height:25
|
||||
Align: Center
|
||||
ListBox@MUSIC_LIST:
|
||||
ScrollPanel@MUSIC_LIST:
|
||||
Id:MUSIC_LIST
|
||||
X:10
|
||||
Y:50
|
||||
|
||||
@@ -109,7 +109,7 @@ Background@JOINSERVER_BG:
|
||||
Text:Join Server
|
||||
Align:Center
|
||||
Bold:True
|
||||
ListBox@SERVER_LIST:
|
||||
ScrollPanel@SERVER_LIST:
|
||||
Id:SERVER_LIST
|
||||
X:20
|
||||
Y:50
|
||||
|
||||
@@ -21,7 +21,7 @@ Background@VIDEOPLAYER_MENU:
|
||||
Y:50
|
||||
Width:640
|
||||
Height:400
|
||||
ListBox@VIDEO_LIST:
|
||||
ScrollPanel@VIDEO_LIST:
|
||||
Id:VIDEO_LIST
|
||||
X:20
|
||||
Y:460
|
||||
|
||||
Reference in New Issue
Block a user