curses.setsyx()?

L

linkmaster032000

I tried curses.setsyx(2,3) in my script and it doesn't move the curses
cursor. Any alternatives/solutions?
 
T

Tim Roberts

I tried curses.setsyx(2,3) in my script and it doesn't move the curses
cursor. Any alternatives/solutions?

Did you call doupdate after? setsyx just manipulates the data structures.
It takes a call to doupdate to force those changes to take effect visually.
 
L

linkmaster032000

Did you call doupdate after?  setsyx just manipulates the data structures.
It takes a call to doupdate to force those changes to take effect visually.

I added it and it still doesn't work. This is what I'm doing when I
want to display the cursor and prepare it for input at 2,3:

curses.echo()
curses.curs_set(1)
curses.setsyx(2,3)
curses.doupdate()
 
L

linkmaster032000

I added it and it still doesn't work. This is what I'm doing when I
want to display the cursor and prepare it for input at 2,3:

curses.echo()
curses.curs_set(1)
curses.setsyx(2,3)
curses.doupdate()

Any idea what's wrong?
 
T

Tim Roberts

Of course it does. It moves the cursor, then does an update, then
immediately calls draw.game, which redraws the screen and moves the cursor.
If you want curses.setsyx (or the equivalent and more mnemonic scr.move) to
leave the cursor somewhere, you can't draw more text afterward.
 
L

linkmaster032000

Of course it does.  It moves the cursor, then does an update, then
immediately calls draw.game, which redraws the screen and moves the cursor.
If you want curses.setsyx (or the equivalent and more mnemonic scr.move) to
leave the cursor somewhere, you can't draw more text afterward.

OH!!!! Thank you!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top