forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Formatting Dialog Screen

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
vista200



Joined: 19 Mar 2008
Posts: 13

PostPosted: Tue Jul 01, 2008 1:04 am    Post subject: Formatting Dialog Screen Reply with quote

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
View user's profile Send private message Send e-mail MSN Messenger
jean



Joined: 05 Jan 2008
Posts: 489

PostPosted: Tue Jul 01, 2008 1:20 am    Post subject: Reply with quote

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
View user's profile Send private message
vista200



Joined: 19 Mar 2008
Posts: 13

PostPosted: Tue Jul 01, 2008 1:52 am    Post subject: Thanks! Reply with quote

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
View user's profile Send private message Send e-mail MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
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