Struct HudOffset
A pixel offset from a HUD element's anchor, expressed in the project's reference resolution. Positive X
is right, positive Y is up, regardless of which corner the element is anchored to — the anchor decides
the origin, this decides the nudge.
Assembly: Serenity.GameUi.Domain.dll
Syntax
public readonly struct HudOffset : IEquatable<HudOffset>
Remarks
Constructors
HudOffset(float, float)
Declaration
public HudOffset(float x, float y)
Parameters
| Type |
Name |
Description |
| float |
x |
Horizontal offset in reference pixels.
|
| float |
y |
Vertical offset in reference pixels.
|
Fields
X
Horizontal offset in reference pixels; positive is right.
Declaration
Field Value
Y
Vertical offset in reference pixels; positive is up.
Declaration
Field Value
Properties
Zero
No offset; the element sits exactly on its anchor.
Declaration
public static HudOffset Zero { get; }
Property Value
Methods
Equals(HudOffset)
Declaration
public bool Equals(HudOffset other)
Parameters
Returns
Equals(object)
Declaration
public override bool Equals(object obj)
Parameters
| Type |
Name |
Description |
| object |
obj |
|
Returns
Overrides
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
MirroredHorizontally()
Returns this offset with its horizontal component negated.
Declaration
public HudOffset MirroredHorizontally()
Returns
Remarks
ToString()
Declaration
public override string ToString()
Returns
Overrides
Operators
operator ==(HudOffset, HudOffset)
Declaration
public static bool operator ==(HudOffset left, HudOffset right)
Parameters
Returns
operator !=(HudOffset, HudOffset)
Declaration
public static bool operator !=(HudOffset left, HudOffset right)
Parameters
Returns
Implements