-
Notifications
You must be signed in to change notification settings - Fork 0
/
使用说明.txt
31 lines (19 loc) · 1.89 KB
/
使用说明.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
本插件由纯Python代码构成,针对CSOL缔造者的UI.Box编写,可以让您一定程度放下双手,自动生成图片对应的Lua代码。
原理是读取图片进行分析,按照Lua与CSOL规范输出代码。
使用本插件可以实现:
1、导入jpeg/jpg/png/bmp,甚至GIF,同时支持多图导入
2、在软件内优化导入图像,使之更适合CSOL规定的UI.Box使用限制数量
3、快速生成代码
下载文件后,点击“main.py”启动(这里为了仪式感我把本在App文件夹里的又导入了一遍)
目前是中文版本,欢迎翻译。
GUI界面由Tkinter库编写,左侧是大片的图片展示区域,右侧是操作区。
现在介绍右侧内容:
-"选择图像":点击可导入图像文件,同样的菜单栏中“批处理”提供了gif、多图的导入方法’
-"起始坐标x,y":这里可以设定您的图片将在CSOL的哪个坐标显示,当然您由Lua代码功底的话,也可以不写。
通过在菜单栏"导出设置"加入对应的函数自己编写即可(提供了自动绘制、动画绘制等多个函数)
-"导出尺寸":上方输入框是 宽度设定,下方则是 高度,用来改变图片尺寸(注意:当您选择多图导入且大小不一时,此功能将把所有图片都变成这个尺寸)
输入完毕后,需要按下Enter键才有效,否则视作预设,不进行处理。
-"UI.Box变量前缀":若您分多次导出单个图片,软件默认的变量名称会发生冲突,这里可以加前缀来进行区分。
软件导出分为3个Table,名称分别是(您设置的前缀)+_cT/_bT/_sT 对应 颜色、Box和set
-"减色、优化图像、设置":由于优化图像,更适合UI.Box绘制。减少图片颜色、将图片的色块组成变成长方形(适合UI.box铺盖)'设置'提供了优化图片的一些设置阈值。
-"导出代码"根据图像生成Lua代码