scyorkie 50 Posted May 26, 2017 (edited) 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. Edited May 26, 2017 by scyorkie Quote Share this post Link to post Short link Share on other sites
vlad_cs_sr 1,575 #391875 Posted May 26, 2017 (edited) 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 May 26, 2017 by vlad_cs_sr Quote Share this post Link to post Short link Share on other sites
scyorkie 50 #391906 Posted May 26, 2017 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. Quote Share this post Link to post Short link Share on other sites
SRQFlyer 9 #391907 Posted May 26, 2017 Tabs are cumulative. <textformat tabstops='[30,60,110,200,240]'> This sets the tabs at 30, 60,110 and so on. Quote Share this post Link to post Short link Share on other sites
scyorkie 50 #391911 Posted May 26, 2017 (edited) 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 May 26, 2017 by scyorkie Quote Share this post Link to post Short link Share on other sites
SRQFlyer 9 #391942 Posted May 26, 2017 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. :) Quote Share this post Link to post Short link Share on other sites
David Cumming 8 #391964 Posted May 26, 2017 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 Quote Share this post Link to post Short link Share on other sites
scyorkie 50 #391979 Posted May 26, 2017 (edited) 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 May 26, 2017 by scyorkie Quote Share this post Link to post Short link Share on other sites