mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-14 19:29:36 +01:00
Add window helper for BUIs (#5183)
* Add window helper for BUIs Automatically does OnClose and just makes content slightly nicer. * more * Add prototype reload helper * Add Box2i Center * weh
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Numerics;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using Robust.Shared.Utility;
|
||||
@@ -22,6 +23,7 @@ namespace Robust.Shared.Maths
|
||||
public readonly int Width => Math.Abs(Right - Left);
|
||||
public readonly int Height => Math.Abs(Top - Bottom);
|
||||
public readonly Vector2i Size => new(Width, Height);
|
||||
public readonly Vector2 Center => TopRight - BottomLeft / 2;
|
||||
|
||||
public UIBox2i(Vector2i topLeft, Vector2i bottomRight)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user