WPF layout (#3346)
This commit is contained in:
committed by
GitHub
parent
33d6975c25
commit
b898443f28
@@ -1,27 +1,27 @@
|
||||
<SS14Window xmlns="https://spacestation14.io">
|
||||
<HBoxContainer SizeFlagsHorizontal="FillExpand">
|
||||
<VBoxContainer SizeFlagsHorizontal="FillExpand" SizeFlagsStretchRatio="0.45">
|
||||
<HBoxContainer SizeFlagsHorizontal="FillExpand" SizeFlagsVertical="FillExpand" SizeFlagsStretchRatio="0.1">
|
||||
<LineEdit Name="SearchBar" PlaceHolder="Search" SizeFlagsHorizontal="FillExpand" SizeFlagsStretchRatio="0.6"/>
|
||||
<OptionButton Name="Category" SizeFlagsHorizontal="FillExpand" SizeFlagsStretchRatio="0.4"/>
|
||||
<HBoxContainer HorizontalExpand="True">
|
||||
<VBoxContainer HorizontalExpand="True" SizeFlagsStretchRatio="0.45">
|
||||
<HBoxContainer HorizontalExpand="True" VerticalExpand="True" SizeFlagsStretchRatio="0.1">
|
||||
<LineEdit Name="SearchBar" PlaceHolder="Search" HorizontalExpand="True" SizeFlagsStretchRatio="0.6"/>
|
||||
<OptionButton Name="Category" HorizontalExpand="True" SizeFlagsStretchRatio="0.4"/>
|
||||
</HBoxContainer>
|
||||
<ItemList Name="RecipesList" SelectMode="Single" SizeFlagsVertical="FillExpand" SizeFlagsStretchRatio="0.9"/>
|
||||
<ItemList Name="RecipesList" SelectMode="Single" VerticalExpand="True" SizeFlagsStretchRatio="0.9"/>
|
||||
</VBoxContainer>
|
||||
<Control SizeFlagsHorizontal="FillExpand" SizeFlagsStretchRatio="0.05"/>
|
||||
<VBoxContainer SizeFlagsHorizontal="FillExpand" SizeFlagsStretchRatio="0.45">
|
||||
<HBoxContainer Align="Center" SizeFlagsVertical="FillExpand" SizeFlagsStretchRatio="0.25">
|
||||
<TextureRect Name="TargetTexture" SizeFlagsHorizontal="FillExpand" SizeFlagsStretchRatio="0.15" Stretch="KeepCentered"/>
|
||||
<VBoxContainer SizeFlagsHorizontal="FillExpand" SizeFlagsStretchRatio="0.85">
|
||||
<RichTextLabel Name="TargetName" SizeFlagsVertical="FillExpand" SizeFlagsStretchRatio="0.1"/>
|
||||
<RichTextLabel Name="TargetDesc" SizeFlagsVertical="FillExpand" SizeFlagsStretchRatio="0.9"/>
|
||||
<Control HorizontalExpand="True" SizeFlagsStretchRatio="0.05"/>
|
||||
<VBoxContainer HorizontalExpand="True" SizeFlagsStretchRatio="0.45">
|
||||
<HBoxContainer Align="Center" VerticalExpand="True" SizeFlagsStretchRatio="0.25">
|
||||
<TextureRect Name="TargetTexture" HorizontalExpand="True" SizeFlagsStretchRatio="0.15" Stretch="KeepCentered"/>
|
||||
<VBoxContainer HorizontalExpand="True" SizeFlagsStretchRatio="0.85">
|
||||
<RichTextLabel Name="TargetName" VerticalExpand="True" SizeFlagsStretchRatio="0.1"/>
|
||||
<RichTextLabel Name="TargetDesc" VerticalExpand="True" SizeFlagsStretchRatio="0.9"/>
|
||||
</VBoxContainer>
|
||||
</HBoxContainer>
|
||||
<ItemList Name="StepList" SizeFlagsVertical="FillExpand" SizeFlagsStretchRatio="0.1"/>
|
||||
<VBoxContainer SizeFlagsVertical="FillExpand" SizeFlagsStretchRatio="0.1">
|
||||
<Button Name="BuildButton" Disabled="True" ToggleMode="True" SizeFlagsVertical="FillExpand" SizeFlagsStretchRatio="0.5"/>
|
||||
<HBoxContainer SizeFlagsVertical="FillExpand" SizeFlagsStretchRatio="0.5">
|
||||
<Button Name="EraseButton" ToggleMode="True" SizeFlagsHorizontal="FillExpand" SizeFlagsStretchRatio="0.7"/>
|
||||
<Button Name="ClearButton" SizeFlagsHorizontal="FillExpand" SizeFlagsStretchRatio="0.3"/>
|
||||
<ItemList Name="StepList" VerticalExpand="True" SizeFlagsStretchRatio="0.1"/>
|
||||
<VBoxContainer VerticalExpand="True" SizeFlagsStretchRatio="0.1">
|
||||
<Button Name="BuildButton" Disabled="True" ToggleMode="True" VerticalExpand="True" SizeFlagsStretchRatio="0.5"/>
|
||||
<HBoxContainer VerticalExpand="True" SizeFlagsStretchRatio="0.5">
|
||||
<Button Name="EraseButton" ToggleMode="True" HorizontalExpand="True" SizeFlagsStretchRatio="0.7"/>
|
||||
<Button Name="ClearButton" HorizontalExpand="True" SizeFlagsStretchRatio="0.3"/>
|
||||
</HBoxContainer>
|
||||
</VBoxContainer>
|
||||
</VBoxContainer>
|
||||
|
||||
@@ -6,7 +6,6 @@ using Robust.Client.UserInterface.CustomControls;
|
||||
using Robust.Client.UserInterface.XAML;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Maths;
|
||||
|
||||
#nullable enable
|
||||
|
||||
@@ -57,8 +56,6 @@ namespace Content.Client.Construction
|
||||
[GenerateTypedNameReferences]
|
||||
public partial class ConstructionMenu : SS14Window, IConstructionMenuView
|
||||
{
|
||||
protected override Vector2? CustomSize => (720, 320);
|
||||
|
||||
public bool BuildButtonPressed
|
||||
{
|
||||
get => BuildButton.Pressed;
|
||||
@@ -82,11 +79,13 @@ namespace Content.Client.Construction
|
||||
|
||||
public ConstructionMenu()
|
||||
{
|
||||
SetSize = MinSize = (720, 320);
|
||||
|
||||
IoCManager.InjectDependencies(this);
|
||||
RobustXamlLoader.Load(this);
|
||||
|
||||
Title = Loc.GetString("Construction");
|
||||
|
||||
|
||||
BuildButton.Text = Loc.GetString("Place construction ghost");
|
||||
RecipesList.OnItemSelected += obj => RecipeSelected?.Invoke(this, obj.ItemList[obj.ItemIndex]);
|
||||
RecipesList.OnItemDeselected += _ => RecipeSelected?.Invoke(this, null);
|
||||
|
||||
Reference in New Issue
Block a user