mirror of
https://github.com/Facepunch/sbox-public.git
synced 2026-01-04 04:18:27 -05:00
This commit imports the C# engine code and game files, excluding C++ source code. [Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
26 lines
467 B
C#
26 lines
467 B
C#
using Sandbox;
|
|
|
|
internal struct NativeRect
|
|
{
|
|
public int x;
|
|
public int y;
|
|
public int w;
|
|
public int h;
|
|
|
|
public NativeRect( in int x, in int y, in int w, in int h )
|
|
{
|
|
this.x = x;
|
|
this.y = y;
|
|
this.w = w;
|
|
this.h = h;
|
|
}
|
|
|
|
public static implicit operator NativeRect( in Rect value )
|
|
{
|
|
return new NativeRect { x = (int)value.Left, y = (int)value.Top, w = (int)value.Width, h = (int)value.Height };
|
|
}
|
|
|
|
public readonly Rect Rect => new( x, y, w, h );
|
|
|
|
}
|