WPF layout (#3346)

This commit is contained in:
Pieter-Jan Briers
2021-02-21 12:38:56 +01:00
committed by GitHub
parent 33d6975c25
commit b898443f28
121 changed files with 1420 additions and 2069 deletions

View File

@@ -16,8 +16,6 @@ namespace Content.Client.Research
{
public ResearchConsoleBoundUserInterface Owner { get; set; }
protected override Vector2? CustomSize => (800, 400);
private readonly List<TechnologyPrototype> _unlockedTechnologyPrototypes = new();
private readonly List<TechnologyPrototype> _unlockableTechnologyPrototypes = new();
private readonly List<TechnologyPrototype> _futureTechnologyPrototypes = new();
@@ -40,6 +38,8 @@ namespace Content.Client.Research
public ResearchConsoleMenu(ResearchConsoleBoundUserInterface owner = null)
{
SetSize = MinSize = (800, 400);
IoCManager.InjectDependencies(this);
Title = Loc.GetString("R&D Console");
@@ -49,8 +49,8 @@ namespace Content.Client.Research
_unlockedTechnologies = new ItemList()
{
SelectMode = ItemList.ItemListSelectMode.Button,
SizeFlagsHorizontal = SizeFlags.FillExpand,
SizeFlagsVertical = SizeFlags.FillExpand,
HorizontalExpand = true,
VerticalExpand = true,
};
_unlockedTechnologies.OnItemSelected += UnlockedTechnologySelected;
@@ -58,8 +58,8 @@ namespace Content.Client.Research
_unlockableTechnologies = new ItemList()
{
SelectMode = ItemList.ItemListSelectMode.Button,
SizeFlagsHorizontal = SizeFlags.FillExpand,
SizeFlagsVertical = SizeFlags.FillExpand,
HorizontalExpand = true,
VerticalExpand = true,
};
_unlockableTechnologies.OnItemSelected += UnlockableTechnologySelected;
@@ -67,44 +67,44 @@ namespace Content.Client.Research
_futureTechnologies = new ItemList()
{
SelectMode = ItemList.ItemListSelectMode.Button,
SizeFlagsHorizontal = SizeFlags.FillExpand,
SizeFlagsVertical = SizeFlags.FillExpand,
HorizontalExpand = true,
VerticalExpand = true,
};
_futureTechnologies.OnItemSelected += FutureTechnologySelected;
var vbox = new VBoxContainer()
{
SizeFlagsHorizontal = SizeFlags.FillExpand,
SizeFlagsVertical = SizeFlags.FillExpand,
HorizontalExpand = true,
VerticalExpand = true,
};
var hboxTechnologies = new HBoxContainer()
{
SizeFlagsHorizontal = SizeFlags.FillExpand,
SizeFlagsVertical = SizeFlags.FillExpand,
HorizontalExpand = true,
VerticalExpand = true,
SizeFlagsStretchRatio = 2,
SeparationOverride = 10,
};
var hboxSelected = new HBoxContainer()
{
SizeFlagsHorizontal = SizeFlags.FillExpand,
SizeFlagsVertical = SizeFlags.FillExpand,
HorizontalExpand = true,
VerticalExpand = true,
SizeFlagsStretchRatio = 1
};
var vboxPoints = new VBoxContainer()
{
SizeFlagsHorizontal = SizeFlags.FillExpand,
SizeFlagsVertical = SizeFlags.FillExpand,
HorizontalExpand = true,
VerticalExpand = true,
SizeFlagsStretchRatio = 1,
};
var vboxTechInfo = new VBoxContainer()
{
SizeFlagsHorizontal = SizeFlags.FillExpand,
SizeFlagsVertical = SizeFlags.FillExpand,
HorizontalExpand = true,
VerticalExpand = true,
SizeFlagsStretchRatio = 3,
};
@@ -114,8 +114,8 @@ namespace Content.Client.Research
var vboxPointsButtons = new VBoxContainer()
{
Align = BoxContainer.AlignMode.End,
SizeFlagsHorizontal = SizeFlags.FillExpand,
SizeFlagsVertical = SizeFlags.FillExpand,
HorizontalExpand = true,
VerticalExpand = true,
};
ServerSelectionButton = new Button() { Text = Loc.GetString("Server list") };
@@ -133,8 +133,8 @@ namespace Content.Client.Research
_technologyIcon = new TextureRect()
{
SizeFlagsHorizontal = SizeFlags.FillExpand,
SizeFlagsVertical = SizeFlags.FillExpand,
HorizontalExpand = true,
VerticalExpand = true,
SizeFlagsStretchRatio = 1,
Stretch = TextureRect.StretchMode.KeepAspectCentered,
};