Fix: dev_tools import error

- Use `python -m dev_tools.button_extract` to run
This commit is contained in:
LmeSzinc 2020-05-27 02:42:25 +08:00
parent 83674b7a37
commit 56992b1d7f
3 changed files with 10 additions and 5 deletions

View File

@ -3,8 +3,6 @@ import os
import numpy as np
from PIL import Image
os.chdir('../')
from module.base.button import get_color
from module.config.config import AzurLaneConfig
from module.logger import logger
@ -179,5 +177,5 @@ class AssetExtractor:
me = ModuleExtractor(name=module, config=config)
me.write()
ae = AssetExtractor(AzurLaneConfig())
if __name__ == '__main__':
ae = AssetExtractor(AzurLaneConfig('template'))

View File

@ -1,6 +1,9 @@
import time
import numpy as np
import module.config.server as server
server.server = 'cn' # Don't need to edit, it's used to avoid error.
from module.config.config import AzurLaneConfig
from module.device.device import Device
@ -33,5 +36,5 @@ class Config:
USE_ADB_SCREENSHOT = False
az = EmulatorChecker(AzurLaneConfig().merge(Config()))
az = EmulatorChecker(AzurLaneConfig('template').merge(Config()))
az.stress_test()

View File

@ -78,6 +78,10 @@ BATTLE_PREPARATION = Button(area=(1043, 607, 1241, 667), color=(234, 179, 97), b
button_extract.py会自动提取按钮的属性, 免去了人工输入的烦恼
```
python -m dev_tools.button_extract
```
8. **使用按钮**
继承 module.base.base 下的 ModuleBase 类, 可以调用以下方法: