Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 03-02-2013, 05:35 PM
NatedogEZ's Avatar
NatedogEZ
Developer
 
Join Date: Dec 2012
Posts: 515
Default Quest Popup

Is there a way to vertically align things inside the quest::popup window?

I have all the stats from my leaderboard reporting to my popup window.. but I have no idea how to make it look nice and aligned.

Anyone have an idea?

Something like this


Name HP Mana Class Level

and everything below will align with the first letter of the Header.
Reply With Quote
  #2  
Old 03-02-2013, 05:54 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

You can use an HTML table.

E.g. I use this code to line up the 'Y's under the corresponding guild rank numbers:

Code:
                string Body;

                Body += "<br>Ranks: ";

                char Temp[100];

                for(int i = 1; i <= GUILD_MAX_RANK; ++i)
                {
                        sprintf(Temp, "%i = %s", i, guild_mgr.GetRankName(c->GuildID(), i));
                        Body += Temp;

                        if(i != GUILD_MAX_RANK)
                                Body += ", ";

                }

                Body += "<br><br><TABLE>";
                Body += "<TR><TD> <TD>1<TD>2<TD>3<TD>4<TD>5<TD>6<TD>7<TD>8<TD>";

                for(int i = 1; i <= GUILD_PERMISSION_MAX; ++i)
                {
                        sprintf(Temp, "%2i. ", i);
                        Body += "<TR><TD>";
                        Body += Temp;
                        Body += guild_mgr.GetPermissionName(i);
                        Body += "<TD>";

                        for(int j = 1; j <= GUILD_MAX_RANK; ++j)
                        {
                                if(guild_mgr.CheckPermission(c->GuildID(), j, i))
                                        Body += "Y";

                                Body += "<TD>";
                        }
                }
                Body += "</table><br>The following characters have the old Guild Banker flag:<br>";

                c->SendWindow(1,2, 0, "OK", "OK", 0, 2, c, "Title", Body.c_str());
Reply With Quote
  #3  
Old 03-02-2013, 08:20 PM
NatedogEZ's Avatar
NatedogEZ
Developer
 
Join Date: Dec 2012
Posts: 515
Default

Do I need anything special inside my perl to get this to work properly?
Reply With Quote
  #4  
Old 03-02-2013, 10:26 PM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,743
Default

That code doesn't use Perl at all, it's just constructing data in C++ and sending it direct to the client. You could construct the same data in Perl and send it to the client with the questmanager::popup function.

Last edited by lerxst2112; 03-02-2013 at 10:28 PM.. Reason: Found the popup function I was looking for.
Reply With Quote
  #5  
Old 03-02-2013, 10:34 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default

Quote:
Originally Posted by NatedogEZ View Post
Do I need anything special inside my perl to get this to work properly?
Natedog, look up constructing HTML Tables and try it inside your quest::popup body arguement.
Reply With Quote
  #6  
Old 03-02-2013, 11:31 PM
NatedogEZ's Avatar
NatedogEZ
Developer
 
Join Date: Dec 2012
Posts: 515
Default

Wow I slack... thanks for the tip Akkadius I got it working thank you lol.. was easier than I was trying to make it
Reply With Quote
  #7  
Old 03-03-2013, 12:03 AM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default

Quote:
Originally Posted by NatedogEZ View Post
Wow I slack... thanks for the tip Akkadius I got it working thank you lol.. was easier than I was trying to make it
Glad I can help
Reply With Quote
  #8  
Old 04-15-2013, 09:01 AM
thepoetwarrior
Discordant
 
Join Date: Aug 2007
Posts: 307
Default

Any reason a really big $variable or @array will not work in popup window?

For example, leaderboards npc, query database limit 10, info in popup window works just fine, but change limit 15 and nothing happens, no info.

max size pass to popup window or something?

I verified the $variable or @array was fine by write() to file, so that wasn't the issue.
Reply With Quote
  #9  
Old 04-15-2013, 12:53 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

The max size is around 4000 bytes. The server checks for anything bigger than that and discards the whole thing because the max the client will accept is 4000ish.
Reply With Quote
  #10  
Old 04-15-2013, 08:06 PM
thepoetwarrior
Discordant
 
Join Date: Aug 2007
Posts: 307
Default

Thanks, at least now I know why I was having issues.

Was searching all over Google for answers and no solution :(
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 10:42 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3