mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-16 07:14:09 +02:00
added GetCursorPosition
This commit is contained in:
parent
59f074ba83
commit
cefc8dff59
1 changed files with 11 additions and 0 deletions
|
@ -127,6 +127,17 @@ namespace System
|
|||
}
|
||||
SetConsoleOutputCP(/*CP_UTF8*/65001);
|
||||
}
|
||||
|
||||
public static uint16[2] GetConsoleCursorPosition()
|
||||
{
|
||||
let handle = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
CONSOLE_SCREEN_BUFFER_INFO consoleInfo = .();
|
||||
if (GetConsoleScreenBufferInfo(handle, out consoleInfo) != 0)
|
||||
{
|
||||
return consoleInfo.mCursorPosition;
|
||||
}
|
||||
return uint16[2](0,0);
|
||||
}
|
||||
#endif
|
||||
|
||||
static StreamWriter OpenStreamWriter(Platform.BfpFileStdKind stdKind, ref StreamWriter outStreamWriter)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue