Commit 8095dcb0 authored by Ktulho's avatar Ktulho 👶🏻

fix "hangar"/"filters". Added options: show/hide "Elite Vehicle" and "Premium Vehicle" filters.

parent ca6141a1
......@@ -59,7 +59,9 @@
// false - скрыть фильтр.
"params": { "enabled": true }, // main params / основные параметры
"bonus": { "enabled": true }, // x2 bonus / x2 бонус
"favorite": { "enabled": true } // favorite tanks / основные танки
"favorite": { "enabled": true }, // favorite tanks / основные танки
"elite": { "enabled": true }, // elite tanks / элитные танки
"premium": { "enabled": true } // premium tanks / премиум танки
},
// Spacing between filters cells.
// Отступ между ячейками фильтров.
......
......@@ -3,6 +3,10 @@
* Renamed options in the "hangar"/"equipmentPanel" section:
"showNumberEquipment" -> "showConsumablesCount"
"showNumberDirectives" -> "showDirectivesCount"
* The functionality in the "hangar"/"filters" section has been restored.
* Added options:
Please register or sign in to reply
"hangar"/"filters"/"elite"/"enabled" - show/hide "Elite Vehicle" filter
"hangar"/"filters"/"premium"/"enabled" - show/hide "Premium Vehicle" filter
XVM-8.1.7:
[GENERAL]
......
......@@ -3,6 +3,10 @@
* Переименованы опции в секции "hangar"/"equipmentPanel":
"showNumberEquipment" -> "showConsumablesCount"
"showNumberDirectives" -> "showDirectivesCount"
* Восстановлена работа параметров в секции "hangar"/"filters"
* Добавлены опции:
"hangar"/"filters"/"elite"/"enabled" - показывать/скрыть фильтр "Элитная техника"
"hangar"/"filters"/"premium"/"enabled" - показывать/скрыть фильтр "Премиум техника"
XVM-8.1.7:
[ОБЩЕЕ]
......
......@@ -25,6 +25,7 @@ from gui.Scaleform.daapi.view.dialogs import SimpleDialogMeta, I18nConfirmDialog
from gui.Scaleform.daapi.view.lobby.hangar.Hangar import Hangar
import gui.Scaleform.daapi.view.lobby.hangar.hangar_cm_handlers as hangar_cm_handlers
from gui.Scaleform.daapi.view.lobby.hangar.carousels.basic.carousel_data_provider import CarouselDataProvider, HangarCarouselDataProvider, _SUPPLY_ITEMS
from gui.Scaleform.daapi.view.lobby.hangar.carousels.basic.tank_carousel import TankCarousel
from gui.Scaleform.daapi.view.common.vehicle_carousel import carousel_data_provider
from helpers import dependency
from skeletons.gui.shared import IItemsCache
......@@ -221,6 +222,12 @@ def _carousel_data_provider_isLockedBackground(base, vState, vStateLvl):
return False
return base(vState, vStateLvl)
# filter visibility
@registerEvent(TankCarousel, '__init__')
def _TankCarousel__init__(self):
_usedFilters = tuple(_filter for _filter in self._usedFilters if config.get('hangar/carousel/filters/{}/enabled'.format(_filter), True))
self._usedFilters = _usedFilters
#####################################################################
# internal
......
......@@ -174,17 +174,12 @@ package com.xvm.lobby.ui.tankcarousel
// config: "filters"
private function setupFilters():void
{
// TODO: broken, is required?
/*
vehicleFilters.validateNow();
if (!cfg.filters.params.enabled)
resetFiltersS();
if (!cfg.filters.bonus.enabled)
vehicleFilters.bonusFilter.selected = false;
if (!cfg.filters.favorite.enabled)
vehicleFilters.favoriteFilter.selected = false;
call_setVehiclesFilter();
*/
{
this.vehicleFilters.listHotFilter.height += vehicleFilters.paramsFilter.height;
this.vehicleFilters.listHotFilter.y = vehicleFilters.paramsFilter.y;
vehicleFilters.paramsFilter.visible = false;
}
}
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment