 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
vista200
Joined: 19 Mar 2008 Posts: 13
|
Posted: Tue Jul 01, 2008 1:04 am Post subject: Formatting Dialog Screen |
|
|
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: | 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] |
|
| Back to top |
|
 |
jean

Joined: 05 Jan 2008 Posts: 489
|
Posted: Tue Jul 01, 2008 1:20 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
vista200
Joined: 19 Mar 2008 Posts: 13
|
Posted: Tue Jul 01, 2008 1:52 am Post subject: Thanks! |
|
|
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 |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|