TornadoCat Posted August 19, 2016 Share Posted August 19, 2016 (edited) @sirmax, не мог бы кое чего проверить ? Дело в том, что мой код маленько стал странно себя вести после релиза 6.4.2 . Строка: "textFormat": { "font": "mono", "size": 11, "align": "center", "color": "0xD9D9D9", "bold": true }, "format": "{{alive?{{hp%4d|----}}/{{hp-max%-4d}}| 0/{{hp-max%-4d}}}}" Раньше с этим кодом всё идеально равнялось по центру, теперь же происходит нечто странное . В общем, сам скрин . Если убрать в форматировании выравнивание влево, то столбцы идут ровно, если же вернуть "-", то макрос выравнивается влево, но не как раньше, а смещает всё это хозяйство ровно на пол символа . Если же "аlign" исключить из строки, то слева всё становится на места, но справа же слетает к херам собачьим . Ещё на 6.4.1.1 было вот так (под катом): Не подскажешь, в чём тут дело ? Edited August 19, 2016 by Tornado_Odan_Rot @ Quote Link to comment Short link Share on other sites More sharing options...
sirmax Posted August 20, 2016 Share Posted August 20, 2016 полный формат поля дай @ Quote Link to comment Short link Share on other sites More sharing options...
TornadoCat Posted August 20, 2016 Author Share Posted August 20, 2016 @sirmax, вот такая связка "hpAmount": { // кол-во ХП цифрами "bindToIcon": true, "hotKeyCode": 56, "onHold": "true", "visibleOnHotKey": true, "x": "{{ally?120|130}}", "y": 5, "alpha": "{{alive?100|30}}", "width": 60, "textFormat": { "font": "mono", "size": 11, "align": "center", "color": "0xD9D9D9", "bold": true }, "shadow": { "enabled": true, "blur": 4, "strength": 1 }, "format": "{{alive?{{hp%4d|----}}/{{hp-max%-4d}}| 0/{{hp-max%-4d}}}}" }, "hpBg": { // подложка "bindToIcon": true, "hotKeyCode": 56, "onHold": "true", "visibleOnHotKey": true, "x": "{{ally?84|94}}", "alpha": 35, "bgColor": "0x000000", "y": 7, "height": 14, "width": 72 }, "hpLine": { // полоска ХП "bindToIcon": true, "hotKeyCode": 56, "onHold": "true", "visibleOnHotKey": true, "x": "{{ally?85|95}}", "y": 8, "alpha": "{{alive?55|0}}", "bgColor": "{{player?0xFFDD33|{{c:system}}}}", "height": 12, "width": "{{hp-ratio:70}}" }, вообще странно: ставьшь align: center - съезжает всё на пол символа в описанной ситуёвине, убираешь align: center - слева всё в порядке, справа всё по зло3,14дорному съезжает уже на 1 целый символ вправо ... бред какой-то @ Quote Link to comment Short link Share on other sites More sharing options...
sirmax Posted August 20, 2016 Share Posted August 20, 2016 Проверил, на 6.4.1.1. все точно так же. Причина в том, что последний пробел съедается, но это и раньше так было. Чтобы не съедались, добавь в конце, и в начале, чтобы компенсировать выравнивание: "format": " {{alive?{{hp%4d|----}}/{{hp-max%-4d}}| 0/{{hp-max%-4d}}}} " @ Quote Link to comment Short link Share on other sites More sharing options...
TornadoCat Posted August 20, 2016 Author Share Posted August 20, 2016 (edited) @sirmax, постараюсь сейчас .Спасибо за рецепт победы . UPD. спасибо, Макс, как по маслицу .Лучший ! Edited August 20, 2016 by Tornado_Odan_Rot @ Quote Link to comment Short link Share on other sites More sharing options...
Recommended Posts
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.