Formatting Dialog Screen

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
vista200
Posts: 13
Joined: Wed Mar 19, 2008 7:55 am

Formatting Dialog Screen

Post by vista200 »

Hey there!

It's me again with a simple problem:

I'm used to use the ShowMessageDialog-Function from the SDK. But now I want to format my message. What I mean is how to align text at, for example ":".

When I do the following:

Code: Select all

sprintf(buffer, "ID:\t%i\nName:\t%s", id, name);
ShowMessageDialog(buffer, 0);
it's easily printed out as without the"\t".

Are there any non-documented Escape-Strings? It is shown in the NetDialog, that it works. Even when it's Sony's code.

Can you help me?

Thanks in advance,
vista200[/code]
User avatar
jean
Posts: 489
Joined: Sat Jan 05, 2008 2:44 am

Post by jean »

Don't really understand your question, but \t should stand for [tabulation], hence the rest. Sprintf is IDENTICAL to printf, except that it doesn't print out formatted string on console, but stores it into buffer specified in the first parameter(beware of overflows!!). So in the second line you have a normal string, nothing more than a sequence of chars. Maybe PSP dialog doesn't care of tabulations, so you should convert it in an adequate number of spaces. So much with it, search yourself some function doing this non PSP-related task or wait for some PSP-dialogs guru to explain dialogs behavior more indeep.

jean
vista200
Posts: 13
Joined: Wed Mar 19, 2008 7:55 am

Thanks!

Post by vista200 »

Hello again!

What I mean is the NetDialog. When selecting an AP, there shows up a message like "Connecting to AP...." and next to this Message you can find the Connection name and the AP name. <= This is what I mean.

But you're right, I didn't think of the (s)printf-behaviour. I will try to solve this with spaces...

Thanks so far!
vista200
Post Reply