Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
admonius
Newbie


Joined: 12 Jul 2001
Posts: 9
Location: USA

PostPosted: Mon Jan 12, 2004 9:10 am   

Status Window spacing
 
I am using my status window to show what available spells I have the SP to cast. It has a short spell name then the number of times I can cast it before running out of SP. It looks like this...
Code:

CLW  - 234 | Heal  - 35
CMiW - 123 | GHeal - 15
CSW  - 67  | LPH   - 34
CMaW - 34  | GPH   - 14

The issue I'm having is that when the numbers are dropping from triple to double or double to single, the formatting of the window gets out of align, and ends up looking something similar to this...
Code:

CLW  - 123 | Heal  - 35
CMiW - 12 | GHeal - 15
CSW  - 6  | LPH   - 34
CMaW - 34  | GPH   - 14

I currently have the settings typed like this...
Code:

CLW" " - @clwc  | Heal" " - @healc
CMiW"" - @cmiwc | GHeal"" - @ghealc
CSW" " - @cswc  | LPH"  " - @lphc
CMaW"" - @cmawc | GPH"  " - @gphc

Is there anyway to maintain the spacing?
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon Jan 12, 2004 10:51 am   
 
Add additional spaces or leading zeros.

One fairly simple method:
%if( @clwc < 100, " ")%if( @clwc < 10, " ")@clwc
NOTE: The (lack of) spacing is intentional

If you prefer zeros, use 0 in place of " ". If you prefer to left-align the numbers and add trailing spaces, put the variable in front.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Tue Jan 13, 2004 4:06 am   
 
Use the %format function.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
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

© 2009 Zugg Software. Hosted by Wolfpaw.net