Gravity generator rewrite (#4828)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
committed by
GitHub
parent
0e33b246db
commit
059fa9ae48
20
Content.Client/UserInterface/FancyWindow.xaml
Normal file
20
Content.Client/UserInterface/FancyWindow.xaml
Normal file
@@ -0,0 +1,20 @@
|
||||
<ui:FancyWindow xmlns="https://spacestation14.io"
|
||||
xmlns:ui="clr-namespace:Content.Client.UserInterface"
|
||||
MouseFilter="Stop"
|
||||
MinWidth="200" MinHeight="150">
|
||||
<PanelContainer StyleClasses="AngleRect" />
|
||||
|
||||
<BoxContainer Orientation="Vertical">
|
||||
<Control>
|
||||
<PanelContainer StyleClasses="WindowHeadingBackground" />
|
||||
<BoxContainer Margin="4 2 8 0" Orientation="Horizontal">
|
||||
<Label Name="WindowTitle"
|
||||
HorizontalExpand="True" VAlign="Center" StyleClasses="FancyWindowTitle" />
|
||||
<TextureButton Name="CloseButton" StyleClasses="windowCloseButton"
|
||||
VerticalAlignment="Center" />
|
||||
</BoxContainer>
|
||||
</Control>
|
||||
<PanelContainer StyleClasses="LowDivider" />
|
||||
<Control Name="ContentsContainer" Margin="0 2" RectClipContent="True" VerticalExpand="true" />
|
||||
</BoxContainer>
|
||||
</ui:FancyWindow>
|
||||
30
Content.Client/UserInterface/FancyWindow.xaml.cs
Normal file
30
Content.Client/UserInterface/FancyWindow.xaml.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using Robust.Client.AutoGenerated;
|
||||
using Robust.Client.UserInterface.CustomControls;
|
||||
using Robust.Client.UserInterface.XAML;
|
||||
using Robust.Shared.Maths;
|
||||
|
||||
namespace Content.Client.UserInterface
|
||||
{
|
||||
[GenerateTypedNameReferences]
|
||||
public partial class FancyWindow : BaseWindow
|
||||
{
|
||||
public FancyWindow()
|
||||
{
|
||||
RobustXamlLoader.Load(this);
|
||||
|
||||
CloseButton.OnPressed += _ => Close();
|
||||
XamlChildren = ContentsContainer.Children;
|
||||
}
|
||||
|
||||
public string? Title
|
||||
{
|
||||
get => WindowTitle.Text;
|
||||
set => WindowTitle.Text = value;
|
||||
}
|
||||
|
||||
protected override DragMode GetDragModeFor(Vector2 relativeMousePos)
|
||||
{
|
||||
return DragMode.Move;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user