Recent

Author Topic: Turn off cursor  (Read 2412 times)

nugax

  • Full Member
  • ***
  • Posts: 232
Turn off cursor
« on: February 04, 2018, 10:07:58 pm »
How can I turn off the cursor, in a console. I tried crt.consoleoff and it doesnt actually remove the cursor?
-Nugax

jamie

  • Hero Member
  • *****
  • Posts: 6090
Re: Turn off cursor
« Reply #1 on: February 04, 2018, 10:11:34 pm »
move it off screen?
actually you can use the SetConsoleCursorInfo

you first need to fill a TConsole_Cursor_Info and then pass that along..
« Last Edit: February 04, 2018, 10:19:32 pm by jamie »
The only true wisdom is knowing you know nothing

Kays

  • Hero Member
  • *****
  • Posts: 569
  • Whasup!?
    • KaiBurghardt.de
Re: Turn off cursor
« Reply #2 on: February 05, 2018, 02:12:26 am »
Depending on what you're using, to name a few:
  • nCRT.nCursor(cOFF)
  • ncurses.curs_set(0) (low-level routine)
  • video.setCursorType(crHidden)
But they all have in common, that they require some refresh in order to show an effect.
Yours Sincerely
Kai Burghardt

furious programming

  • Hero Member
  • *****
  • Posts: 852
Re: Turn off cursor
« Reply #3 on: February 05, 2018, 05:32:50 am »
@nugax: you can use Crt.CursorOff and Crt.CursorOn – it works.
Lazarus 3.2 with FPC 3.2.2, Windows 10 — all 64-bit

Working solo on an acrade, action/adventure game in retro style (pixelart), programming the engine and shell from scratch, using Free Pascal and SDL. Release planned in 2026.

 

TinyPortal © 2005-2018