mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-22 08:37:42 +00:00
Add: obtain item popup method
This commit is contained in:
parent
26eba79c3c
commit
8ef055626a
BIN
assets/share/rogue/ui/OBTAIN_ITEM_POPUP.png
Normal file
BIN
assets/share/rogue/ui/OBTAIN_ITEM_POPUP.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 39 KiB |
@ -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(
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user