cannot set cursor y position
Area of Cosmos - What area of Cosmos are we dealing with?
the console. im trying to put a digital clock in the top right corner
Expected Behaviour - What do you think that should happen?
the clock appears in the top right corner, and is put there right before a Console.ReadLine()
Actual Behaviour - What unexpectedly happens?
the clock appears in the correct x position but above the text/command prompt
Reproduction - How did you get this error to appear?
change the position of the cursor by changing Console.CursorTop or calling Console.SetCursorPosition()
Version - Were you using the User Kit or Dev Kit? And what User Kit version or Dev Kit commit (Cosmos, IL2CPU, X#)?
dev kit, commit 1f3bb52
can we get a test project
any progress?
?
...?
...???
I might be too late and i can't explain it, but this sample works for me:
Console.WriteLine("Printing time. . ."); // Just info
string time = DateTime.Now.Hour.ToString() + ':' + DateTime.Now.Minute.ToString(); // Make time string for output
int cols = Cosmos.HAL.Global.TextScreen.Cols; // Get chars count in row
int rows = Cosmos.HAL.Global.TextScreen.Rows; // Get console row count
Console.WriteLine($"{cols}x{rows}"); // Print info
Sys.Global.Console.X = cols - time.Length; // Set console cursor X position
Sys.Global.Console.Y = -1; // Set console cursor Y position
Console.Write(time); // Print our time string