PlatformAPI reference
Class RaylibTouchScreen
Namespace: MicroEngine.Raylib
Assembly: MicroEngine.Raylib.dll
Guide: Backends and platforms
Touches for the raylib platform. raylib’s own touch state is a per-frame list of points indexed by position (no cancel, no reliable identity across frames), so it is not used: a raylib window reports no touches; its controls still lay out for scripted touches.
public sealed class RaylibTouchScreen : ITouchScreenInheritance
Implements
Constructors
RaylibTouchScreen()
A touch screen with no page feeding it (a desktop window): no touches, default insets and density.
public RaylibTouchScreen()Properties
CanVibrate
Whether Vibrate can do anything here.
public bool CanVibrate { get; }Property Value
Overlay
Drawn over the letterboxed game in screen pixels after every frame (never in captures).
public ITouchOverlay? Overlay { get; set; }Property Value
PixelsPerDp
Pixels per density-independent pixel (1/160 inch): 1 on a classic desktop display, 2-4 on phones.
public float PixelsPerDp { get; }Property Value
SafeArea
The part of Size no notch, rounded corner or system bar covers.
public RectF SafeArea { get; }Property Value
Size
Drawable size in pixels.
public Vector2 Size { get; }Property Value
TouchFirst
Whether touch is the main way to play here (a phone, a tablet, a touch-only browser).
public bool TouchFirst { get; }Property Value
Methods
ReadTouches(List<TouchEvent>)
Moves every touch event since the previous call into events, oldest first.
public void ReadTouches(List<TouchEvent> events)Parameters
events List<TouchEvent>
Vibrate(float, int)
A short vibration (strength 0..1). Returns false when the device cannot vibrate.
public bool Vibrate(float strength, int milliseconds)Parameters
strength float
milliseconds int