Create Cursor.cs
This commit is contained in:
parent
23ed54cc24
commit
312a851c34
1 changed files with 44 additions and 0 deletions
44
Raylib-cs/types/Cursor.cs
Normal file
44
Raylib-cs/types/Cursor.cs
Normal file
|
|
@ -0,0 +1,44 @@
|
||||||
|
|
||||||
|
namespace Raylib_cs
|
||||||
|
{
|
||||||
|
public readonly struct Cursor
|
||||||
|
{
|
||||||
|
/// <summary>{ <see langword="set"/>; }
|
||||||
|
/// <see langword="true"/> <inheritdoc cref="Raylib.EnableCursor"/>
|
||||||
|
/// <see langword="false"/> <inheritdoc cref="Raylib.DisableCursor"/></summary>
|
||||||
|
public bool Enabled
|
||||||
|
{
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value) Raylib.EnableCursor();
|
||||||
|
else Raylib.DisableCursor();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>{ <see langword="get"/>; }
|
||||||
|
/// <inheritdoc cref="Raylib.IsCursorHidden"/>,
|
||||||
|
/// { <see langword="set"/>; }
|
||||||
|
/// <see langword="true"/> <inheritdoc cref="Raylib.HideCursor"/>
|
||||||
|
/// <see langword="false"/> <inheritdoc cref="Raylib.ShowCursor"/></summary>
|
||||||
|
public bool Hidden
|
||||||
|
{
|
||||||
|
get => Raylib.IsCursorHidden();
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value) Raylib.HideCursor();
|
||||||
|
else Raylib.ShowCursor();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>{ <see langword="set"/>; }
|
||||||
|
/// <inheritdoc cref="Raylib.SetMouseCursor"/></summary>
|
||||||
|
private MouseCursor MouseCursor // Unsure whether this makes sense so leave it disabled for now
|
||||||
|
{
|
||||||
|
set => Raylib.SetMouseCursor(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>{ <see langword="get"/>; }
|
||||||
|
/// <inheritdoc cref="Raylib.IsCursorOnScreen"/></summary>
|
||||||
|
public bool OnScreen => Raylib.IsCursorOnScreen();
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue