Newb question, how to display text at x y location

Post Reply
Wolfgange
Posts: 4
Joined: Mon Jul 08, 2013 1:31 pm

Newb question, how to display text at x y location

Post by Wolfgange » Mon Jul 08, 2013 1:35 pm

Does anyone know the simplest way to display consol text at the x y location of a variable? Currently I use iprintf("\x1b[9;9HRandom Text"); to show "Random Text" at 9,9. How can I display it at the location of variable lets say locationx and locationy?

mtheall
Posts: 211
Joined: Thu Feb 03, 2011 10:47 pm

Re: Newb question, how to display text at x y location

Post by mtheall » Tue Jul 16, 2013 3:32 pm

Well that's easy.

Code: Select all

iprintf("\x1b[%d;%dHRandom Text", locationx, locationy);
You may have to switch x and y. I don't remember which order it goes in.

dovoto
Developer
Posts: 43
Joined: Fri Aug 12, 2005 10:01 pm
Contact:

Re: Newb question, how to display text at x y location

Post by dovoto » Tue Aug 27, 2013 2:24 pm

You can also manipulate the conslol a bit more directly:

Code: Select all

PrintConsole* pc = consoleDemoInit();

pc->cursorX = 10;
pc->cursorY = 10;

iprintf("hi");
 
Here are some of the other things you can adjust: http://libnds.devkitpro.org/a00087.html

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 0 guests