Skip to content
This repository has been archived by the owner on Apr 20, 2024. It is now read-only.

Commit

Permalink
Account For Different TFT Tab Backgrounds/Highlighted, Smaller Feedba…
Browse files Browse the repository at this point in the history
…ck Survey Image (#75)

* Account For Tweaked TFT Tab Backgrounds

* Additional Feedback Survey Image

* Newline
  • Loading branch information
Kyrluckechuck authored Feb 6, 2023
1 parent 30b53c4 commit 899b301
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 4 deletions.
Binary file added captures/buttons/tab_tft_unselected_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added captures/messages/give_feedback_smaller.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 13 additions & 2 deletions constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@
"unselected": {
"1": "captures/buttons/tab_tft_unselected_1.png",
"2": "captures/buttons/tab_tft_unselected_2.png",
"3": "captures/buttons/tab_tft_unselected_3.png",
"4": "captures/buttons/tab_tft_unselected_highlighted.png",
},
"selected": "captures/buttons/tab_tft_selected.png",
"subtab_home": "captures/buttons/tft_subtab_home.png"
}
},
Expand Down Expand Up @@ -68,7 +69,10 @@
},
"launcher_play": "captures/buttons/launcher_play.png",
"messages": {
"give_feedback": "captures/messages/give_feedback.png",
"give_feedback": {
"full": "captures/messages/give_feedback.png",
"smaller": "captures/messages/give_feedback_smaller.png",
},
"session_expired": "captures/messages/session_expired.png",
"failed_to_reconnect": "captures/messages/failed_to_reconnect.png",
"login_servers_down": "captures/messages/login_servers_down.png",
Expand Down Expand Up @@ -189,4 +193,11 @@
unselected_tft_tabs = [
CONSTANTS["client"]["tabs"]["tft"]["unselected"]["1"],
CONSTANTS["client"]["tabs"]["tft"]["unselected"]["2"],
CONSTANTS["client"]["tabs"]["tft"]["unselected"]["3"],
CONSTANTS["client"]["tabs"]["tft"]["unselected"]["4"],
]

give_feedback = [
CONSTANTS["client"]["messages"]["give_feedback"]["full"],
CONSTANTS["client"]["messages"]["give_feedback"]["smaller"],
]
5 changes: 3 additions & 2 deletions tft.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
from constants import CONSTANTS
from constants import exit_now_images
from constants import find_match_images
from constants import give_feedback
from constants import key_fragment_images
from constants import skip_waiting_for_stats_images
from constants import unselected_tft_tabs
Expand Down Expand Up @@ -413,9 +414,9 @@ def check_if_client_popup() -> bool:
Returns:
bool: True if one is detected, False otherwise.
"""
if onscreen(CONSTANTS["client"]["messages"]["give_feedback"]):
if onscreen_multiple_any(give_feedback) :
logging.info("Client survey/feedback detected, clicking on (opening in browser) and continuing!")
click_to_middle(CONSTANTS["client"]["messages"]["give_feedback"])
onscreen_multiple_any(give_feedback)
time.sleep(2)
return True
return False
Expand Down

0 comments on commit 899b301

Please sign in to comment.