EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Quest Popup (https://www.eqemulator.org/forums/showthread.php?t=36597)

NatedogEZ 03-02-2013 05:35 PM

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.

Derision 03-02-2013 05:54 PM

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());

http://www.rama.demon.co.uk/tabs.png

NatedogEZ 03-02-2013 08:20 PM

Do I need anything special inside my perl to get this to work properly?

lerxst2112 03-02-2013 10:26 PM

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.

Akkadius 03-02-2013 10:34 PM

Quote:

Originally Posted by NatedogEZ (Post 219132)
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.

NatedogEZ 03-02-2013 11:31 PM

Wow I slack... thanks for the tip Akkadius I got it working thank you lol.. was easier than I was trying to make it

Akkadius 03-03-2013 12:03 AM

Quote:

Originally Posted by NatedogEZ (Post 219145)
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

thepoetwarrior 04-15-2013 09:01 AM

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.

Derision 04-15-2013 12:53 PM

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.

thepoetwarrior 04-15-2013 08:06 PM

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

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


All times are GMT -4. The time now is 11:26 AM.

Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.