AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   The text with \R in menu. (https://forums.alliedmods.net/showthread.php?t=163182)

GarbageBox 07-27-2011 14:17

The text with \R in menu.
 
I noticed that the text with \R in menu cannot keep tidy.
How to make it become tidy?

bibu 07-27-2011 14:25

Re: The text with \R in menu.
 
This would just allign the text to the right.

GarbageBox 07-27-2011 14:30

Re: The text with \R in menu.
 
Therefore, it cannot tidy up the words?
Are there have any other ways to let the text go to right?
Also, I had some trouble with the voteban menu.
The player name who above on the admin the key will disable.
Code:

                iKeys |= (1 << iCurrPos++);
                if(get_user_flags(iPlayer) & ADMIN_IMMUNITY)
                {
                        iKeys++
                        iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\d%d. %s (%d%%)\R\w%s^n", iCurrPos, szName, get_percent(g_iVotes[iPlayer], g_iNum), szAuthID);
                }
                else
                {
                        iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\w%d. %s \d(\r%d%%\d)\R\w%s^n", iCurrPos, szName, get_percent(g_iVotes[iPlayer], g_iNum), szAuthID);
                }


fysiks 07-27-2011 17:40

Re: The text with \R in menu.
 
1. What do you mean by "tidy"?
2. Menus are limited in their ability to format text.
3. It's because you are using iKeys for bits then you do a ++ on it (adding 1). You should not do both. Look at the original ban menu to see how it is done in plmenu.sma.

hornet 07-27-2011 22:49

Re: The text with \R in menu.
 
Quote:

Originally Posted by GarbageBox (Post 1519804)
Therefore, it cannot tidy up the words?
Are there have any other ways to let the text go to right?

I don't think it's actually possible to do it in a tidy way, alligning overlaps and overspaces some characters.

Here's a nice long discussion about this and why it can't be done in CS.
https://forums.alliedmods.net/showthread.php?t=150659


All times are GMT -4. The time now is 00:55.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.