Class CaretBlink
How long a text caret stays visible, then hidden, before switching - read from the desktop's own setting, so the game's text boxes blink like every other text box.
public static class CaretBlink
- Inheritance
-
CaretBlink
- Inherited Members
Remarks
SDL has no caret-blink setting, so each platform is asked in its own way: Windows through
GetCaretBlinkTime, KDE from CursorBlinkRate in kdeglobals, GNOME from
cursor-blink-time, and macOS from NSTextInsertionPointBlinkPeriodOn. KDE
and GNOME store a whole on-and-off cycle and Windows and macOS one phase, so the first two
are halved. Anything that cannot be read falls back to 530ms, Windows' default.
Read once, on first use: a desktop setting changed mid-session is picked up next launch. A caret the desktop says not to blink is reported as Zero, which TextBox takes as "stay on".
Properties
Interval
Each phase's length; zero means the caret should not blink.
public static TimeSpan Interval { get; }