Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ CursorSize

int System.ConsolePal.CursorSize
staticgetset

Definition at line 310 of file ConsolePal.cs.

311 {
312 get
313 {
314 if (!global::Interop.Kernel32.GetConsoleCursorInfo(OutputHandle, out var cci))
315 {
317 }
318 return cci.dwSize;
319 }
320 set
321 {
322 if (value < 1 || value > 100)
323 {
324 throw new ArgumentOutOfRangeException("value", value, System.SR.ArgumentOutOfRange_CursorSize);
325 }
326 if (!global::Interop.Kernel32.GetConsoleCursorInfo(OutputHandle, out var cci))
327 {
329 }
330 cci.dwSize = value;
331 if (!global::Interop.Kernel32.SetConsoleCursorInfo(OutputHandle, ref cci))
332 {
334 }
335 }
336 }
static IntPtr OutputHandle
static Exception GetExceptionForWin32Error(int errorCode, string path="")
static string ArgumentOutOfRange_CursorSize
Definition SR.cs:72
Definition SR.cs:7