﻿from lib.game.ui.general import UIElement, Rect, load_ui_image

DISCONNECT_FROM_SERVER = UIElement(name='DISCONNECT_FROM_SERVER')
DISCONNECT_FROM_SERVER.description = "Disconnect from the server when you got disconnect notification in Coop mission."
DISCONNECT_FROM_SERVER.text_rect = Rect(0.3793571510266431, 0.4644641263244128, 0.6171311477566274, 0.5282693078368615)
DISCONNECT_FROM_SERVER.button_rect = Rect(0.47656035723701395, 0.7143677539148369, 0.5214233754879544, 0.7728558369679147)
DISCONNECT_FROM_SERVER.text = "Disconnected from the server."
DISCONNECT_FROM_SERVER.text_threshold = 175

DISCONNECT_NEW_OPPONENT = UIElement(name='DISCONNECT_NEW_OPPONENT')
DISCONNECT_NEW_OPPONENT.description = "Find new opponent button when you got disconnect notification in starting Coop mission."
DISCONNECT_NEW_OPPONENT.text_rect = Rect(0.5080926069935638, 0.6931522496630876, 0.6657387808373844, 0.7484886654841999)
DISCONNECT_NEW_OPPONENT.button_rect = Rect(0.5080926069935638, 0.6931522496630876, 0.6657387808373844, 0.7484886654841999)
DISCONNECT_NEW_OPPONENT.text = "Find new opponent"
DISCONNECT_NEW_OPPONENT.text_threshold = 150

KICKED_FROM_THE_SYSTEM = UIElement(name='KICKED_FROM_THE_SYSTEM')
KICKED_FROM_THE_SYSTEM.description = "Notification when you're kicked from the system."
KICKED_FROM_THE_SYSTEM.text_rect = Rect(0.3359375, 0.4425925925925926, 0.6614583333333334, 0.5138888888888888)
KICKED_FROM_THE_SYSTEM.button_rect = Rect(0.4739583333333333, 0.7296296296296296, 0.5348958333333333, 0.7833333333333333)
KICKED_FROM_THE_SYSTEM.text = "You have been kicked from the system."
KICKED_FROM_THE_SYSTEM.text_threshold = 120

LEGENDARY_SCORE = UIElement(name='LEGENDARY_SCORE')
LEGENDARY_SCORE.description = "Score text in legendary battle. Determines that we see end of battle screen."
LEGENDARY_SCORE.text_rect = Rect(0.0855043814829831, 0.3248902917659314, 0.14382630520920567, 0.3700856286705826)
LEGENDARY_SCORE.text = "SCORE"
LEGENDARY_SCORE.text_threshold = 120

COOP_HOME_BUTTON = UIElement(name='COOP_HOME_BUTTON')
COOP_HOME_BUTTON.description = "Co-op home button (middle position)."
COOP_HOME_BUTTON.image_rect = Rect(0.759375, 0.8944444444444445, 0.8088541666666667, 0.9629629629629629)
COOP_HOME_BUTTON.button_rect = Rect(0.759375, 0.8944444444444445, 0.8088541666666667, 0.9629629629629629)
COOP_HOME_BUTTON.image_threshold = 0.7
COOP_HOME_BUTTON.image = load_ui_image("home_button.png")

COOP_COMPLETION = UIElement(name='COOP_COMPLETION')
COOP_COMPLETION.description = "Completion time in Coop battles. Determines that we see end of battle screen."
COOP_COMPLETION.text_rect = Rect(0.4327797196011332, 0.1578875053276198, 0.5397740986455049, 0.18089521211879808)
COOP_COMPLETION.text = "COMPLETION TIME:"
COOP_COMPLETION.text_threshold = 170

GRAY_COLOR = (100, 110, 120), (130, 140, 150)

COOP_TOTAL_DAMAGE = UIElement(name='COOP_TOTAL_DAMAGE')
COOP_TOTAL_DAMAGE.description = "Total Damage in Coop battles. Determines that we see end of battle screen."
COOP_TOTAL_DAMAGE.text_rect = Rect(0.40517901391711203, 0.2828189512053463, 0.4895685220383367, 0.3209283968163603)
COOP_TOTAL_DAMAGE.text = "Total Damage"
COOP_TOTAL_DAMAGE.text_threshold = 140
COOP_TOTAL_DAMAGE.color_to_convert = (GRAY_COLOR, )

TIMELINE_POINTS = UIElement(name='TIMELINE_POINTS')
TIMELINE_POINTS.description = "Points in timeline battles. Determines that we see end of battle screen."
TIMELINE_POINTS.text_rect = Rect(0.5789975822433281, 0.16404806336996713, 0.6470398265905877, 0.21323122411914625)
TIMELINE_POINTS.text = "POINTS"
TIMELINE_POINTS.text_threshold = 120

MELEE_BUTTON = UIElement(name='MELEE_BUTTON')
MELEE_BUTTON.description = "An image of melee attack button."
MELEE_BUTTON.image_rect = Rect(0.8835855646100116, 0.7732919254658385, 0.9452852153667055, 0.8809523809523809)
MELEE_BUTTON.button_rect = Rect(0.8835855646100116, 0.7732919254658385, 0.9452852153667055, 0.8809523809523809)
MELEE_BUTTON.image_threshold = 0.7
MELEE_BUTTON.image = load_ui_image("melee.png")

SKILL_1 = UIElement(name='SKILL_1')
SKILL_1.description = "#1 skill button."
SKILL_1.image_rect = Rect(0.8485193621867881, 0.6022267206477733, 0.8712984054669703, 0.6528340080971661)
SKILL_1.text_rect = Rect(0.8485193621867881, 0.6022267206477733, 0.8712984054669703, 0.6528340080971661)
SKILL_1.button_rect = Rect(0.8485193621867881, 0.6022267206477733, 0.8712984054669703, 0.6528340080971661)
SKILL_1.image_threshold = 0.7
SKILL_1.available_characters = "0123456789"

SKILL_2 = UIElement(name='SKILL_2')
SKILL_2.description = "#2 skill button."
SKILL_2.image_rect = Rect(0.7858769931662871, 0.7186234817813765, 0.8115034168564921, 0.7742914979757085)
SKILL_2.text_rect = Rect(0.7858769931662871, 0.7186234817813765, 0.8115034168564921, 0.7742914979757085)
SKILL_2.button_rect = Rect(0.7858769931662871, 0.7186234817813765, 0.8115034168564921, 0.7742914979757085)
SKILL_2.image_threshold = 0.7
SKILL_2.available_characters = "0123456789"

SKILL_3 = UIElement(name='SKILL_3')
SKILL_3.description = "#3 skill button."
SKILL_3.image_rect = Rect(0.9396355353075171, 0.6072874493927125, 0.9681093394077449, 0.6578947368421053)
SKILL_3.text_rect = Rect(0.9396355353075171, 0.6072874493927125, 0.9681093394077449, 0.6578947368421053)
SKILL_3.button_rect = Rect(0.9396355353075171, 0.6072874493927125, 0.9681093394077449, 0.6578947368421053)
SKILL_3.image_threshold = 0.7
SKILL_3.available_characters = "0123456789"

SKILL_4 = UIElement(name='SKILL_4')
SKILL_4.description = "#4 skill button."
SKILL_4.image_rect = Rect(0.7972665148063781, 0.8805668016194332, 0.8257403189066059, 0.9311740890688259)
SKILL_4.text_rect = Rect(0.7972665148063781, 0.8805668016194332, 0.8257403189066059, 0.9311740890688259)
SKILL_4.button_rect = Rect(0.7972665148063781, 0.8805668016194332, 0.8257403189066059, 0.9311740890688259)
SKILL_4.image_threshold = 0.7
SKILL_4.available_characters = "0123456789"

SKILL_5 = UIElement(name='SKILL_5')
SKILL_5.description = "#5 skill button."
SKILL_5.image_rect = Rect(0.7061503416856492, 0.8805668016194332, 0.7317767653758542, 0.9311740890688259)
SKILL_5.text_rect = Rect(0.7061503416856492, 0.8805668016194332, 0.7317767653758542, 0.9311740890688259)
SKILL_5.button_rect = Rect(0.7061503416856492, 0.8805668016194332, 0.7317767653758542, 0.9311740890688259)
SKILL_5.image_threshold = 0.7
SKILL_5.available_characters = "0123456789"

SKILL_6 = UIElement(name='SKILL_6')
SKILL_6.description = "#6 skill button."
SKILL_6.image_rect = Rect(0.6083333333333333, 0.8787037037037037, 0.646875, 0.9444444444444444)
SKILL_6.text_rect = Rect(0.6083333333333333, 0.8787037037037037, 0.646875, 0.9444444444444444)
SKILL_6.button_rect = Rect(0.6083333333333333, 0.8787037037037037, 0.646875, 0.9444444444444444)
SKILL_6.text_threshold = 170
SKILL_6.available_characters = "0123456789"

SKILL_6_LOCKED = UIElement(name='SKILL_6_LOCKED')
SKILL_6_LOCKED.description = "#6 skill button when locked."
SKILL_6_LOCKED.image_rect = Rect(0.6067708333333334, 0.8814814814814815, 0.6427083333333333, 0.9462962962962963)
SKILL_6_LOCKED.button_rect = Rect(0.6067708333333334, 0.8814814814814815, 0.6427083333333333, 0.9462962962962963)
SKILL_6_LOCKED.image_threshold = 0.6
SKILL_6_LOCKED.image = load_ui_image("skill_6_locked.png")

SKILL_6_LABEL = UIElement(name='SKILL_6_LABEL')
SKILL_6_LABEL.description = "#6 skill label text at the left top corner."
SKILL_6_LABEL.text_rect = Rect(0.5953125, 0.8444444444444444, 0.6083333333333333, 0.8740740740740741)
SKILL_6_LABEL.text = "6"
SKILL_6_LABEL.text_threshold = 145
SKILL_6_LABEL.available_characters = "6"

SKILL_T3 = UIElement(name='SKILL_T3')
SKILL_T3.description = "T3 skill button."
SKILL_T3.image_rect = Rect(0.5973958333333333, 0.8851851851851852, 0.6421875, 0.9333333333333333)
SKILL_T3.text_rect = Rect(0.5973958333333333, 0.8851851851851852, 0.6421875, 0.9333333333333333)
SKILL_T3.button_rect = Rect(0.5973958333333333, 0.8851851851851852, 0.6421875, 0.9333333333333333)
SKILL_T3.text_threshold = 170
SKILL_T3.available_characters = "0123456789."

SKILL_T3_LOCKED = UIElement(name='SKILL_T3_LOCKED')
SKILL_T3_LOCKED.description = "T3 skill button when locked."
SKILL_T3_LOCKED.image_rect = Rect(0.6083333333333333, 0.8787037037037037, 0.646875, 0.9444444444444444)
SKILL_T3_LOCKED.button_rect = Rect(0.6083333333333333, 0.8787037037037037, 0.646875, 0.9444444444444444)
SKILL_T3_LOCKED.image_threshold = 0.6
SKILL_T3_LOCKED.image = load_ui_image("t3_locked.png")

SKILL_T3_LABEL = UIElement(name='SKILL_T3_LABEL')
SKILL_T3_LABEL.description = "T3 skill label text at the left top corner."
SKILL_T3_LABEL.text_rect = Rect(0.5953125, 0.8444444444444444, 0.6083333333333333, 0.8740740740740741)
SKILL_T3_LABEL.text = "6"
SKILL_T3_LABEL.text_threshold = 155
SKILL_T3_LABEL.available_characters = "6"

AUTOPLAY_TOGGLE = UIElement(name='AUTOPLAY_TOGGLE')
AUTOPLAY_TOGGLE.description = "Toggle for autoplay function in missions."
AUTOPLAY_TOGGLE.image_rect = Rect(0.3067708333333333, 0.9166666666666666, 0.32864583333333336, 0.9564814814814815)
AUTOPLAY_TOGGLE.button_rect = Rect(0.3067708333333333, 0.9166666666666666, 0.32864583333333336, 0.9564814814814815)
AUTOPLAY_TOGGLE.image_threshold = 0.6
AUTOPLAY_TOGGLE.image = load_ui_image("autoplay_toggle.png")

INVASION_FAILED = UIElement(name='INVASION_FAILED')
INVASION_FAILED.description = "FAILED screen when you failed WBI mission."
INVASION_FAILED.text_rect = Rect(0.70625, 0.04722222222222222, 0.8265625, 0.1259259259259259)
INVASION_FAILED.text = "FAILED"
INVASION_FAILED.text_threshold = 140

CANNOT_ENTER = UIElement(name='CANNOT_ENTER')
CANNOT_ENTER.description = "The 'Cannot enter' message at the end of the mission. Leads to OK button."
CANNOT_ENTER.text_rect = Rect(0.4429130935488087, 0.44984210556114335, 0.5543229222053108, 0.4963667170806372)
CANNOT_ENTER.button_rect = Rect(0.47880350814956096, 0.7117092046851513, 0.5184325076045584, 0.767538738508544)
CANNOT_ENTER.text = "Cannot enter."
CANNOT_ENTER.text_threshold = 155

CURRENT_CHARACTER = UIElement(name='CURRENT_CHARACTER')
CURRENT_CHARACTER.description = "Current (top) character on top left selector in battle."
CURRENT_CHARACTER.image_rect = Rect(0.0296875, 0.10092592592592593, 0.07447916666666667, 0.1824074074074074)
CURRENT_CHARACTER.image_threshold = 0.5

MOVE_AROUND_POS_DOWN = UIElement(name='MOVE_AROUND_POS_DOWN')
MOVE_AROUND_POS_DOWN.description = "Moving around: down."
MOVE_AROUND_POS_DOWN.button_rect = Rect(0.14010416666666667, 0.8694444444444445, 0.15104166666666666, 0.8898148148148148)

MOVE_AROUND_POS_LEFT = UIElement(name='MOVE_AROUND_POS_LEFT')
MOVE_AROUND_POS_LEFT.description = "Moving around: left."
MOVE_AROUND_POS_LEFT.button_rect = Rect(0.08958333333333333, 0.7861111111111111, 0.10052083333333334, 0.8055555555555556)

MOVE_AROUND_POS_UP = UIElement(name='MOVE_AROUND_POS_UP')
MOVE_AROUND_POS_UP.description = "Moving around: up."
MOVE_AROUND_POS_UP.button_rect = Rect(0.140625, 0.6944444444444444, 0.1515625, 0.7129629629629629)

MOVE_AROUND_POS_RIGHT = UIElement(name='MOVE_AROUND_POS_RIGHT')
MOVE_AROUND_POS_RIGHT.description = "Moving around: right."
MOVE_AROUND_POS_RIGHT.button_rect = Rect(0.19166666666666668, 0.7824074074074074, 0.20260416666666667, 0.8018518518518518)

SKILL_COOP = UIElement(name='SKILL_COOP')
SKILL_COOP.description = "Coop skill button."
SKILL_COOP.text_rect = Rect(0.5151041666666667, 0.8759259259259259, 0.5520833333333334, 0.9416666666666667)
SKILL_COOP.image_rect = Rect(0.5151041666666667, 0.8759259259259259, 0.5520833333333334, 0.9416666666666667)
SKILL_COOP.button_rect = Rect(0.5151041666666667, 0.8759259259259259, 0.5520833333333334, 0.9416666666666667)
SKILL_COOP.image_threshold = 0.7
SKILL_COOP.image = load_ui_image("skill_coop.png")

SKILL_1_LABEL = UIElement(name='SKILL_1_LABEL')
SKILL_1_LABEL.description = "DEPRECATED (because any character has this skill by default)"
SKILL_1_LABEL.text_rect = Rect(0.83125, 0.5666666666666667, 0.8432291666666667, 0.5907407407407408)
SKILL_1_LABEL.text = "1"
SKILL_1_LABEL.text_threshold = 145
SKILL_1_LABEL.available_characters = "1"

SKILL_2_LABEL = UIElement(name='SKILL_2_LABEL')
SKILL_2_LABEL.description = "2 skill label text at the left top corner."
SKILL_2_LABEL.text_rect = Rect(0.7677083333333333, 0.6861111111111111, 0.7802083333333333, 0.7111111111111111)
SKILL_2_LABEL.text = "2"
SKILL_2_LABEL.text_threshold = 145
SKILL_2_LABEL.available_characters = "2"

SKILL_3_LABEL = UIElement(name='SKILL_3_LABEL')
SKILL_3_LABEL.description = "3 skill label text at the left top corner."
SKILL_3_LABEL.text_rect = Rect(0.9234375, 0.5722222222222222, 0.9359375, 0.5962962962962963)
SKILL_3_LABEL.text = "3"
SKILL_3_LABEL.text_threshold = 145
SKILL_3_LABEL.available_characters = "3"

SKILL_4_LABEL = UIElement(name='SKILL_4_LABEL')
SKILL_4_LABEL.description = "4 skill label text at the left top corner."
SKILL_4_LABEL.text_rect = Rect(0.7796875, 0.8472222222222222, 0.7921875, 0.8722222222222222)
SKILL_4_LABEL.text = "4"
SKILL_4_LABEL.text_threshold = 145
SKILL_4_LABEL.available_characters = "4"

SKILL_5_LABEL = UIElement(name='SKILL_5_LABEL')
SKILL_5_LABEL.description = "5 skill label text at the left top corner."
SKILL_5_LABEL.text_rect = Rect(0.6864583333333333, 0.8490740740740741, 0.7, 0.8722222222222222)
SKILL_5_LABEL.text = "5"
SKILL_5_LABEL.text_threshold = 145
SKILL_5_LABEL.available_characters = "5"

SKILL_DANGER_ROOM = UIElement(name='SKILL_DANGER_ROOM')
SKILL_DANGER_ROOM.description = "Danger Room's skill button."
SKILL_DANGER_ROOM.image_rect = Rect(0.503125, 0.8870370370370371, 0.5505208333333333, 0.9314814814814815)
SKILL_DANGER_ROOM.text_rect = Rect(0.503125, 0.8870370370370371, 0.5505208333333333, 0.9314814814814815)
SKILL_DANGER_ROOM.button_rect = Rect(0.5151041666666667, 0.8759259259259259, 0.5520833333333334, 0.9416666666666667)
SKILL_DANGER_ROOM.text_threshold = 175
SKILL_DANGER_ROOM.available_characters = "0123456789."
