Jump to content
Korean Random

Отображение активных резервов в ангаре и в бою. (XVM)


Recommended Posts

Собрал конфиг с рамками для бустеров. Теперь возник вопрос, как убрать отображение пустых ячеек?

boosters.png.42130e0e411370c161c40dab7a74454b.png

{
 "def": {
	/** Тень текстовых полей. */
    "textFieldShadow": { "enabled": true, "distance": 0, "angle": 0, "color": "0x000000", "alpha": 70, "blur": 4, "strength": 2 }
   },
  "boosterName": {
    "enabled": true,
    "layer": "normal",
    "type": "extrafield",	
    "formats": [
      { "updateEvent": "ON_EVERY_SECOND",
		// Горизонтальное выравнивание поля на экране ("left", "center", "right").
        "screenHAlign": "left",
        "x": 380,
        "y": 132,
        "width": 200,
        "height": 60,
        "alpha": 75,
        "textFormat": {  "color": "0xF9F1BC", "bold": "true", "size": 15},
        "format": "<textformat tabstops='[0]'>{{py:bst.leftTimeMin(0)?<img src='img://gui/maps/icons/library/info.png' width='22' height='22' vspace='-6'> <u>Личные резервы</u>}}</textformat>" 
      }	  
    ]
  },
  "boosterBg": {
    "enabled": true,
    "layer": "normal",
    "type": "extrafield",	
    "formats": [
      { "updateEvent": "ON_EVERY_SECOND",
        "screenHAlign": "left",
        "x": 380,
        "y": 155,
        "width": 400,
        "height": 65,
        "alpha": 75,
        "textFormat": {  "color": "0xF9F1BC" },
        "format": "<textformat tabstops='[0]'>{{py:bst.leftTimeMin(0)?<img src='img://gui/maps/icons/premacc/dashboard/header/personalSlot/active.png' width='60' height='60' vspace='0'>}}  {{py:bst.leftTimeMin(0)?<img src='img://gui/maps/icons/premacc/dashboard/header/personalSlot/active.png' width='60' height='60' vspace='0'>}}  {{py:bst.leftTimeMin(0)?<img src='img://gui/maps/icons/premacc/dashboard/header/personalSlot/active.png' width='60' height='60' vspace='0'>}}</textformat>"
      }	  
    ]
  },
  "booster": {
    "enabled": true,
    "layer": "normal",
    "type": "extrafield",	
    "formats": [
      { "updateEvent": "ON_EVERY_SECOND",
        "screenHAlign": "left",
        "x": 380,
        "y": 155,
        "width": 400,
        "height": 65,
        "alpha": 75,
        "textFormat": {  "color": "0xF9F1BC" },
        "format": "<textformat tabstops='[0]'>{{py:bst.leftTimeMin(1)>1?{{py:bst.name(1)}}|<img src='img://gui/maps/icons/boosters/{{py:bst.type(1)}}_medium.png' width='60' height='60' vspace='0'>}}  {{py:bst.leftTimeMin(2)>1?{{py:bst.name(2)}}|<img src='img://gui/maps/icons/boosters/{{py:bst.type(2)}}_medium.png' width='60' height='60' vspace='0'>}}  {{py:bst.leftTimeMin(3)>1?{{py:bst.name(3)}}|<img src='img://gui/maps/icons/boosters/{{py:bst.type(3)}}_medium.png' width='60' height='60' vspace='0'>}}</textformat>"		
      }	  
    ]
  },
  "boosterTime": {
    "enabled": true,
    "layer": "normal",
    "type": "extrafield",	
    "formats": [
      { "updateEvent": "ON_EVERY_SECOND",
        "screenHAlign": "left",
        "x": 390,
        "y": 215,
        "width": 400,
        "height": 60,
        "alpha": 75,
        "textFormat": {  "color": "0xF9F1BC", "bold": "true", "size": 15},
        "format": "<textformat tabstops='[68,137]' leading='-9'><font color='{{py:bst.leftTimeMin(1)<11?#FFB841|}}'>{{py:bst.leftTimeHrMin(1)}}</font><tab><font color='{{py:bst.leftTimeMin(2)<11?#FFB841|}}'>{{py:bst.leftTimeHrMin(2)}}</font><tab><font color='{{py:bst.leftTimeMin(3)<11?#FFB841|}}'>{{py:bst.leftTimeHrMin(3)}}</font></textformat>"
		
      }	  
    ]
  },
  // Клановые резервы название
  "boosterCRName": {
    "enabled": true,
    "layer": "normal",
    "type": "extrafield",	
    "formats": [
      { "updateEvent": "ON_EVERY_SECOND",
        "screenHAlign": "left",
        "x": 380,
        "y": 235,
        "width": 500,
        "height": 120,
        "alpha": 75,
        "textFormat": {  "color": "0xF9F1BC", "bold": "true", "size": 15},
        "format": "<textformat tabstops='[0]'>{{py:bst.leftTimeMinCR(0)?<img src='img://gui/maps/icons/library/info.png' width='22' height='22' vspace='-6'> <u>Клановые резервы</u>}}</textformat>"
      }	  
    ]
  },
  "boosterCRBg": {
    "enabled": true,
    "layer": "normal",
    "type": "extrafield",	
    "formats": [
      { "updateEvent": "ON_EVERY_SECOND",
        "screenHAlign": "left",
        "x": 380,
        "y": 258,
        "width": 400,
        "height": 65,
        "alpha": 75,
        "textFormat": {  "color": "0xF9F1BC" },
        "format": "<textformat tabstops='[0]'>{{py:bst.leftTimeMinCR(0)?<img src='img://gui/maps/icons/premacc/dashboard/header/clanSlot/active.png' width='60' height='60' vspace='0'>}}  {{py:bst.leftTimeMinCR(0)?<img src='img://gui/maps/icons/premacc/dashboard/header/clanSlot/active.png' width='60' height='60' vspace='0'>}}</textformat>"
      }	  
    ]
  },
  "boosterCR": {
    "enabled": true,
    "layer": "normal",
    "type": "extrafield",	
    "formats": [
      { "updateEvent": "ON_EVERY_SECOND",
        "screenHAlign": "left",
        "x": 380,
        "y": 258,
        "width": 400,
        "height": 65,
        "alpha": 75,
        "textFormat": {  "color": "0xF9F1BC" },
        "format": "<textformat tabstops='[0]'>{{py:bst.leftTimeMinCR(1)>1?{{py:bst.nameCR(1)}}|<img src='img://gui/maps/icons/boosters/{{py:bst.typeCR(1)}}_medium.png' width='60' height='60' vspace='0'>}}  {{py:bst.leftTimeMinCR(2)>1?{{py:bst.nameCR(2)}}|<img src='img://gui/maps/icons/boosters/{{py:bst.typeCR(2)}}_medium.png' width='60' height='60' vspace='0'>}}</textformat>"		
      }	  
    ]
  },
  "boosterTimeCR": {
    "enabled": true,
    "layer": "normal",
    "type": "extrafield",	
    "formats": [
      { "updateEvent": "ON_EVERY_SECOND",
        "screenHAlign": "left",
        "x": 390,
        "y": 317,
        "width": 400,
        "height": 60,
        "alpha": 75,
        "textFormat": {  "color": "0xF9F1BC", "bold": "true", "size": 15},
        "format": "<textformat tabstops='[68]' leading='-9'><font color='{{py:bst.leftTimeMinCR(1)<11?#FFB841|}}'>{{py:bst.leftTimeHrMinCR(1)}}</font><tab><font color='{{py:bst.leftTimeMinCR(2)<11?#FFB841|}}'>{{py:bst.leftTimeHrMinCR(2)}}</font></textformat>"
      }	  
    ]
  }
}

 

Edited by Wild_RNB
  • Upvote 1
Link to comment
Short link
Share on other sites

@ktulho Просто скопировал из "boosterName", так не отображает рамку без резервов. Или надо сделать так же как в "bosster"? Как должно быть?

Edited by Wild_RNB
Link to comment
Short link
Share on other sites

18 часов назад, Wild_RNB сказал:

Собрал конфиг с рамками для бустеров. Теперь возник вопрос, как убрать отображение пустых ячеек?

boosters.png.42130e0e411370c161c40dab7a74454b.png


{
 "def": {
	/** Тень текстовых полей. */
    "textFieldShadow": { "enabled": true, "distance": 0, "angle": 0, "color": "0x000000", "alpha": 70, "blur": 4, "strength": 2 }
   },
  "boosterName": {
    "enabled": true,
    "layer": "normal",
    "type": "extrafield",	
    "formats": [
      { "updateEvent": "ON_EVERY_SECOND",
		// Горизонтальное выравнивание поля на экране ("left", "center", "right").
        "screenHAlign": "left",
        "x": 380,
        "y": 132,
        "width": 200,
        "height": 60,
        "alpha": 75,
        "textFormat": {  "color": "0xF9F1BC", "bold": "true", "size": 15},
        "format": "<textformat tabstops='[0]'>{{py:bst.leftTimeMin(0)?<img src='img://gui/maps/icons/library/info.png' width='22' height='22' vspace='-6'> <u>Личные резервы</u>}}</textformat>" 
      }	  
    ]
  },
  "boosterBg": {
    "enabled": true,
    "layer": "normal",
    "type": "extrafield",	
    "formats": [
      { "updateEvent": "ON_EVERY_SECOND",
        "screenHAlign": "left",
        "x": 380,
        "y": 155,
        "width": 400,
        "height": 65,
        "alpha": 75,
        "textFormat": {  "color": "0xF9F1BC" },
        "format": "<textformat tabstops='[0]'>{{py:bst.leftTimeMin(0)?<img src='img://gui/maps/icons/premacc/dashboard/header/personalSlot/active.png' width='60' height='60' vspace='0'>}}  {{py:bst.leftTimeMin(0)?<img src='img://gui/maps/icons/premacc/dashboard/header/personalSlot/active.png' width='60' height='60' vspace='0'>}}  {{py:bst.leftTimeMin(0)?<img src='img://gui/maps/icons/premacc/dashboard/header/personalSlot/active.png' width='60' height='60' vspace='0'>}}</textformat>"
      }	  
    ]
  },
  "booster": {
    "enabled": true,
    "layer": "normal",
    "type": "extrafield",	
    "formats": [
      { "updateEvent": "ON_EVERY_SECOND",
        "screenHAlign": "left",
        "x": 380,
        "y": 155,
        "width": 400,
        "height": 65,
        "alpha": 75,
        "textFormat": {  "color": "0xF9F1BC" },
        "format": "<textformat tabstops='[0]'>{{py:bst.leftTimeMin(1)>1?{{py:bst.name(1)}}|<img src='img://gui/maps/icons/boosters/{{py:bst.type(1)}}_medium.png' width='60' height='60' vspace='0'>}}  {{py:bst.leftTimeMin(2)>1?{{py:bst.name(2)}}|<img src='img://gui/maps/icons/boosters/{{py:bst.type(2)}}_medium.png' width='60' height='60' vspace='0'>}}  {{py:bst.leftTimeMin(3)>1?{{py:bst.name(3)}}|<img src='img://gui/maps/icons/boosters/{{py:bst.type(3)}}_medium.png' width='60' height='60' vspace='0'>}}</textformat>"		
      }	  
    ]
  },
  "boosterTime": {
    "enabled": true,
    "layer": "normal",
    "type": "extrafield",	
    "formats": [
      { "updateEvent": "ON_EVERY_SECOND",
        "screenHAlign": "left",
        "x": 390,
        "y": 215,
        "width": 400,
        "height": 60,
        "alpha": 75,
        "textFormat": {  "color": "0xF9F1BC", "bold": "true", "size": 15},
        "format": "<textformat tabstops='[68,137]' leading='-9'><font color='{{py:bst.leftTimeMin(1)<11?#FFB841|}}'>{{py:bst.leftTimeHrMin(1)}}</font><tab><font color='{{py:bst.leftTimeMin(2)<11?#FFB841|}}'>{{py:bst.leftTimeHrMin(2)}}</font><tab><font color='{{py:bst.leftTimeMin(3)<11?#FFB841|}}'>{{py:bst.leftTimeHrMin(3)}}</font></textformat>"
		
      }	  
    ]
  },
  // Клановые резервы название
  "boosterCRName": {
    "enabled": true,
    "layer": "normal",
    "type": "extrafield",	
    "formats": [
      { "updateEvent": "ON_EVERY_SECOND",
        "screenHAlign": "left",
        "x": 380,
        "y": 235,
        "width": 500,
        "height": 120,
        "alpha": 75,
        "textFormat": {  "color": "0xF9F1BC", "bold": "true", "size": 15},
        "format": "<textformat tabstops='[0]'>{{py:bst.leftTimeMinCR(0)?<img src='img://gui/maps/icons/library/info.png' width='22' height='22' vspace='-6'> <u>Клановые резервы</u>}}</textformat>"
      }	  
    ]
  },
  "boosterCRBg": {
    "enabled": true,
    "layer": "normal",
    "type": "extrafield",	
    "formats": [
      { "updateEvent": "ON_EVERY_SECOND",
        "screenHAlign": "left",
        "x": 380,
        "y": 258,
        "width": 400,
        "height": 65,
        "alpha": 75,
        "textFormat": {  "color": "0xF9F1BC" },
        "format": "<textformat tabstops='[0]'>{{py:bst.leftTimeMinCR(0)?<img src='img://gui/maps/icons/premacc/dashboard/header/clanSlot/active.png' width='60' height='60' vspace='0'>}}  {{py:bst.leftTimeMinCR(0)?<img src='img://gui/maps/icons/premacc/dashboard/header/clanSlot/active.png' width='60' height='60' vspace='0'>}}</textformat>"
      }	  
    ]
  },
  "boosterCR": {
    "enabled": true,
    "layer": "normal",
    "type": "extrafield",	
    "formats": [
      { "updateEvent": "ON_EVERY_SECOND",
        "screenHAlign": "left",
        "x": 380,
        "y": 258,
        "width": 400,
        "height": 65,
        "alpha": 75,
        "textFormat": {  "color": "0xF9F1BC" },
        "format": "<textformat tabstops='[0]'>{{py:bst.leftTimeMinCR(1)>1?{{py:bst.nameCR(1)}}|<img src='img://gui/maps/icons/boosters/{{py:bst.typeCR(1)}}_medium.png' width='60' height='60' vspace='0'>}}  {{py:bst.leftTimeMinCR(2)>1?{{py:bst.nameCR(2)}}|<img src='img://gui/maps/icons/boosters/{{py:bst.typeCR(2)}}_medium.png' width='60' height='60' vspace='0'>}}</textformat>"		
      }	  
    ]
  },
  "boosterTimeCR": {
    "enabled": true,
    "layer": "normal",
    "type": "extrafield",	
    "formats": [
      { "updateEvent": "ON_EVERY_SECOND",
        "screenHAlign": "left",
        "x": 390,
        "y": 317,
        "width": 400,
        "height": 60,
        "alpha": 75,
        "textFormat": {  "color": "0xF9F1BC", "bold": "true", "size": 15},
        "format": "<textformat tabstops='[68]' leading='-9'><font color='{{py:bst.leftTimeMinCR(1)<11?#FFB841|}}'>{{py:bst.leftTimeHrMinCR(1)}}</font><tab><font color='{{py:bst.leftTimeMinCR(2)<11?#FFB841|}}'>{{py:bst.leftTimeHrMinCR(2)}}</font></textformat>"
      }	  
    ]
  }
}

 

 

could u upload all files needed for this, please?

Link to comment
Short link
Share on other sites

can someone help?

this is if only clan reserves: https://i.imgur.com/JEl1RcZ.jpg

this 1 personal reserves:https://i.imgur.com/eG4ZFS3.jpg

this 2 personal reserves:https://i.imgur.com/sVlRrzQ.jpg

this 3 personal reserves:https://i.imgur.com/z6M3L7H.jpg

 

only all reserves is ok , time no moving if only clan reserves run...

green color=clan reserves.

 

widgetsTemplates.xc

xvm.log

python.log

xvm.zip

Link to comment
Short link
Share on other sites

ktulho,Саш,можешь проверить скриптик,хочу убрать приставку 0ч когда меньше часа остается,а проверять самому почти что не на чем,бустов почти не осталось,реплей тут не подходит...Основа отсюда и нормально работает.В общем,помоги если не трудно:Default:

 

boosters.py

  • Upvote 1
Link to comment
Short link
Share on other sites

1 час назад, ktulho сказал:

@Slava7572 вроде нормально.

Спасибо Саш:great:

В кое то веке с первого раза вышло.

 

06786f19d774.jpg 

 

Кому такой вариант больше по душе,то качаем из предыдущего сообщения.

Edited by Slava7572
  • Upvote 1
Link to comment
Short link
Share on other sites

1 час назад, AtotIK сказал:

Ребята, а можно привязать лейбл в бою к правым ушам?

Чтобы он изменял положение в зависимости от размера ушей?

Link to comment
Short link
Share on other sites

15 часов назад, ktulho сказал:

Чтобы он изменял положение в зависимости от размера ушей?

Думал да, но там блок прекрасно залез в промежуток между ушами и часами.

"x": "{{{{py:sub({{py:xvm.screenWidth}},225)}}}}",

Вот таким образом сделал в итоге.

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