you need to do a lot of extra things when you need readline from keyboard.
C# How did they create wait cursor?, In character subsystem
C# How did they create wait cursor?, In character subsystem
|
|
Mar 17 2022, 08:32 AM
Return to original view | Post
#1
|
![]() ![]() ![]()
Junior Member
355 posts Joined: Aug 2021 |
When display such custom cursor,
you need to do a lot of extra things when you need readline from keyboard. |
|
|
|
|
|
Mar 17 2022, 07:53 PM
Return to original view | Post
#2
|
![]() ![]() ![]()
Junior Member
355 posts Joined: Aug 2021 |
QUOTE(FlierMate @ Mar 17 2022, 05:40 PM) Yes, you've pinpointed the issue. Nope.But it is quite easy, given this, in .NET: CODE while (true) { if (Console.KeyAvailable) break; Console.Write('.'); } ...where it doesn't pause for keypress from user. To handle "proper" readline, you need to check for backspace, insert / overwrite, arrow keys, some other keys such as ctrl / alt + keys... |
|
|
Mar 19 2022, 10:33 PM
Return to original view | Post
#3
|
![]() ![]() ![]()
Junior Member
355 posts Joined: Aug 2021 |
QUOTE(FlierMate @ Mar 19 2022, 05:26 PM) But I wonder, why do we need to read keystroke when animating a wait cursor?? After re-read the 1st post, realized this was talking about waiting cursor in console.Interesting, looks like everyone was a DOS master. Not for 'waiting command cursor' This post has been edited by flashang: Mar 19 2022, 10:43 PM FlierMate liked this post
|
|
|
Mar 19 2022, 10:41 PM
Return to original view | Post
#4
|
![]() ![]() ![]()
Junior Member
355 posts Joined: Aug 2021 |
QUOTE(silverhawk @ Mar 19 2022, 08:53 PM) Like a normal progress bar you see on windows when you're transferring a file. Its quite common in command line scripts now. If we look at recent common application, including web, desktop gui and console app,The waiting cursor could be progress bar, or some text info such as xx mb/sec, xx sec / min reminding, 1 of 999 steps / processes, ... This may give user some info for them to decide if they are willing to wait until complete or terminate it. Animation cursor may be is OK for short waiting, but not for long waiting time. |
| Change to: | 0.0214sec
0.61
6 queries
GZIP Disabled
Time is now: 19th December 2025 - 01:33 AM |