Jump to content
Korean Random
Sign in to follow this  
scyorkie

tabstops in statisticForm

Recommended Posts

So I was tinkering with the player name displays, and wanted to try giving {{name}} and {{clan}} their own columns in PP and SF.

 

I managed to get my playersPanel to look like this: http://i.imgur.com/Wub4LTf.jpg

 

Then I wanted to achieve a similar effect in statisticForm with the "formatLeftNick" and "formatRightNick" fields.

The left side was easily achieved with tabstops, and the result looked like this: http://i.imgur.com/MuC9TAJ.jpg 

 

This was how I did it: 

 

"formatLeftNick": "<textformat tabstops='[79]'>{{xvm-stat?<img src='xvm://res/icons/flags/{{flag|default}}.png' width='16' height='13' vspace='-2'> <img src='xvm://res/icons/xvm/xvm-user-{{xvm-user}}.png'> }}<font size='12' alpha='#A0'>{{clan}}</font>{{clan?<font> </font>}}<tab><font size='12'>{{xvm-stat?{{name%.10s~..}}|{{name}}}}</font></textformat>",

 

However, I couldn't do it with the same method in "formatRightNick".

 

Any ideas?

 

Update: Images also attached to post.

post-37651-0-77090100-1495778792_thumb.jpg

post-37651-0-42571800-1495778794_thumb.jpg

Edited by scyorkie

Share this post


Link to post

Short link
Share on other sites

Just attach shots here on forum. More comfortable for fast look

 

did you try to set more pixels here
 

 

 "<textformat tabstops='[79]'>{

 

?


also it may be needed to use

flag  - "-" for left align 

{{name%-10.10s~..}}
Edited by vlad_cs_sr

Share this post


Link to post

Short link
Share on other sites

Have tried both, and also multiple tabstops, eg:

 

"formatRightNick": "<textformat tabstops='[79,0]'><tab><font size='12'>{{xvm-stat?{{name%.10s~..}}|{{name}}}}</font><tab>{{clan?<font> </font>}}<font size='12' alpha='#A0'>{{clan}}</font>{{xvm-stat? <img src='xvm://res/icons/xvm/xvm-user-{{xvm-user}}.png'> <img src='xvm://res/icons/flags/{{flag|default}}.png' width='16' height='13' vspace='-2'>}}</textformat>",

 

None of them helps with breaking "formatRightNick" into more columns.

Share this post


Link to post

Short link
Share on other sites

I wouldn't call them cumulative -- they don't add up -- but yes they are (in the cases I've seen) incremental.

"formatLeftNick" is easy since the text goes from left to right, and the reference point for tabstops is at the left edge of the field.

However, for "formatRightNick", I can't figure out where the reference point is, and that's why I tried 79,0.

Trust me I've also tried 0,79 100,200 and even negative values (those crash the client) etc.

 

----- ----- -----

 

Update: I figured out a different method:

 

"formatLeftNick": "{{xvm-stat?<img src='xvm://res/icons/flags/{{flag|default}}.png' width='16' height='13' vspace='-2'> <img src='xvm://res/icons/xvm/xvm-user-{{xvm-user}}.png'> }}<font size='12' face='Consolas' alpha='#A0'>{{clannb%5s}}</font> <font size='12'>{{xvm-stat?{{name%.10s~..}}|{{name}}}}</font>",


"formatRightNick": "<font size='12'>{{xvm-stat?{{name%.10s~..}}|{{name}}}}</font> <font size='12' face='Consolas' alpha='#A0'>{{clannb%-5s}}</font>{{xvm-stat? <img src='xvm://res/icons/xvm/xvm-user-{{xvm-user}}.png'> <img src='xvm://res/icons/flags/{{flag|default}}.png' width='16' height='13' vspace='-2'>}}",

 

This is the result: http://i.imgur.com/THWy5TE.jpg 

 

However, there are limitations:

(i) Only {{clannb}} works; {{clan}} doesn't. If I use {{clan%7s}} (to account for the extra [ ] brackets), the player names without clans will get misaligned: http://i.imgur.com/LxIaH45.jpg

(ii) The right side gets misaligned if XVM stats are disabled: http://i.imgur.com/n6LJeNY.jpg

 

Any idea how to deal with situation (ii) above? This is related to my posts in this thread.

Edited by scyorkie

Share this post


Link to post

Short link
Share on other sites

I wouldn't call them cumulative -- they don't add up -- but yes they are (in the cases I've seen) incremental.

 

You are correct with that, incremental is a much better word.  :)

Share this post


Link to post

Short link
Share on other sites

For "formatRightNick" I would try replacing {{clannb%-5s}} with {{clannb%-5s|     }}      i.e. putting in 5 spaces if clan does not exist.

 

If this works then you can use {{clan}} but then need to use 7 spaces to account for the missing [    ]  round the clan name.

 

 

I haven't tried this as I do not show clans in my player panels, but I might try a solution in my Statistic Form where I do show them.

 

Just a suggestion

Share this post


Link to post

Short link
Share on other sites

Using {{clan?{{clan%7s}}|       }} does resolve issue (i). This is the result: http://i.imgur.com/1JE6XXU.jpg

 

However, issue (ii) remains.

- This is the result when XVM stats are disabled: http://i.imgur.com/UmQJc8s.jpg

- This is so even if I reduce "formatRightNick" to just this:

 

"formatRightNick": "<font size='12'>{{xvm-stat?{{name%.10s~..}}|{{name}}}}</font> <font size='12' face='Consolas' alpha='#A0'>{{clan?{{clan%-7s}}|       }}</font>",

Edited by scyorkie

Share this post


Link to post

Short link
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...