-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use ulPlatformSetFontLoader Update default config values
- Loading branch information
1 parent
994bc08
commit 680ccf1
Showing
5 changed files
with
105 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
namespace UltralightNet.Gamepad; | ||
|
||
/// <summary>The various <see cref="GamepadEvent" /> types.</summary> | ||
public enum GamepadEventType : int | ||
{ | ||
/// <summary>This event type should be fired when a gamepad is connected.</summary> | ||
/// <remarks>You will need to previously declare the gamepad, its index, and details about | ||
/// its axis and button layout via <see cref="Renderer.SetGamepadDetails(uint, ReadOnlySpan{char}, uint, uint)" /> prior to calling | ||
/// <see cref="Renderer.FireGamepadEvent(GamepadEvent)" />. | ||
/// </remarks> | ||
Connected, | ||
/// <summary>This event type should be fired when a gamepad is disconnected.</summary> | ||
Disconnected | ||
} | ||
|
||
/// <summary>Event representing a change in gamepad connection state</summary> | ||
/// <param name="Type">The type of this GamepadEvent.</param> | ||
/// <param name="Index">The index of the gamepad.</param> | ||
/// <see cref="Renderer.FireGamepadEvent(GamepadEvent)" /> | ||
public record struct GamepadEvent(GamepadEventType Type, uint Index); | ||
|
||
/// <summary>Event representing a change in gamepad axis state (eg, pressing a stick in a certain direction).</summary> | ||
/// <param name="Index">The index of the gamepad.</param> | ||
/// <param name="Axis">The index of the axis whose value has changed.</param> | ||
/// <param name="Value">The new value of the axis.<br /><remarks>This value should be normalized to the range [-1.0, 1.0].</remarks></param> | ||
/// <see cref="Renderer.FireGamepadAxisEvent(GamepadAxisEvent)" /> | ||
public record struct GamepadAxisEvent(uint Index, uint Axis, double Value); | ||
|
||
/// <summary>Event representing a change in gamepad button state (eg, pressing a button on a gamepad).</summary> | ||
/// <param name="Index">The index of the gamepad.</param> | ||
/// <param name="Axis">The index of the button whose value has changed.</param> | ||
/// <param name="Value">The new value of the button.<br /><remarks>This value should be normalized to the range [-1.0, 1.0], with any value greater than 0.0 to be considered "pressed".</remarks></param> | ||
/// <see cref="Renderer.FireGamepadButtonEvent(GamepadButtonEvent)" /> | ||
public record struct GamepadButtonEvent(uint Index, uint Button, double Value); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters