Add: obtain item popup method

This commit is contained in:
Hengyu 2023-08-31 15:54:36 +08:00
parent 26eba79c3c
commit 8ef055626a
3 changed files with 16 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

View File

@ -43,6 +43,16 @@ FLAG_UNRECORD = ButtonWrapper(
button=(746, 149, 778, 181),
),
)
OBTAIN_ITEM_POPUP = ButtonWrapper(
name='OBTAIN_ITEM_POPUP',
share=Button(
file='./assets/share/rogue/ui/OBTAIN_ITEM_POPUP.png',
area=(180, 573, 432, 720),
search=(160, 553, 452, 720),
color=(131, 109, 73),
button=(180, 573, 432, 720),
),
)
OCR_COSMIC_FRAGMENT = ButtonWrapper(
name='OCR_COSMIC_FRAGMENT',
share=Button(

View File

@ -44,6 +44,12 @@ class RogueUI(UI):
def is_page_event(self):
return self.appear(PAGE_EVENT)
def handle_obtain_item_popup(self, interval=5) -> bool:
"""After selecting some curio (e.g. Sealing_Wax_of_*), there will be a popup after back to main page"""
if self.appear_then_click(OBTAIN_ITEM_POPUP, interval=interval):
return True
return False
def is_unrecorded(self, target: OcrResultButton, relative_area):
"""
To check a rogue keyword is not record in game index by finding template