Jump to content
Korean Random
Sign in to follow this  
Dado_Ze

nick field width

Recommended Posts

Hello,

 

I there a way/macro to get actual nick field width in ears.

When i understand correctly the nick field width is dynamically changed depending of longest nick in team list, correct me please when I'm wrong...

 

 

I wanted to make HP bars that width are till end of nick field, but because the width of nick field is not always same, it's apparently not proportional on left and right ears,

....and it differs from battle to battle.

I know that I could limit nick characters, but I would like to know is there way to get the actual width without limiting the nick...

Share this post


Link to post

Short link
Share on other sites

Here is a example where the HP bars appears not proportional.

 

post-8168-0-83810900-1462363881.png

 

My idea/question was to get actual width of nick field and add a value so HP bars appears everytime proportional..

 

My actual config for HP bars in playersPanel.xc / extraFields

 

"extraFieldsLeft": [
{ "x": 2, "y": 22, "valign": "center", "w": 111, "h": 2, "bgColor": "0xffffff", "alpha": "{{alive?75|0}}" },
{ "x": 2, "y": 22, "valign": "center", "w": "{{hp-ratio:111}}", "h": 2, "bgColor": "0x149612", "alpha": "{{alive?100|0}}" }
],
"extraFieldsRight": [
 { "x": 2, "y": 22, "valign": "center", "w": 111, "h": 2, "bgColor": "0xffffff", "alpha": "{{alive?75|0}}" },
 { "x": 2, "y": 22, "valign": "center", "w": "{{hp-ratio:111}}", "h": 2, "bgColor": "0xdc0f00", "alpha": "{{alive?100|0}}" },
${"enemySpottedMarker"}
]

 

but it would looks much better/proportional with a way like...

 

"extraFieldsLeft": [
{ "x": 2, "y": 22, "valign": "center", "w": {{nickFieldLeft width+xx}} , "h": 2, "bgColor": "0xffffff", "alpha": "{{alive?75|0}}" },
{ "x": 2, "y": 22, "valign": "center", "w": "{{hp-ratio:nickFieldLeft width+xx}}", "h": 2, "bgColor": "0x149612", "alpha": "{{alive?100|0}}" }
],
"extraFieldsRight": [
{ "x": 2, "y": 22, "valign": "center", "w": {{nickFieldRight width+xx}}, "h": 2, "bgColor": "0xffffff", "alpha": "{{alive?75|0}}" },
{ "x": 2, "y": 22, "valign": "center", "w": "{{hp-ratio:nickFieldRight width+xx}}", "h": 2, "bgColor": "0xdc0f00", "alpha": "{{alive?100|0}}" },
${"enemySpottedMarker"}
]

 

I hope my way of describing the problem and possibilities is enough understandable

Edited by nemesisx

Share this post


Link to post

Short link
Share on other sites

You can use "playersPanel"/"<mode>"/"width" option to set minimum field width, and panels will not be shorter even if all nicks are short. Different scale for left and right panels are not looks like a good idea.

Edited by sirmax

Share this post


Link to post

Short link
Share on other sites

I totally agree with You, but what I don't like is, the nick field is already not proportional (left/right) and dynamic...

Anyway thank You for time and help

Edited by nemesisx

Share this post


Link to post

Short link
Share on other sites

There are no problem with different size of nicks, but it's worst for hp lines. If you don't like different size of nicks, just increase "width" parameter.

Share this post


Link to post

Short link
Share on other sites

After some experimenting i found a ideal solution...

post-8168-0-72761800-1462545155_thumb.png

 

...and i tryed to experiment with shadow's on HP lines, but without success....

Its just invisible on that field, or I do something wrong, or the HP lines are to tiny, or shadows are not supported on non text field...

When they are supported, can someone please make a example for shadow's on HP lines....

 

 

One more question to not open a new topic...

What is the correct way to call integrated xvm font through configs in that 2 cases....

 

"<font face='xvm' </font>"

 

"font": {
   "name": "XVMSymbol",

   ...

}

Share this post


Link to post

Short link
Share on other sites

xvm not XVMSymbol

 

That means the first example is correct and the second should be...

 

"font": {

   "name": "xvm",

   ...

}

Share this post


Link to post

Short link
Share on other sites

Here the screenshot after i applied the shadow, but the shadow its not to see....

post-8168-0-77395700-1462628240.png

 

and here is my config used for screenshot...

{ "x": -85, "y": 23, "bindToIcon": true, "w": 1, "h": -21, "bgColor": "0xffffff", "alpha": "{{alive?75|20}}",
      "shadow": {
        "distance": 0,
        "angle":    0,
        "color":    "0x000000",
        "alpha":    0.75,
        "blur":     2,
        "strength": 8
      }
    },

 

I tryed to get it like dark shadow outlined around the HP bar.But what ever I do with the values of shadow, shadow are not shown....

btw I'm using xvm night build 5468...

 

Could it be.... that there is nothing on what the shadow should be applied, no character, no image ....just background color?

Edited by nemesisx

Share this post


Link to post

Short link
Share on other sites

I've just tested it and indeed it doesn't work. So maybe it's actually not supposed to work after all. Though I thought it should, according to what it's said in the description of extra fields in the default playersPanel.xc file. Maybe I misinterpreted it...

Edited by konrad509

Share this post


Link to post

Short link
Share on other sites

It could be, but im not sure, need to test it....background color is not a object, and the shadow is supposed to be applied on a object and not on a "empty space" with just background color...

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...