Jump to content
Korean Random
Sign in to follow this  
locorebelde

Carousel in color

Recommended Posts

Sorry for my ignorance, awkwardness, but for all that I say I can not put it in colors. I have the default configuration of xvm as follows:

'config'

/**
* Normal carousel cells settings
* Настройки ячеек карусели обычного размера
*/
{
// Definitions
// Шаблоны
"def": {
// Text fields shadow.
// Тень текстовых полей.
"textFieldShadow": { "enabled": true, "color": "0x000000", "alpha": 80, "blur": 2, "strength": 2, "distance": 0, "angle": 0 }
},
{
"classColor": "{{v.type={{l10n:LT}}?0x00EE00|{{v.type={{l10n:MT}}?0x00B4FF|{{v.type={{l10n:HT}}?0xFE0E00|{{v.type={{l10n:TD}}?0xAE42F3|0xFF00FF}}}}}}}}"
},
"normal": {
// Cell width
// Ширина ячейки
"width": 160,
// Cell height
// Высота ячейки
"height": 100,
// Spacing between carousel cells.
// Отступ между ячейками карусели.
"gap": 10,
// Standard cell elements.
// Стандартные элементы ячеек.
"fields": {
// "enabled" - the visibility of the element / видимость элемента
// "dx" - horizontal shift / смещение по горизонтали
// "dy" - vertical shift / смещение по вертикали
// "alpha" - transparency / прозрачность
// "scale" - scale / масштаб
//
// Nation flag.
// Флаг нации.
"flag": { "enabled": true, "dx": 0, "dy": 0, "alpha": 100, "scale": 1 },
// Vehicle icon.
// Иконка танка.
"tankIcon": { "enabled": true, "dx": 0, "dy": 0, "alpha": 100, "scale": 1 },
// Vehicle class icon.
// Иконка типа техники.
"tankType": { "enabled": true, "dx": 0, "dy": 0, "alpha": 100, "scale": 1 },
// Vehicle level.
// Уровень техники
"level": { "enabled": true, "dx": 0, "dy": 0, "alpha": 100, "scale": 1 },
// Double XP icon
// Иконка не сбитого опыта за первую победу в день.
"xp": { "enabled": true, "dx": 0, "dy": 0, "alpha": 100, "scale": 1 },
// Vehicle name.
// Название танка.
"tankName": { "enabled": true, "dx": 0, "dy": 0, "alpha": 100, "scale": 1 },
// Vehicle rent info text.
// Инфо текст аренды танка.
"rentInfo": { "enabled": true, "dx": 0, "dy": 0, "alpha": 100, "scale": 1 },
// Info text (Crew incomplete, Repairs required)
// Инфо текст (Неполный экипаж, Требуется ремонт).
"info": { "enabled": true, "dx": 0, "dy": 0, "alpha": 100, "scale": 1 },
// Info text for "Buy vehicle" and "Buy slot" slots.
// Инфо текст для слотов "Купить машину" и "Купить слот".
"infoBuy": { "enabled": true, "dx": 0, "dy": 0, "alpha": 100, "scale": 1 },
// Clan lock timer
// Таймер блокировки танка
"clanLock": { "enabled": true, "dx": 0, "dy": 0, "alpha": 100 },
// Price
// Цена
"price": { "enabled": true, "dx": 0, "dy": 0, "alpha": 100 },
// Action price
// Акционная цена
"actionPrice": { "enabled": true, "dx": 0, "dy": 0, "alpha": 100 },
// Favorite vehicle mark
// Маркер основной техники
"favorite": { "enabled": true, "dx": 0, "dy": 0, "alpha": 100 },
// Stats field that appears on the mouse hover
// Поле статистики, отображаемое при наведении мыши
"stats": { "enabled": true, "dx": 0, "dy": 0, "alpha": 100 }
},
// Extra cell fields (extended format supported, see extra-field.txt).
// Дополнительные поля ячеек (поддерживается расширенный формат, см. extra-field.txt).
"extraFields": [
// Slot background
// Подложка слота
{ "x": 1, "y": 1, "layer": "substrate", "width": 160, "height": 100, "bgColor": "0x0A0A0A" },
// Average damage
{ "x": 1, "y": 1, "h": 84, "w": "135", "bgColor": ${"def.classColor"}, "alpha": "{{v.selected?50|15}}", "layer": "bottom" },
// Средний урон
{
"enabled": true,
"x": 1, "y": 28, "width": 18, "height": 18, "alpha": "{{v.tdb?|0}}",
"src": "xvm://res/icons/carousel/damage.png"
},
{
"enabled": true,
"x": 17, "y": 28,
"format": "{{v.tdb%d}}",
"shadow": ${ "def.textFieldShadow" }
},
// Sign of mastery
// Знак мастерства
{
"enabled": true,
"x": 1, "y": 12, "width": 23, "height": 23,
"src": "img://gui/maps/icons/library/proficiency/class_icons_{{v.mastery}}.png"
},
// Battles count
// Количество боёв
{
"enabled": true,
"x": 158, "y": 17, "align": "right", "width": 13, "height": 13, "alpha": "{{v.battles?|0}}",
"src": "xvm://res/icons/carousel/battles.png"
},
{
"enabled": true,
"x": 145, "y": 14, "align": "right",
"format": "{{v.battles}}",
"shadow": ${ "def.textFieldShadow" }
},
// Winrate
// Процент побед
{
"enabled": true,
"x": 158, "y": 32, "align": "right", "width": 13, "height": 13, "alpha": "{{v.winrate?|0}}",
"src": "xvm://res/icons/carousel/wins.png"
},
{
"enabled": true,
"x": 145, "y": 28, "align": "right",
"format": "{{v.winrate%2d~%}}",
"shadow": ${ "def.textFieldShadow" }
}
]
}
}

Share this post


Link to post

Short link
Share on other sites

Well,well,well, Thank you, thank you very much,I used the configuration of the carousel H_E_K_P_O_M_A_H_T_, and I wanted to add the colors for the type of tank and finally got thanks to you:

0YeAYui.jpg

Here the configuration:

'config'

/**
* Настройки ячеек карусели обычного размера.
* Конфиг: H_E_K_P_O_M_A_H_T_ and SCYORKIE and Vlad_cs_sr
*/
{
"def": {
/** Параметры тени текстовых полей. */
"textFieldShadow": { "enabled": true, "color": "0x000000", "alpha": 90, "blur": 4, "strength": 1 },
/** Подложка слота. */
"substrate": {
"x": 0, "y": 0, "width": 162, "height": 102, "layer": "substrate",
"src": "cfg://default/img/carousel/{{v.selected?substrateSelected|{{v.elite?{{v.premium?substratePremium|substrateElite}}|substrate}}}}.png"
},
/** Рамка слота. */
"frame": {
"x": 0, "y": 0, "width": 162, "height": 102, "layer": "top",
"src": "cfg://default/img/carousel/{{v.selected?selected|{{v.premium?premium|normal}}}}.png"
},
/** Иконка типа техники. */
"type": {
"x": 126, "y": 72, "width": 35, "height": 30, "layer": "top",
"src": "cfg://default/img/carousel/type/{{v.elite?elite-{{v.c_type}}|{{v.c_type}}}}.png"
},
/** Отличительные отметки. */
"marksOnGun": {
"x": 96, "y": 59, "layer": "top",
"src": "cfg://default/img/carousel/marksOnGun/{{v.marksOnGun}}.png"
},
/** Знак мастерства. */
"mastery": {
"x": 135, "y": 60, "width": 24, "height": 24, "layer": "top",
"src": "cfg://default/img/carousel/mastery/{{v.mastery}}.png"
},
/** Флаг нации. */
"nation": {
"x": 3, "y": 3, "width": 33, "height": 26, "layer": "top",
"src": "cfg://default/img/carousel/nation/{{v.nation}}.png"
},
/** Название танка. */
"name": {
"x": "{{v.elite?133|140}}", "y": 78, "layer": "top", "align": "right",
"textFormat": { "font": "$FieldFont", "size": 15, "color": "{{v.premium?#FEA659|#C8C8B5}}" },
"format": "{{v.name}}",
"shadow": { "color": "{{v.premium?0xFC3700|0x73734C}}", "alpha": "{{v.premium?|80}}", "blur": "{{v.premium?10|6}}", "strength": 2 }
},
/** Кол.-во боёв на танке. */
"battles": {
"x": 159, "y": 0, "layer": "top", "align": "right",
"textFormat": { "font": "$FieldFont", "size": 12, "color": "0xB3B3A0", "bold": true },
"format": "{{v.battles}}",
"shadow": ${"def.textFieldShadow"}
},
/** Уровень танка/боёв. */
"level": {
"x": 35, "y": 0, "layer": "top",
"textFormat": { "font": "$FieldFont", "size": 12, "color": "0x65655A", "bold": true },
"format": "{{v.level%02s}} <{{v.battletiermin}}-{{v.battletiermax}}>",
"shadow": ${"def.textFieldShadow"}
},
/** Потанковый рейтинг хТЕ. */
"хТЕ": {
"x": 35, "y": 12, "layer": "top", "alpha": 80,
"textFormat": { "font": "$FieldFont", "size": 12, "color": "0x7E7E71", "bold": true },
"format": "{{v.xte%02s}} {{v.xte?xTE}}",
"shadow": ${"def.textFieldShadow"}
},
/** Процент превосходства среднего урона для получения отметок (маркер). */
"damageRatingMark": {
"x": 103, "y": 48, "width": 56, "height": 14, "layer": "top", "alpha": "{{v.selected?{{v.c_damageRating?|0}}|0}}",
"src": "cfg://default/img/carousel/marksOnGun/rating-{{v.marksOnGun}}.png"
},
/** Процент превосходства среднего урона для получения отметок. */
"damageRating": {
"x": 117, "y": 46, "layer": "top", "alpha": "{{v.selected?{{v.c_damageRating?80|0}}|0}}",
"textFormat": { "font": "$FieldFont", "size": 12, "color": "{{v.c_damageRating}}", "bold": true },
"format": "{{v.damageRating%0.1f}}",
"shadow": ${"def.textFieldShadow"}
},
/** Средний урон. */
"tdb": {
"x": 0, "y": 26, "layer": "top", "alpha": "{{v.selected?{{v.tdb?80|0}}|0}}",
"textFormat": { "font": "$FieldFont", "size": 12, "color": "{{v.c_tdb|#B3B3A0}}", "bold": true },
"format": "•{{v.tdb%d}}",
"shadow": ${"def.textFieldShadow"}
},
/** Опыт, необходимый для элитного танка. */
"xpToEliteLeft": {
"x": 3, "y": 81, "layer": "top", "alpha": "{{v.selected?{{v.xpToEliteLeft?|0}}|0}}",
"textFormat": { "font": "$FieldFont", "size": 11, "color": "C8C8B5", "bold": true },
"format": "{{v.xpToEliteLeft%'d}}",
"shadow": ${"def.textFieldShadow"}
},
/** % Побед на танке. */
"winrate": {
"x": 0, "y": 38, "layer": "top", "alpha": "{{v.selected?{{v.winrate?80|0}}|0}}",
"textFormat": { "font": "$FieldFont", "size": 12, "color": "{{v.c_winrate|#B3B3A0}}", "bold": true },
"format": "•{{v.winrate%2d~%}}",
"shadow": ${"def.textFieldShadow"}
},
"classColor": "{{v.type={{l10n:LT}}?0x00EE00|{{v.type={{l10n:MT}}?0x00B4FF|{{v.type={{l10n:HT}}?0xFE0E00|{{v.type={{l10n:TD}}?0xAE42F3|0x00EE00}}}}}}}}"
},
"normal": {
"width": 160, "height": 100, "gap": 5,
/** Стандартные элементы ячеек. */
"fields": {
"flag": {"enabled": false},
"tankType": {"enabled": false},
"level": {"enabled": false},
"tankName": {"enabled": false},
"favorite": {"enabled": false},
"stats": {"enabled": false},
"tankIcon": {"enabled": true, "dx": 0, "dy": 0, "alpha": 100, "scale": 1},
"xp": {"enabled": true, "dx": 0, "dy": 12, "alpha": 100, "scale": 1},
"rentInfo": {"enabled": true, "dx": 0, "dy": 0, "alpha": 100, "scale": 1},
"info": {"enabled": true, "dx": 15, "dy": -14, "alpha": 100, "scale": 1},
"infoBuy": {"enabled": true, "dx": 0, "dy": 0, "alpha": 100, "scale": 1},
"clanLock": {"enabled": true, "dx": 0, "dy": 0, "alpha": 100},
"price": {"enabled": true, "dx": 0, "dy": 0, "alpha": 100},
"actionPrice": {"enabled": true, "dx": 0, "dy": 0, "alpha": 100}
},
/** Дополнительные поля ячеек. */
"extraFields": [
{ "x": 1, "y": 73, "h": 27, "w": "160", "bgColor": ${"def.classColor"}, "alpha": "{{v.selected?0|15}}", "layer": "bottom" }, // http://i.imgur.com/x5iCmGY.jpg
{ "x": 1, "y": 73, "h": 27, "w": "160", "bgColor": "0x000000", "alpha": "{{v.selected?75|0}}" },
${"def.substrate"},
${"def.frame"},
${"def.type"},
${"def.marksOnGun"},
${"def.mastery"},
${"def.nation"},
${"def.name"},
${"def.battles"},
${"def.damageRatingMark"},
${"def.damageRating"},
${"def.tdb"},
${"def.winrate"},
${"def.level"},
${"def.хТЕ"},
${"def.xpToEliteLeft"},
${"def.xpToEliteLeft"}
]
}
}
Edited by locorebelde

Share this post


Link to post

Short link
Share on other sites
{{v.type={{l10n:LT}}?0x00EE00|{{v.type={{l10n:MT}}?0x00B4FF|{{v.type={{l10n:HT}}?0xFE0E00|{{v.type={{l10n:TD}}?0xAE42F3|0xFF00FF}}}}}}}}

 

 suggestion should fix the problem

 

that should fit for multilingual config, because the macro takes type name from localization file

Share this post


Link to post

Short link
Share on other sites

Does v.type={{l10n:LT}}? or v.type=LT? etc no longer work?

 

I just went back to try what I posted above, and my macros don't produce the intended results anymore.

 

Update: Nvm it's my own fault -- the macro relies on texts.xc and I forgot that I had edited mine.

Edited by scyorkie

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.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...