Upd: Enlarge search area of dungeon tabs

This commit is contained in:
LmeSzinc 2024-06-19 12:36:28 +08:00
parent 7ec2523688
commit 5521ff9e67
3 changed files with 18 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -153,6 +153,16 @@ SURVIVAL_INDEX_LOADED = ButtonWrapper(
button=(451, 286, 476, 302),
),
)
TAB_SEARCH = ButtonWrapper(
name='TAB_SEARCH',
share=Button(
file='./assets/share/dungeon/ui/TAB_SEARCH.png',
area=(139, 84, 599, 144),
search=(119, 64, 619, 164),
color=(92, 87, 83),
button=(139, 84, 599, 144),
),
)
TREASURES_LIGHTWARD_CHECK = ButtonWrapper(
name='TREASURES_LIGHTWARD_CHECK',
share=Button(

View File

@ -33,6 +33,14 @@ from tasks.map.keywords import KEYWORDS_MAP_WORLD, MapPlane
class DungeonTabSwitch(Switch):
def add_state(self, state, check_button, click_button=None):
# Load search
if check_button is not None:
check_button.load_search(TAB_SEARCH.area)
if click_button is not None:
click_button.load_search(TAB_SEARCH.area)
return super().add_state(state, check_button, click_button)
def click(self, state, main):
"""
Args: