from gui.shared.tooltips import vehicle, tankman, skill, shell, module, achievement, cybersport, common, contexts, battle_consumable, potapovquests, tutorial, fortifications, clans, boosters from gui.Scaleform.daapi.view.lobby.customization.tooltips import BonusTooltip as CustomizationBonusTooltip from gui.Scaleform.daapi.view.lobby.customization.tooltips import ElementTooltip as CustomizationElementTooltip, QuestElementTooltip as CustomizationQuestElementTooltip from gui.Scaleform.genConsts.TOOLTIPS_CONSTANTS import TOOLTIPS_CONSTANTS from gui.shared.tooltips.filter import VehicleFilterTooltip TOOLTIPS = {TOOLTIPS_CONSTANTS.TANKMAN: {'tooltip': TOOLTIPS_CONSTANTS.TANKMEN_UI, 'method': lambda invID, isCurrentVehicle = None: tankman.TankmanTooltipData(contexts.TankmanHangarContext()).buildToolTip(invID), 'complex': None}, TOOLTIPS_CONSTANTS.TANKMAN_SKILL: {'tooltip': TOOLTIPS_CONSTANTS.TANKMEN_SKILL_UI, 'method': skill.SkillTooltipData(contexts.PersonalCaseContext(fieldsToExclude=('count',))).buildToolTip, 'complex': None}, TOOLTIPS_CONSTANTS.TANKMAN_NEW_SKILL: {'tooltip': TOOLTIPS_CONSTANTS.TANKMEN_BUY_SKILL_UI, 'method': skill.BuySkillTooltipData(contexts.NewSkillContext()).buildToolTip, 'complex': lambda tooltipData: tooltipData['count'] > 1 or tooltipData['level'] > 0}, TOOLTIPS_CONSTANTS.BATTLE_STATS_ACHIEVS: {'tooltip': TOOLTIPS_CONSTANTS.ACHIEVEMENT_UI, 'method': achievement.AchievementTooltipData(contexts.BattleResultContext()).buildToolTip, 'complex': None}, TOOLTIPS_CONSTANTS.ACHIEVEMENT: {'tooltip': TOOLTIPS_CONSTANTS.ACHIEVEMENT_UI, 'method': achievement.AchievementTooltipData(contexts.ProfileContext()).buildToolTip, 'complex': None}, TOOLTIPS_CONSTANTS.MARKS_ON_GUN_ACHIEVEMENT: {'tooltip': TOOLTIPS_CONSTANTS.MARKS_ON_GUN_UI, 'method': achievement.AchievementTooltipData(contexts.ProfileContext()).buildToolTip, 'complex': None}, TOOLTIPS_CONSTANTS.BATTLE_STATS_MARKS_ON_GUN_ACHIEVEMENT: {'tooltip': TOOLTIPS_CONSTANTS.MARKS_ON_GUN_UI, 'method': achievement.AchievementTooltipData(contexts.BattleResultMarksOnGunContext()).buildToolTip, 'complex': None}, TOOLTIPS_CONSTANTS.GLOBAL_RATING: {'tooltip': TOOLTIPS_CONSTANTS.ACHIEVEMENT_UI, 'method': achievement.GlobalRatingTooltipData(contexts.ProfileContext()).buildToolTip, 'complex': None}, 'achievementAttr': {'tooltip': TOOLTIPS_CONSTANTS.ACHIEVEMENT_UI, 'method': None,
}, TOOLTIPS_CONSTANTS.TANKMAN_NEW_SKILL: { 'tooltip': TOOLTIPS_CONSTANTS.TANKMEN_BUY_SKILL_UI, 'method': skill.BuySkillTooltipData(contexts.NewSkillContext()).buildToolTip, 'complex': lambda tooltipData: tooltipData['count'] > 1 or tooltipData['level'] > 0 }, TOOLTIPS_CONSTANTS.BATTLE_STATS_ACHIEVS: { 'tooltip': TOOLTIPS_CONSTANTS.ACHIEVEMENT_UI, 'method': achievement.AchievementTooltipData( contexts.BattleResultContext()).buildToolTip, 'complex': None }, TOOLTIPS_CONSTANTS.ACHIEVEMENT: { 'tooltip': TOOLTIPS_CONSTANTS.ACHIEVEMENT_UI, 'method': achievement.AchievementTooltipData( contexts.ProfileContext()).buildToolTip, 'complex': None }, TOOLTIPS_CONSTANTS.MARKS_ON_GUN_ACHIEVEMENT: { 'tooltip': TOOLTIPS_CONSTANTS.MARKS_ON_GUN_UI, 'method': achievement.AchievementTooltipData( contexts.ProfileContext()).buildToolTip, 'complex': None },
def getTooltipBuilders(): return (builders.DataBuilder(TOOLTIPS_CONSTANTS.BATTLE_STATS_ACHIEVS, TOOLTIPS_CONSTANTS.ACHIEVEMENT_UI, achievement.AchievementTooltipData(contexts.BattleResultContext())), builders.DataBuilder(TOOLTIPS_CONSTANTS.BATTLE_STATS_MARKS_ON_GUN_ACHIEVEMENT, TOOLTIPS_CONSTANTS.MARKS_ON_GUN_UI, achievement.AchievementTooltipData(contexts.BattleResultMarksOnGunContext())), builders.DataBuilder(TOOLTIPS_CONSTANTS.ACHIEVEMENT, TOOLTIPS_CONSTANTS.ACHIEVEMENT_UI, achievement.AchievementTooltipData(contexts.ProfileContext())), builders.DataBuilder(TOOLTIPS_CONSTANTS.MARKS_ON_GUN_ACHIEVEMENT, TOOLTIPS_CONSTANTS.MARKS_ON_GUN_UI, achievement.AchievementTooltipData(contexts.ProfileContext())), builders.DataBuilder(TOOLTIPS_CONSTANTS.GLOBAL_RATING, TOOLTIPS_CONSTANTS.ACHIEVEMENT_UI, achievement.GlobalRatingTooltipData(contexts.ProfileContext())), builders.DataBuilder(TOOLTIPS_CONSTANTS.MARK_OF_MASTERY, TOOLTIPS_CONSTANTS.MARK_OF_MASTERY_UI, achievement.AchievementTooltipData(contexts.BattleResultMarkOfMasteryContext(fieldsToExclude=('showCondSeparator',)))), builders.SimpleBuilder('achievementAttr', TOOLTIPS_CONSTANTS.ACHIEVEMENT_UI))