Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
79126c891a
|
||
|
|
acddb456ff
|
||
|
|
61f862c665
|
||
|
|
b6ebd8481f
|
||
|
|
4233f13994
|
||
|
|
47c773b90c
|
||
|
|
ecc747ff94
|
||
|
|
f04f38ec07
|
||
|
|
98088eeaf0
|
||
|
|
e1c9c16bcb |
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.6 KiB |
@@ -360,7 +360,7 @@ class Ocr:
|
||||
|
||||
|
||||
class Digit(Ocr):
|
||||
def __init__(self, button: ButtonWrapper, lang=None, name=None):
|
||||
def __init__(self, button: ButtonWrapper, lang='en', name=None):
|
||||
super().__init__(button, lang=lang, name=name)
|
||||
|
||||
def format_result(self, result) -> int:
|
||||
@@ -380,7 +380,7 @@ class Digit(Ocr):
|
||||
|
||||
|
||||
class DigitCounter(Ocr):
|
||||
def __init__(self, button: ButtonWrapper, lang=None, name=None):
|
||||
def __init__(self, button: ButtonWrapper, lang='en', name=None):
|
||||
super().__init__(button, lang=lang, name=name)
|
||||
|
||||
@classmethod
|
||||
|
||||
@@ -195,7 +195,6 @@ class Updater(DeployConfig, GitManager, PipManager):
|
||||
|
||||
def update(self):
|
||||
logger.hr("Run update")
|
||||
self.set_repo()
|
||||
try:
|
||||
self.git_install()
|
||||
self.pip_install()
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
# pip-compile --annotation-style=line --output-file=requirements.txt requirements-in.txt
|
||||
#
|
||||
--index-url http://mirrors.aliyun.com/pypi/simple
|
||||
#--index-url https://mirrors.aliyun.com/pypi/simple
|
||||
|
||||
adbutils==1.2.9 # via -r requirements-in.txt, uiautomator2
|
||||
aiofiles==23.1.0 # via -r requirements-in.txt
|
||||
|
||||
@@ -260,10 +260,10 @@ MAIN_GO_TO_CAFE = ButtonWrapper(
|
||||
name='MAIN_GO_TO_CAFE',
|
||||
jp=Button(
|
||||
file='./assets/jp/base/page/MAIN_GO_TO_CAFE.png',
|
||||
area=(86, 632, 113, 670),
|
||||
search=(66, 612, 133, 690),
|
||||
color=(174, 222, 246),
|
||||
button=(86, 632, 113, 670),
|
||||
area=(86, 636, 112, 674),
|
||||
search=(66, 616, 132, 694),
|
||||
color=(177, 223, 246),
|
||||
button=(86, 636, 112, 674),
|
||||
),
|
||||
share=Button(
|
||||
file='./assets/share/base/page/MAIN_GO_TO_CAFE.png',
|
||||
@@ -277,10 +277,10 @@ MAIN_GO_TO_CIRCLE = ButtonWrapper(
|
||||
name='MAIN_GO_TO_CIRCLE',
|
||||
jp=Button(
|
||||
file='./assets/jp/base/page/MAIN_GO_TO_CIRCLE.png',
|
||||
area=(531, 631, 561, 659),
|
||||
search=(511, 611, 581, 679),
|
||||
color=(182, 230, 254),
|
||||
button=(531, 631, 561, 659),
|
||||
area=(533, 633, 558, 661),
|
||||
search=(513, 613, 578, 681),
|
||||
color=(171, 228, 255),
|
||||
button=(533, 633, 558, 661),
|
||||
),
|
||||
share=Button(
|
||||
file='./assets/share/base/page/MAIN_GO_TO_CIRCLE.png',
|
||||
@@ -294,10 +294,10 @@ MAIN_GO_TO_CRAFTING = ButtonWrapper(
|
||||
name='MAIN_GO_TO_CRAFTING',
|
||||
jp=Button(
|
||||
file='./assets/jp/base/page/MAIN_GO_TO_CRAFTING.png',
|
||||
area=(645, 627, 667, 662),
|
||||
search=(625, 607, 687, 682),
|
||||
color=(206, 235, 251),
|
||||
button=(645, 627, 667, 662),
|
||||
area=(643, 632, 669, 664),
|
||||
search=(623, 612, 689, 684),
|
||||
color=(210, 237, 252),
|
||||
button=(643, 632, 669, 664),
|
||||
),
|
||||
share=Button(
|
||||
file='./assets/share/base/page/MAIN_GO_TO_CRAFTING.png',
|
||||
@@ -311,10 +311,10 @@ MAIN_GO_TO_GACHA = ButtonWrapper(
|
||||
name='MAIN_GO_TO_GACHA',
|
||||
jp=Button(
|
||||
file='./assets/jp/base/page/MAIN_GO_TO_GACHA.png',
|
||||
area=(871, 626, 893, 671),
|
||||
search=(851, 606, 913, 691),
|
||||
color=(172, 223, 242),
|
||||
button=(871, 626, 893, 671),
|
||||
area=(874, 650, 895, 669),
|
||||
search=(854, 630, 915, 689),
|
||||
color=(158, 228, 254),
|
||||
button=(874, 650, 895, 669),
|
||||
),
|
||||
share=Button(
|
||||
file='./assets/share/base/page/MAIN_GO_TO_GACHA.png',
|
||||
@@ -379,10 +379,10 @@ MAIN_GO_TO_SCHEDULE = ButtonWrapper(
|
||||
name='MAIN_GO_TO_SCHEDULE',
|
||||
jp=Button(
|
||||
file='./assets/jp/base/page/MAIN_GO_TO_SCHEDULE.png',
|
||||
area=(198, 634, 217, 667),
|
||||
search=(178, 614, 237, 687),
|
||||
color=(176, 222, 243),
|
||||
button=(198, 634, 217, 667),
|
||||
area=(197, 637, 216, 668),
|
||||
search=(177, 617, 236, 688),
|
||||
color=(181, 224, 241),
|
||||
button=(197, 637, 216, 668),
|
||||
),
|
||||
share=Button(
|
||||
file='./assets/share/base/page/MAIN_GO_TO_SCHEDULE.png',
|
||||
@@ -396,10 +396,10 @@ MAIN_GO_TO_SHOP = ButtonWrapper(
|
||||
name='MAIN_GO_TO_SHOP',
|
||||
jp=Button(
|
||||
file='./assets/jp/base/page/MAIN_GO_TO_SHOP.png',
|
||||
area=(752, 628, 786, 665),
|
||||
search=(732, 608, 806, 685),
|
||||
color=(168, 221, 248),
|
||||
button=(752, 628, 786, 665),
|
||||
area=(753, 632, 787, 668),
|
||||
search=(733, 612, 807, 688),
|
||||
color=(167, 220, 247),
|
||||
button=(753, 632, 787, 668),
|
||||
),
|
||||
share=Button(
|
||||
file='./assets/share/base/page/MAIN_GO_TO_SHOP.png',
|
||||
|
||||
@@ -69,7 +69,7 @@ class Page:
|
||||
|
||||
|
||||
# Main Page
|
||||
page_main = Page(MAIN_GO_TO_PURCHASE)
|
||||
page_main = Page(MAIN_GO_TO_TASK)
|
||||
|
||||
# Cafe
|
||||
page_cafe = Page(CAFE_CHECK)
|
||||
|
||||
@@ -450,6 +450,11 @@ class UI(MainPage):
|
||||
"""
|
||||
pass
|
||||
|
||||
@Config.when(Emulator_GameLanguage='jp')
|
||||
def close_popup(self, check_button):
|
||||
pass
|
||||
|
||||
@Config.when(Emulator_GameLanguage=None)
|
||||
def close_popup(self, check_button):
|
||||
if not self.match_color(check_button):
|
||||
timer = Timer(5, 5).start()
|
||||
@@ -464,3 +469,4 @@ class UI(MainPage):
|
||||
raise RequestHumanTakeover
|
||||
while not wait.reached():
|
||||
pass
|
||||
|
||||
|
||||
@@ -103,24 +103,24 @@ CONFIRM_SORT = ButtonWrapper(
|
||||
name='CONFIRM_SORT',
|
||||
jp=Button(
|
||||
file='./assets/jp/momotalk/CONFIRM_SORT.png',
|
||||
area=(243, 403, 656, 440),
|
||||
search=(223, 383, 676, 460),
|
||||
area=(239, 457, 658, 495),
|
||||
search=(219, 437, 678, 515),
|
||||
color=(252, 253, 253),
|
||||
button=(243, 403, 656, 440),
|
||||
button=(239, 457, 658, 495),
|
||||
),
|
||||
en=Button(
|
||||
file='./assets/en/momotalk/CONFIRM_SORT.png',
|
||||
area=(239, 407, 657, 439),
|
||||
search=(219, 387, 677, 459),
|
||||
color=(248, 249, 249),
|
||||
button=(239, 407, 657, 439),
|
||||
area=(239, 456, 658, 496),
|
||||
search=(219, 436, 678, 516),
|
||||
color=(249, 250, 250),
|
||||
button=(239, 456, 658, 496),
|
||||
),
|
||||
zht=Button(
|
||||
file='./assets/zht/momotalk/CONFIRM_SORT.png',
|
||||
area=(240, 401, 656, 440),
|
||||
search=(220, 381, 676, 460),
|
||||
color=(249, 250, 250),
|
||||
button=(240, 401, 656, 440),
|
||||
area=(241, 457, 656, 495),
|
||||
search=(221, 437, 676, 515),
|
||||
color=(250, 251, 251),
|
||||
button=(241, 457, 656, 495),
|
||||
),
|
||||
)
|
||||
FIRST_UNREAD = ButtonWrapper(
|
||||
@@ -175,24 +175,24 @@ NOTIFICATION_BADGE = ButtonWrapper(
|
||||
name='NOTIFICATION_BADGE',
|
||||
jp=Button(
|
||||
file='./assets/jp/momotalk/NOTIFICATION_BADGE.png',
|
||||
area=(163, 107, 196, 129),
|
||||
search=(143, 87, 216, 149),
|
||||
color=(240, 110, 65),
|
||||
button=(163, 107, 196, 129),
|
||||
area=(139, 100, 158, 116),
|
||||
search=(119, 80, 178, 136),
|
||||
color=(245, 126, 85),
|
||||
button=(139, 100, 158, 116),
|
||||
),
|
||||
en=Button(
|
||||
file='./assets/en/momotalk/NOTIFICATION_BADGE.png',
|
||||
area=(171, 109, 200, 128),
|
||||
search=(151, 89, 220, 148),
|
||||
color=(242, 101, 47),
|
||||
button=(171, 109, 200, 128),
|
||||
area=(153, 106, 179, 125),
|
||||
search=(133, 86, 199, 145),
|
||||
color=(244, 115, 68),
|
||||
button=(153, 106, 179, 125),
|
||||
),
|
||||
zht=Button(
|
||||
file='./assets/zht/momotalk/NOTIFICATION_BADGE.png',
|
||||
area=(171, 109, 200, 128),
|
||||
search=(151, 89, 220, 148),
|
||||
color=(242, 101, 47),
|
||||
button=(171, 109, 200, 128),
|
||||
area=(153, 106, 179, 125),
|
||||
search=(133, 86, 199, 145),
|
||||
color=(244, 115, 68),
|
||||
button=(153, 106, 179, 125),
|
||||
),
|
||||
)
|
||||
REPLY = ButtonWrapper(
|
||||
@@ -367,10 +367,10 @@ SWITCH_MESSAGE_CHECK = ButtonWrapper(
|
||||
name='SWITCH_MESSAGE_CHECK',
|
||||
jp=Button(
|
||||
file='./assets/jp/momotalk/SWITCH_MESSAGE_CHECK.png',
|
||||
area=(231, 167, 379, 190),
|
||||
search=(211, 147, 399, 210),
|
||||
color=(197, 201, 202),
|
||||
button=(231, 167, 379, 190),
|
||||
area=(232, 170, 356, 189),
|
||||
search=(212, 150, 376, 209),
|
||||
color=(195, 199, 201),
|
||||
button=(232, 170, 356, 189),
|
||||
),
|
||||
en=Button(
|
||||
file='./assets/en/momotalk/SWITCH_MESSAGE_CHECK.png',
|
||||
@@ -439,10 +439,10 @@ UNREAD = ButtonWrapper(
|
||||
name='UNREAD',
|
||||
jp=Button(
|
||||
file='./assets/jp/momotalk/UNREAD.png',
|
||||
area=(454, 158, 570, 194),
|
||||
search=(434, 138, 590, 214),
|
||||
color=(242, 243, 243),
|
||||
button=(454, 158, 570, 194),
|
||||
area=(475, 158, 590, 197),
|
||||
search=(455, 138, 610, 217),
|
||||
color=(242, 243, 244),
|
||||
button=(475, 158, 590, 197),
|
||||
),
|
||||
en=Button(
|
||||
file='./assets/en/momotalk/UNREAD.png',
|
||||
|
||||
@@ -99,7 +99,7 @@ class MomoTalkUI(UI):
|
||||
If yes, open it otherwise it means no student available for interaction.
|
||||
"""
|
||||
self.ui_ensure(page_main)
|
||||
if self.match_color(NOTIFICATION_BADGE, threshold=80):
|
||||
if self.match_color(NOTIFICATION_BADGE, threshold=120):
|
||||
self.ui_ensure(page_momo_talk)
|
||||
while SWITCH_SIDEBAR.get(self) != "message":
|
||||
SWITCH_SIDEBAR.set("message", self)
|
||||
|
||||