API: Dynamic action bar

Discussion in 'Plugin Requests' started by Anrza, Jun 30, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    Anrza

    So I'd like to add stats to the action bar. I am currently using Action bar API.


    I want it to be like this:
    [stat1]x-----[stat2]x-----[message space]-----[stat3]x-----[stat4]x
    Imagine the '-' are spaces.
    Where [stat] is stuff like health, experience, et cetera.

    Let's say I have this:
    Health: 20-----Kills: 3-----Killed Steve!-----Deaths: 0-----Bags: 10
    And then something changes:
    Health: 0-----Kills: 3-----Killed by randomNoob!-----Deaths: 1-----Bags: 9
    That causes this shift:
    Health: 20-----Kills: 3-----Killed Steve!-----Deaths: 0-----Bags: 10
    Health: 0-----Kills: 3-----Killed by randomNoob!-----Deaths: 1-----Bags: 9

    Meaning it becomes a pain for the eyes to follow the stats, as the Deaths and Bags stats have moved two inches to the right.

    I'd like to make it align:
    Health: 20-----Kills: 3-------Killed Steve!-------Deaths: 0-----Bags: 10
    Health: 0------Kills: 3-Killed by randomNoob!-Deaths: 1-----Bags: 9
    Health: 20-----Kills: 3-------Respawned!--------Deaths: 1-----Bags: 9
    Health: 9------Kills:3------------------------------Deaths: 1------Bags: 20

    I realize I need to get character width and such. I'm wondering if anyone has tools/resources for this so I don't have to invent the wheel again.
     
  2. Offline

    timtower Administrator Administrator Moderator

    @Anrza That is pretty much impossible to do as different language settings use different fonts.
     
  3. Offline

    Anrza

    Doesn't affect it. If you send "A", the user receives "A" regardless of their language settings. If you send "π", the user receives "π". If you send "∏∑", ”∏∑" is received. Test it for yourself. People can send Cyrillic/Greek/Hebrew letters and you receive it. Not an uncommon sight on larger networks.
     
  4. Offline

    timtower Administrator Administrator Moderator

    But if they change the language settings on their client then the width will change, example:
    Somebody is doing something someday.
    Somebody is doing something someday.
     
  5. Offline

    Anrza

    True, they can Force Unicode Font: ON, but in that case it's their problem.
     
  6. Offline

    timtower Administrator Administrator Moderator

    Anrza likes this.
  7. Offline

    Anrza

Thread Status:
Not open for further replies.

Share This Page