mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 08:38:20 +08:00
Upd: Research patches from azur-stats-server
(cherry picked from commit f3428c8a0f19570536e20ea54be41f481a5408db)
This commit is contained in:
@@ -7,6 +7,7 @@ from PIL import ImageDraw
|
||||
from module.base.decorator import cached_property
|
||||
from module.base.resource import Resource
|
||||
from module.base.utils import *
|
||||
from module.config.server import VALID_SERVER
|
||||
|
||||
|
||||
class Button(Resource):
|
||||
@@ -321,6 +322,24 @@ class Button(Resource):
|
||||
button.load_color(image)
|
||||
return button
|
||||
|
||||
def split_server(self):
|
||||
"""
|
||||
Split into 4 server specific buttons.
|
||||
|
||||
Returns:
|
||||
dict[str, Button]:
|
||||
"""
|
||||
out = {}
|
||||
for s in VALID_SERVER:
|
||||
out[s] = Button(
|
||||
area=self.parse_property(self.raw_area, s),
|
||||
color=self.parse_property(self.raw_color, s),
|
||||
button=self.parse_property(self.raw_button, s),
|
||||
file=self.parse_property(self.raw_file, s),
|
||||
name=self.name
|
||||
)
|
||||
return out
|
||||
|
||||
|
||||
class ButtonGrid:
|
||||
def __init__(self, origin, delta, button_shape, grid_shape, name=None):
|
||||
|
||||
Reference in New Issue
Block a user