1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-12 21:27:01 +08:00

Opt: Cache ButtonGrid.buttons and add move() crop()

This commit is contained in:
LmeSzinc
2021-06-29 23:04:19 +08:00
parent 97980d1681
commit e6facc606a
13 changed files with 50 additions and 18 deletions

View File

@@ -60,7 +60,7 @@ class Level(ModuleBase):
self._lv_before_battle = self.lv if after_battle else [-1] * 6
ocr = LevelOcr(self._lv_grid().buttons(), name='LevelOcr')
ocr = LevelOcr(self._lv_grid().buttons, name='LevelOcr')
self.lv = ocr.ocr(self.device.image)
logger.attr('LEVEL', ', '.join(str(data) for data in self.lv))