mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 02:48:23 +08:00
Opt: re-factor shop module; move buy select and amount operations to baseline classes, common currency variable as all shop variants are created independently
This commit is contained in:
@@ -1,24 +1,26 @@
|
||||
from module.base.button import ButtonGrid
|
||||
from module.base.decorator import cached_property
|
||||
from module.base.timer import Timer
|
||||
from module.handler.assets import POPUP_CONFIRM
|
||||
from module.shop.assets import *
|
||||
from module.ui.assets import BACK_ARROW
|
||||
from module.ui.navbar import Navbar
|
||||
from module.ui.page import page_munitions
|
||||
from module.ui.ui import UI
|
||||
from module.handler.assets import POPUP_CONFIRM
|
||||
|
||||
|
||||
class ShopUI(UI):
|
||||
@cached_property
|
||||
def _shop_bottom_navbar(self):
|
||||
"""
|
||||
Below information relative to after
|
||||
shop_swipe
|
||||
shop_bottom_navbar 5 options
|
||||
medal
|
||||
guild.
|
||||
prototype.
|
||||
core.
|
||||
merit.
|
||||
general.
|
||||
"""
|
||||
shop_bottom_navbar = ButtonGrid(
|
||||
origin=(399, 619), delta=(182, 0),
|
||||
@@ -33,20 +35,22 @@ class ShopUI(UI):
|
||||
"""
|
||||
Ensure able to transition to page and
|
||||
page has loaded to completion
|
||||
Below information relative to after
|
||||
shop_swipe
|
||||
|
||||
Args:
|
||||
left (int):
|
||||
1 for guild.
|
||||
4 for prototype.
|
||||
3 for core.
|
||||
2 for merit.
|
||||
1 for general.
|
||||
1 for medal
|
||||
2 for guild.
|
||||
3 for prototype.
|
||||
4 for core.
|
||||
5 for merit.
|
||||
right (int):
|
||||
5 for guild.
|
||||
4 for prototype.
|
||||
3 for core.
|
||||
2 for merit.
|
||||
1 for general.
|
||||
5 for medal
|
||||
4 for guild.
|
||||
3 for prototype.
|
||||
2 for core.
|
||||
1 for merit.
|
||||
|
||||
Returns:
|
||||
bool: if bottom_navbar set ensured
|
||||
@@ -128,5 +132,7 @@ class ShopUI(UI):
|
||||
def ui_goto_shop(self):
|
||||
"""
|
||||
Goes to page_munitions
|
||||
This route guarantees start
|
||||
in general shop
|
||||
"""
|
||||
self.ui_ensure(page_munitions)
|
||||
|
||||
Reference in New Issue
Block a user