Jump to content
Korean Random

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

Link to comment
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
Link to comment
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
Link to comment
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
Link to comment
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",

   ...

}

Link to comment
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
Link to comment
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
Link to comment
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...

Link to comment
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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...