Fix: support assets (#307)
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 114 KiB After Width: | Height: | Size: 93 KiB |
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 6.2 KiB |
@ -7,40 +7,40 @@ COMBAT_SUPPORT_ADD = ButtonWrapper(
|
||||
name='COMBAT_SUPPORT_ADD',
|
||||
share=Button(
|
||||
file='./assets/share/combat/support/COMBAT_SUPPORT_ADD.png',
|
||||
area=(1032, 649, 1132, 680),
|
||||
search=(1012, 629, 1152, 700),
|
||||
color=(228, 228, 228),
|
||||
button=(1032, 649, 1132, 680),
|
||||
area=(1057, 649, 1112, 678),
|
||||
search=(1037, 629, 1132, 698),
|
||||
color=(213, 214, 214),
|
||||
button=(1057, 649, 1112, 678),
|
||||
),
|
||||
)
|
||||
COMBAT_SUPPORT_LIST = ButtonWrapper(
|
||||
name='COMBAT_SUPPORT_LIST',
|
||||
share=Button(
|
||||
file='./assets/share/combat/support/COMBAT_SUPPORT_LIST.png',
|
||||
area=(57, 637, 100, 680),
|
||||
search=(37, 617, 120, 700),
|
||||
color=(212, 213, 215),
|
||||
button=(57, 637, 100, 680),
|
||||
area=(67, 645, 93, 669),
|
||||
search=(47, 625, 113, 689),
|
||||
color=(204, 205, 205),
|
||||
button=(67, 645, 93, 669),
|
||||
),
|
||||
)
|
||||
COMBAT_SUPPORT_LIST_GRID = ButtonWrapper(
|
||||
name='COMBAT_SUPPORT_LIST_GRID',
|
||||
share=Button(
|
||||
file='./assets/share/combat/support/COMBAT_SUPPORT_LIST_GRID.png',
|
||||
area=(64, 115, 159, 634),
|
||||
search=(44, 95, 179, 654),
|
||||
color=(119, 108, 132),
|
||||
button=(64, 115, 159, 634),
|
||||
area=(64, 158, 155, 627),
|
||||
search=(44, 138, 175, 647),
|
||||
color=(117, 107, 124),
|
||||
button=(64, 158, 155, 627),
|
||||
),
|
||||
)
|
||||
COMBAT_SUPPORT_LIST_SCROLL = ButtonWrapper(
|
||||
name='COMBAT_SUPPORT_LIST_SCROLL',
|
||||
share=Button(
|
||||
file='./assets/share/combat/support/COMBAT_SUPPORT_LIST_SCROLL.png',
|
||||
area=(448, 112, 452, 610),
|
||||
search=(428, 92, 472, 630),
|
||||
color=(127, 133, 150),
|
||||
button=(448, 112, 452, 610),
|
||||
area=(448, 156, 452, 592),
|
||||
search=(428, 136, 472, 612),
|
||||
color=(130, 133, 153),
|
||||
button=(448, 156, 452, 592),
|
||||
),
|
||||
)
|
||||
COMBAT_SUPPORT_SELECTED = ButtonWrapper(
|
||||
|
@ -1,5 +1,6 @@
|
||||
import cv2
|
||||
import numpy as np
|
||||
from py import log
|
||||
from scipy import signal
|
||||
from module.base.button import Button, ButtonWrapper
|
||||
|
||||
@ -55,7 +56,7 @@ class SupportCharacter:
|
||||
return SupportCharacter._image_cache[self.name]
|
||||
|
||||
img = load_image(f"assets/character/{self.name}.png")
|
||||
scaled_img = cv2.resize(img, (85, 82))
|
||||
scaled_img = cv2.resize(img, (86, 81))
|
||||
SupportCharacter._image_cache[self.name] = scaled_img
|
||||
logger.info(f"Character {self.name} image cached")
|
||||
return scaled_img
|
||||
@ -301,7 +302,7 @@ class CombatSupport(UI):
|
||||
self.device.screenshot()
|
||||
|
||||
# End
|
||||
if self.match_template(COMBAT_SUPPORT_SELECTED):
|
||||
if self.appear(COMBAT_SUPPORT_SELECTED, similarity=0.75):
|
||||
return True
|
||||
|
||||
if interval.reached():
|
||||
|