initial commit
This commit is contained in:
BIN
Media/ButtonEdgeFrame.blp
Normal file
BIN
Media/ButtonEdgeFrame.blp
Normal file
Binary file not shown.
BIN
Media/DashboardCellEdgeFrame.blp
Normal file
BIN
Media/DashboardCellEdgeFrame.blp
Normal file
Binary file not shown.
BIN
Media/IconPack.tga
Normal file
BIN
Media/IconPack.tga
Normal file
Binary file not shown.
BIN
Media/ItemPreviewEdgeFrame.blp
Normal file
BIN
Media/ItemPreviewEdgeFrame.blp
Normal file
Binary file not shown.
BIN
Media/Montserrat-Bold.ttf
Normal file
BIN
Media/Montserrat-Bold.ttf
Normal file
Binary file not shown.
BIN
Media/Montserrat-Italic.ttf
Normal file
BIN
Media/Montserrat-Italic.ttf
Normal file
Binary file not shown.
BIN
Media/Montserrat-Medium.ttf
Normal file
BIN
Media/Montserrat-Medium.ttf
Normal file
Binary file not shown.
BIN
Media/Montserrat-Regular.ttf
Normal file
BIN
Media/Montserrat-Regular.ttf
Normal file
Binary file not shown.
BIN
Media/Roboto-Medium.ttf
Normal file
BIN
Media/Roboto-Medium.ttf
Normal file
Binary file not shown.
BIN
Media/Roboto-Regular.ttf
Normal file
BIN
Media/Roboto-Regular.ttf
Normal file
Binary file not shown.
BIN
Media/Sizer.blp
Normal file
BIN
Media/Sizer.blp
Normal file
Binary file not shown.
BIN
Media/TSM_Icon2.blp
Normal file
BIN
Media/TSM_Icon2.blp
Normal file
Binary file not shown.
BIN
Media/TSM_Icon_Big.blp
Normal file
BIN
Media/TSM_Icon_Big.blp
Normal file
Binary file not shown.
BIN
Media/UIFrames.tga
Normal file
BIN
Media/UIFrames.tga
Normal file
Binary file not shown.
BIN
Media/globalEdgeFrame.blp
Normal file
BIN
Media/globalEdgeFrame.blp
Normal file
Binary file not shown.
BIN
Media/line.tga
Normal file
BIN
Media/line.tga
Normal file
Binary file not shown.
BIN
Media/matListEdgeFrame.blp
Normal file
BIN
Media/matListEdgeFrame.blp
Normal file
Binary file not shown.
BIN
Media/register.mp3
Normal file
BIN
Media/register.mp3
Normal file
Binary file not shown.
BIN
Media/striped.tga
Normal file
BIN
Media/striped.tga
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
43
Media/texturepack.py
Normal file
43
Media/texturepack.py
Normal file
@@ -0,0 +1,43 @@
|
||||
import json
|
||||
import sys
|
||||
|
||||
# Related commands:
|
||||
# BLPConverter.exe /FBLP_BGRA .\UIFrames.png
|
||||
# python .\texturepack.py .\UIFrames.json
|
||||
|
||||
assert(len(sys.argv) == 2)
|
||||
|
||||
with open(sys.argv[1]) as f:
|
||||
info = json.loads(f.read())
|
||||
|
||||
def get_image_name(file_name):
|
||||
name, ext = file_name.split(".")
|
||||
assert(ext in ("tga", "svg", "png"))
|
||||
return name
|
||||
|
||||
assert(info['meta']['scale'] == "1")
|
||||
total_w = info['meta']['size']['w']
|
||||
total_h = info['meta']['size']['h']
|
||||
name = get_image_name(info['meta']['image'])
|
||||
|
||||
OUTER_TEMPLATE = """
|
||||
\t\twidth = {},
|
||||
\t\theight = {},
|
||||
\t\tcoord = {{
|
||||
{}
|
||||
\t\t}}
|
||||
"""
|
||||
|
||||
inner_parts = []
|
||||
for file_name, frame_info in info['frames'].items():
|
||||
file_name = get_image_name(file_name)
|
||||
assert(not frame_info['trimmed'] and not frame_info['rotated'])
|
||||
x = frame_info['frame']['x']
|
||||
y = frame_info['frame']['y']
|
||||
w = frame_info['frame']['w']
|
||||
h = frame_info['frame']['h']
|
||||
inner_parts += ["\t\t\t[\"{}\"] = {{ {}, {}, {}, {} }}".format(file_name, x, x + w, y, y + h)]
|
||||
inner_parts.sort()
|
||||
|
||||
with open(name + ".lua", 'w') as f:
|
||||
f.write(OUTER_TEMPLATE.format(total_w, total_h, ",\n".join(inner_parts)))
|
||||
BIN
Media/triangle.tga
Normal file
BIN
Media/triangle.tga
Normal file
Binary file not shown.
Reference in New Issue
Block a user