Jump to content
Korean Random
Kotyarko_O

infoPanel средствами XVM.

Recommended Posts

 В infoPanel.xc прописал скобки как в архиве так они  инфопанель не сработала убрал две скобки заработало

'Так работает'

{
  "infoPanel": {
    "delay": 5,
"altKey": 56,
"formats":  [
" {{vehicle_name}}
<br/>Перезарядка:  <font color = '#00FBFF'size='15' >{{gun_reload_equip}}</font> сек
<br/>Обзор:  <font color = '#9D00FF' size='15'>{{vision_radius}}</font> м"
  ] 
  }
}

 

'Как в архиве не работает'

{
  "infoPanel": {
    "delay": 5,
"altKey": 56,
"format": [
      { 
" {{vehicle_name}}
<br/>Перезарядка:  <font color = '#00FBFF'size='15' >{{gun_reload_equip}}</font> сек
<br/>Обзор:  <font color = '#9D00FF' size='15'>{{vision_radius}}</font> м"
   }
    ]
  }
}
Edited by _bes_1

Share this post


Link to post

Short link
Share on other sites

 

 

В infoPanel.xc прописал скобки как в архиве так они  инфопанель не сработала
потому что для массива (нескольких полей) надо поменять еще и

 

параметр "formats" (бывш. "format")

Share this post


Link to post

Short link
Share on other sites
Как в архиве не работает

Да, скобки я туда лупанул лишними. А ведь в туторе написал всё правильно =)

Обновил шапку, спасибо.

 

+ @Kapany3uk указал на ошибку у вас в конфиге. И если с "format" у вас работает, то вы не обновили скрипт.

Edited by Kotyarko_O

Share this post


Link to post

Short link
Share on other sites

 

 

Способа сделать удобнее не нашёл, но разобраться во всём этом вполне возможно =)

Спасибо! Буду пробовать. 

Share this post


Link to post

Short link
Share on other sites

Поделитесь вариантом конфига как на втором скриншоте, пожалуйста.

post-16412-0-73713500-1483477873.jpg

Share this post


Link to post

Short link
Share on other sites
Поделитесь вариантом конфига как на втором скриншоте, пожалуйста.

infoPanel.xc:

  "formats": [
    "<font color='#F0F0F0'><b>{{vehicle_name}}</b></font>
    <br/><textformat tabstops='[80]'><font color='#14AFF1'>{{gun_reload_equip}} сек.</font><tab><font color='#96CC29'>{{vision_radius}} м.</font></textformat>"
  ]

battleLabelsTemplates.xc:

 "infoPanel": {
   "enabled": true,
   "updateEvent": "PY(ON_INFO_PANEL)",
   "x": 0,
   "y": 150,
   "width": 200,
   "height": 100,
   "align": "center",
   "valign": "center",
   "screenHAlign": "center",
   "screenVAlign": "center",
   "shadow": { "enabled": true, "distance": 1, "angle": 90, "color": "0x000000", "alpha": 80, "blur": 5, "strength": 2 },
   "textFormat": { "font": "$TitleFont", "size": 15, "align": "center", "leading": -12 },
   "format": "{{py:infoPanelFormat}}"
 }

Edited by Kotyarko_O
  • Upvote 2

Share this post


Link to post

Short link
Share on other sites

 

 

Способа сделать удобнее не нашёл, но разобраться во всём этом вполне возможно =)
 

Можно тоже в шапку plz

Share this post


Link to post

Short link
Share on other sites

Two suggestions:

 

-localize the shell_type text

-add a macro for shell travel time to target (usefull for arty sights)

 

 

And a very minor issue:  plural of macro is macros, not macroses.

Edited by OlliN
  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

 

 

{{marks_on_gun}}
 
Добавил этот макрос в свой конфиг - работать перестало, убрал - работает,

Проверьте plz у кого нибудь повторяется? 

Share this post


Link to post

Short link
Share on other sites

Обновлено.

  • Локализация названий типов снарядов, через l10n-конфиги.
  • Исправлен макрос {{marks_on_gun}}.

Можно тоже в шапку plz

Добавил.

 

 

{{marks_on_gun}}

Добавил этот макрос в свой конфиг - работать перестало, убрал - работает,

Проверьте plz у кого нибудь повторяется?

 

Исправил, спасибо.

 

Two suggestions:

 

-localize the shell_type text

-add a macro for shell travel time to target (usefull for arty sights)

 

And a very minor issue:  plural of macro is macros, not macroses.

1) Done (l10n configs).

2) I`ll add, in the next time.

3) Fixed =)

Edited by Kotyarko_O
  • Upvote 2

Share this post


Link to post

Short link
Share on other sites

 

 

3) Fixed =)
 

Отлично, заработало как надо. Настроил, все как было еще в панели от Dellux, отдельное спасибо за возможность реализации нескольких "инфо-полей".  :thx:

Share this post


Link to post

Short link
Share on other sites

 

Отлично, заработало как надо. Настроил, все как было еще в панели от Dellux, отдельное спасибо за возможность реализации нескольких "инфо-полей".  :thx:

 

Привет! Конфигом не поделишься?

Share this post


Link to post

Short link
Share on other sites

@Kotyarko_O, так что, получится у тебя сделать то, что в первых постах я на пикчах постил ? У меня конфиг сохранился для инфопанели .
Уж хотелось бы её вернуть, а то из сборки изымать пришлось . Я даже заплачу за адаптацию, если нужно будет . Возьмёшься ?

Share this post


Link to post

Short link
Share on other sites
так что, получится у тебя сделать то, что в первых постах я на пикчах постил ? У меня конфиг сохранился для инфопанели .

Прикрепи конфиг.

Edited by Kotyarko_O

Share this post


Link to post

Short link
Share on other sites

@Tornado_Odan_Rot,

'battleLabelsTemplates.xc'

 "infoPanel0": {
   "enabled": true,
   "updateEvent": "PY(ON_INFO_PANEL)",
   "x": 200,
   "y": 100,
   "width": 200,
   "height": 200,
   "align": "center",
   "valign": "center",
   "screenHAlign": "center",
   "screenVAlign": "center",
   "shadow": { "enabled": true, "distance": 1, "angle": 90, "color": "0x000000", "alpha": 80, "blur": 5, "strength": 2 },
   "textFormat": { "align": "left", "leading": -10 },
   "format": "{{py:infoPanelFormat(0)}}"
 },
 "infoPanel1": {
   "enabled": true,
   "updateEvent": "PY(ON_INFO_PANEL)",
   "x": -50,
   "y": 50,
   "width": 200,
   "height": 200,
   "align": "center",
   "valign": "center",
   "screenHAlign": "center",
   "screenVAlign": "center",
   "shadow": { "enabled": true, "distance": 1, "angle": 90, "color": "0x000000", "alpha": 80, "blur": 5, "strength": 2 },
   "textFormat": { "align": "left", "leading": -10 },
   "format": "{{py:infoPanelFormat(1)}}"
 }

'battleLabels.xc'

 ${ "battleLabelsTemplates.xc":"def.infoPanel0" },
 ${ "battleLabelsTemplates.xc":"def.infoPanel1" }

'infoPanel.xc'

...
"formats": [
  "<font face='Cuprum' size='15'>{{vehicle_weight}}т</font>
   <br/><font face='Arial' size='14' color='#FF9900'>Б: {{armor_turret_front}}/{{armor_turret_side}}/{{armor_turret_back}}
   <br/>К: {{armor_hull_front}}/{{armor_hull_side}}/{{armor_hull_back}}</font>
   <br/><font face='Arial' size='12' color='#9FF781' alpha='90'>{{vehicle_name}}</font>",
  "<font face='Arial' size='15' color='#FF9900' alpha='85'>{{gun_reload_equip}} сек</font>
   <br/><font face='Arial' size='14' color='#9FF781' alpha='90'>{{vision_radius}} м</font>"
]

Координаты уже сам поправишь.
Выглядит так:
post-16412-0-13783500-1483827716_thumb.jpg

Edited by Kotyarko_O
  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

 

 

А превышение веса не реализовано пока что ?
Пока что)

Share this post


Link to post

Short link
Share on other sites

Привет! Конфигом не поделишься?

 

Я настраивал под свой ноут 1366х768, картинка примерно такая: 

post-11459-0-43956300-1483615164_thumb.png

 

Если оно надо, то вот:

'infoPanel.xc'

"formats": [
      "<p align='center'><font face='$FieldFont' size='14'><font color='#cbcab7'>{{vehicle_name}}</font> [ <font color='#ffcc66'>{{marks_on_gun}}</font> ]\n<textformat tabstops='[80,160]'><font color='#96ff00'><font face='xvm' size='15'>V</font> {{gun_reload_equip}}</font><tab><font color='#00bcff'><font face='xvm' size='15'>n</font> {{vision_radius}}</font><tab><font color='#f50800'><font face='xvm' size='15'>,</font> {{shell_damage_1}}</font></textformat></font></p>",
      "<img src='img://gui/maps/icons/vehicle/contour/{{icon_system_name}}.png'><p align='left'><font face='$FieldFont' size='12' color='#cbcab7'><tab> {{vehicle_weight}}т<tab> {{speed_forward}}км/ч \n<textformat tabstops='[85,100,135]'>Reload-Vision<tab>:<tab>{{gun_reload_equip}}<tab>{{vision_radius}}</font>\nPower-Damage<tab>:<tab>{{shell_power_1}}<tab>{{shell_damage_1}}\nTurret-Hull<tab>:<tab>{{armor_turret_front}}<tab>{{armor_hull_front}}</textformat></p></font>"
    ]

 

'battleLabelsTemplates.xc'

"infoPanel0": {
      "enabled": true,
      "updateEvent": "PY(ON_INFO_PANEL)",
      "x": 0,
      "y": 242,
      "width": 250,
      "height": 250,
      "align": "center",
      "valign": "center",
      "screenHAlign": "center",
      "screenVAlign": "center",
      "shadow": { "enabled": true, "distance": 0, "angle": 45, "color": "0x000000", "alpha": 80, "blur": 5, "strength": 6 },
      "textFormat": { "font": "$FieldFont", "size": 14, "color": "0xFCFCFC", "align": "center"},
      "format": "{{py:infoPanelFormat(0)}}"
    },
    "infoPanel1": {
      "enabled": true,
      "updateEvent": "PY(ON_INFO_PANEL)",
      "x": 280,
      "y": 181,
      "width": 250,
      "height": 250,
      "align": "center",
      "valign": "center",
      "screenHAlign": "left",
      "screenVAlign": "bottom",
      "shadow": { "enabled": true, "distance": 0, "angle": 45, "color": "0x000000", "alpha": 80, "blur": 5, "strength": 5 },
      "textFormat": { "font": "$FieldFont", "size": 14, "color": "0xFCFCFC", "align": "left", "leading": -6 },
      "format": "{{py:infoPanelFormat(1)}}"
    }

 

'battleLabels.xc'

${ "battleLabelsTemplates.xc":"def.infoPanel0" },
${ "battleLabelsTemplates.xc":"def.infoPanel1" }

Edited by refaol
  • Upvote 1

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.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...