├── FGUIProject
├── .objs
│ ├── cache
│ │ ├── 1n4czled
│ │ │ ├── sfv94
│ │ │ ├── sfv94.info
│ │ │ ├── xzq96
│ │ │ └── xzq96.info
│ │ └── 2w4fpdl4
│ │ │ ├── hbe5a
│ │ │ ├── hbe5a.info
│ │ │ ├── hbe5e
│ │ │ ├── hbe5e.info
│ │ │ ├── n8hd5
│ │ │ ├── n8hd5.info
│ │ │ ├── ofor0
│ │ │ └── ofor0.info
│ └── workspace.json
├── UI.fairy
├── assets
│ ├── Hotfix
│ │ ├── Component
│ │ │ ├── Lobby.xml
│ │ │ ├── Login.xml
│ │ │ └── TitleButton.xml
│ │ ├── Resource
│ │ │ ├── bg_button_1.png
│ │ │ ├── bg_button_2.png
│ │ │ ├── bg_content.png
│ │ │ ├── bg_input.png
│ │ │ └── bg_login.jpg
│ │ └── package.xml
│ └── Runtime
│ │ ├── Component
│ │ ├── Loading.xml
│ │ └── LoadingProgressBar.xml
│ │ ├── Resource
│ │ ├── bg_loading.jpg
│ │ ├── jindutiao_bar.png
│ │ └── jindutiao_bg.png
│ │ └── package.xml
├── plugins
│ └── FGUI2ET
│ │ ├── GenHotfix.lua
│ │ ├── GenRuntime.lua
│ │ ├── Main.lua
│ │ └── package.json
└── settings
│ ├── Adaptation.json
│ ├── Common.json
│ ├── CustomProperties.json
│ └── Publish.json
├── FairyGUI-Editor
├── FairyGUI-Editor.exe
├── FairyGUI-Editor_Data
│ ├── Plugins
│ │ ├── libglib-2.0-0.dll
│ │ ├── libgobject-2.0-0.dll
│ │ ├── libvips-42.dll
│ │ └── xlua.dll
│ ├── Resources
│ │ ├── unity default resources
│ │ └── unity_builtin_extra
│ ├── StreamingAssets
│ │ ├── Fonts
│ │ │ └── SourceHanSansCN-Medium.otf
│ │ ├── Locales
│ │ │ ├── en
│ │ │ │ ├── strings1.xml
│ │ │ │ └── strings2.xml
│ │ │ └── zh-CN
│ │ │ │ └── strings2.xml
│ │ └── Scripts
│ │ │ ├── GenCode_AS3.lua
│ │ │ ├── GenCode_CPP.lua
│ │ │ ├── GenCode_CSharp.lua
│ │ │ ├── GenCode_Egret.lua
│ │ │ ├── GenCode_Haxe.lua
│ │ │ ├── GenCode_PIXI.lua
│ │ │ ├── GenCode_TS.lua
│ │ │ └── Main.lua
│ ├── app.info
│ ├── boot.config
│ ├── globalgamemanagers
│ ├── globalgamemanagers.assets
│ ├── il2cpp_data
│ │ ├── Metadata
│ │ │ └── global-metadata.dat
│ │ ├── Resources
│ │ │ ├── I18N.CJK.dll-resources.dat
│ │ │ ├── NAudio.dll-resources.dat
│ │ │ ├── Newtonsoft.Json.dll-resources.dat
│ │ │ └── mscorlib.dll-resources.dat
│ │ └── etc
│ │ │ └── mono
│ │ │ ├── 2.0
│ │ │ ├── Browsers
│ │ │ │ └── Compat.browser
│ │ │ ├── DefaultWsdlHelpGenerator.aspx
│ │ │ ├── machine.config
│ │ │ ├── settings.map
│ │ │ └── web.config
│ │ │ ├── 4.0
│ │ │ ├── Browsers
│ │ │ │ └── Compat.browser
│ │ │ ├── DefaultWsdlHelpGenerator.aspx
│ │ │ ├── machine.config
│ │ │ ├── settings.map
│ │ │ └── web.config
│ │ │ ├── 4.5
│ │ │ ├── Browsers
│ │ │ │ └── Compat.browser
│ │ │ ├── DefaultWsdlHelpGenerator.aspx
│ │ │ ├── machine.config
│ │ │ ├── settings.map
│ │ │ └── web.config
│ │ │ ├── browscap.ini
│ │ │ ├── config
│ │ │ └── mconfig
│ │ │ └── config.xml
│ ├── level0
│ ├── level0.resS
│ ├── linear.assets
│ ├── resources.assets
│ ├── resources.assets.resS
│ └── sharedassets0.assets
├── GameAssembly.dll
├── UnityCrashHandler64.exe
├── UnityPlayer.dll
└── WinPixEventRuntime.dll
└── README.md
/FGUIProject/.objs/cache/1n4czled/sfv94:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DukeChiang/FGUI2ET/38d485a73f9c862a18d8ebd163555af4480993f8/FGUIProject/.objs/cache/1n4czled/sfv94
--------------------------------------------------------------------------------
/FGUIProject/.objs/cache/1n4czled/sfv94.info:
--------------------------------------------------------------------------------
1 | {
2 | "timestamp": 1589895561039,
3 | "modificationDate": 1584108945701,
4 | "fileSize": 843
5 | }
--------------------------------------------------------------------------------
/FGUIProject/.objs/cache/1n4czled/xzq96:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DukeChiang/FGUI2ET/38d485a73f9c862a18d8ebd163555af4480993f8/FGUIProject/.objs/cache/1n4czled/xzq96
--------------------------------------------------------------------------------
/FGUIProject/.objs/cache/1n4czled/xzq96.info:
--------------------------------------------------------------------------------
1 | {
2 | "timestamp": 1589895561039,
3 | "modificationDate": 1584108945702,
4 | "fileSize": 463
5 | }
--------------------------------------------------------------------------------
/FGUIProject/.objs/cache/2w4fpdl4/hbe5a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DukeChiang/FGUI2ET/38d485a73f9c862a18d8ebd163555af4480993f8/FGUIProject/.objs/cache/2w4fpdl4/hbe5a
--------------------------------------------------------------------------------
/FGUIProject/.objs/cache/2w4fpdl4/hbe5a.info:
--------------------------------------------------------------------------------
1 | {
2 | "timestamp": 1581917966411,
3 | "modificationDate": 1581920666980,
4 | "fileSize": 640
5 | }
--------------------------------------------------------------------------------
/FGUIProject/.objs/cache/2w4fpdl4/hbe5e:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DukeChiang/FGUI2ET/38d485a73f9c862a18d8ebd163555af4480993f8/FGUIProject/.objs/cache/2w4fpdl4/hbe5e
--------------------------------------------------------------------------------
/FGUIProject/.objs/cache/2w4fpdl4/hbe5e.info:
--------------------------------------------------------------------------------
1 | {
2 | "timestamp": 1589895561039,
3 | "modificationDate": 1584108945659,
4 | "fileSize": 545
5 | }
--------------------------------------------------------------------------------
/FGUIProject/.objs/cache/2w4fpdl4/n8hd5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DukeChiang/FGUI2ET/38d485a73f9c862a18d8ebd163555af4480993f8/FGUIProject/.objs/cache/2w4fpdl4/n8hd5
--------------------------------------------------------------------------------
/FGUIProject/.objs/cache/2w4fpdl4/n8hd5.info:
--------------------------------------------------------------------------------
1 | {
2 | "timestamp": 1581917966491,
3 | "modificationDate": 1580198997505,
4 | "fileSize": 465
5 | }
--------------------------------------------------------------------------------
/FGUIProject/.objs/cache/2w4fpdl4/ofor0:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DukeChiang/FGUI2ET/38d485a73f9c862a18d8ebd163555af4480993f8/FGUIProject/.objs/cache/2w4fpdl4/ofor0
--------------------------------------------------------------------------------
/FGUIProject/.objs/cache/2w4fpdl4/ofor0.info:
--------------------------------------------------------------------------------
1 | {
2 | "timestamp": 1589895561039,
3 | "modificationDate": 1584108945659,
4 | "fileSize": 1710
5 | }
--------------------------------------------------------------------------------
/FGUIProject/.objs/workspace.json:
--------------------------------------------------------------------------------
1 | {
2 | "expanded_nodes": [
3 | "2w4fpdl4",
4 | "/",
5 | "1n4czled",
6 | "/"
7 | ],
8 | "active_doc": [
9 | "1n4czled",
10 | "sfv94"
11 | ],
12 | "hidden_packages": [],
13 | "docs": [
14 | "2w4fpdl4",
15 | "ofor0",
16 | "2w4fpdl4",
17 | "hbe5a",
18 | "2w4fpdl4",
19 | "hbe5e",
20 | "1n4czled",
21 | "sfv94",
22 | "1n4czled",
23 | "xzq96"
24 | ]
25 | }
--------------------------------------------------------------------------------
/FGUIProject/UI.fairy:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/FGUIProject/assets/Hotfix/Component/Lobby.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/FGUIProject/assets/Hotfix/Component/Login.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/FGUIProject/assets/Hotfix/Component/TitleButton.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/FGUIProject/assets/Hotfix/Resource/bg_button_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DukeChiang/FGUI2ET/38d485a73f9c862a18d8ebd163555af4480993f8/FGUIProject/assets/Hotfix/Resource/bg_button_1.png
--------------------------------------------------------------------------------
/FGUIProject/assets/Hotfix/Resource/bg_button_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DukeChiang/FGUI2ET/38d485a73f9c862a18d8ebd163555af4480993f8/FGUIProject/assets/Hotfix/Resource/bg_button_2.png
--------------------------------------------------------------------------------
/FGUIProject/assets/Hotfix/Resource/bg_content.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DukeChiang/FGUI2ET/38d485a73f9c862a18d8ebd163555af4480993f8/FGUIProject/assets/Hotfix/Resource/bg_content.png
--------------------------------------------------------------------------------
/FGUIProject/assets/Hotfix/Resource/bg_input.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DukeChiang/FGUI2ET/38d485a73f9c862a18d8ebd163555af4480993f8/FGUIProject/assets/Hotfix/Resource/bg_input.png
--------------------------------------------------------------------------------
/FGUIProject/assets/Hotfix/Resource/bg_login.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DukeChiang/FGUI2ET/38d485a73f9c862a18d8ebd163555af4480993f8/FGUIProject/assets/Hotfix/Resource/bg_login.jpg
--------------------------------------------------------------------------------
/FGUIProject/assets/Hotfix/package.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/FGUIProject/assets/Runtime/Component/Loading.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/FGUIProject/assets/Runtime/Component/LoadingProgressBar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/FGUIProject/assets/Runtime/Resource/bg_loading.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DukeChiang/FGUI2ET/38d485a73f9c862a18d8ebd163555af4480993f8/FGUIProject/assets/Runtime/Resource/bg_loading.jpg
--------------------------------------------------------------------------------
/FGUIProject/assets/Runtime/Resource/jindutiao_bar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DukeChiang/FGUI2ET/38d485a73f9c862a18d8ebd163555af4480993f8/FGUIProject/assets/Runtime/Resource/jindutiao_bar.png
--------------------------------------------------------------------------------
/FGUIProject/assets/Runtime/Resource/jindutiao_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DukeChiang/FGUI2ET/38d485a73f9c862a18d8ebd163555af4480993f8/FGUIProject/assets/Runtime/Resource/jindutiao_bg.png
--------------------------------------------------------------------------------
/FGUIProject/assets/Runtime/package.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/FGUIProject/plugins/FGUI2ET/GenHotfix.lua:
--------------------------------------------------------------------------------
1 | local function genCode(handler)
2 | local settings = handler.project:GetSettings("Publish").codeGeneration
3 | local codePkgName = handler:ToFilename(handler.pkg.name); --convert chinese to pinyin, remove special chars etc.
4 | local exportCodePath = handler.exportCodePath..'/'..codePkgName
5 | local namespaceName = settings.packageName
6 |
7 | --CollectClasses(stripeMemeber, stripeClass, fguiNamespace)
8 | local classes = handler:CollectClasses(settings.ignoreNoname, settings.ignoreNoname, nil)
9 | handler:SetupCodeFolder(exportCodePath, "cs") --check if target folder exists, and delete old files
10 |
11 | local getMemberByName = settings.getMemberByName
12 |
13 | local classCnt = classes.Count
14 | local writer = CodeWriter.new()
15 | for i=0,classCnt-1 do
16 | local classInfo = classes[i]
17 | local members = classInfo.members
18 | writer:reset()
19 |
20 | writer:writeln('using FairyGUI;')
21 | writer:writeln('using System.Threading.Tasks;')
22 | writer:writeln()
23 | writer:writeln('namespace %s', namespaceName)
24 | writer:startBlock()
25 | -- 1
26 | writer:writeln([[[ObjectSystem]
27 | public class %sAwakeSystem : AwakeSystem<%s, GObject>
28 | {
29 | public override void Awake(%s self, GObject go)
30 | {
31 | self.Awake(go);
32 | }
33 | }
34 | ]],classInfo.className,classInfo.className,classInfo.className)
35 |
36 | writer:writeln([[public sealed class %s : FUI
37 | {
38 | public const string UIPackageName = "%s";
39 | public const string UIResName = "%s";
40 |
41 | ///
42 | /// {uiResName}的组件类型(GComponent、GButton、GProcessBar等),它们都是GObject的子类。
43 | ///
44 | public %s self;
45 | ]],classInfo.className,codePkgName,classInfo.resName,classInfo.superClassName)
46 |
47 | local memberCnt = members.Count
48 | for j=0,memberCnt-1 do
49 | local memberInfo = members[j]
50 | writer:writeln('public %s %s;', memberInfo.type, memberInfo.varName)
51 | end
52 | writer:writeln('public const string URL = "ui://%s%s";', handler.pkg.id, classInfo.resId)
53 | writer:writeln()
54 |
55 | writer:writeln([[private static GObject CreateGObject()
56 | {
57 | return UIPackage.CreateObject(UIPackageName, UIResName);
58 | }
59 |
60 | private static void CreateGObjectAsync(UIPackage.CreateObjectCallback result)
61 | {
62 | UIPackage.CreateObjectAsync(UIPackageName, UIResName, result);
63 | }
64 | ]])
65 |
66 | writer:writeln([[public static %s CreateInstance(Entity domain)
67 | {
68 | return EntityFactory.Create<%s, GObject>(domain, CreateGObject());
69 | }
70 | ]],classInfo.className,classInfo.className)
71 |
72 | writer:writeln([[public static Task<%s> CreateInstanceAsync(Entity domain)
73 | {
74 | TaskCompletionSource<%s> tcs = new TaskCompletionSource<%s>();
75 |
76 | CreateGObjectAsync((go) =>
77 | {
78 | tcs.SetResult(EntityFactory.Create<%s, GObject>(domain, go));
79 | });
80 |
81 | return tcs.Task;
82 | }
83 | ]],classInfo.className,classInfo.className,classInfo.className,classInfo.className)
84 |
85 | writer:writeln([[public static %s Create(Entity domain, GObject go)
86 | {
87 | return EntityFactory.Create<%s, GObject>(domain, go);
88 | }
89 | ]],classInfo.className,classInfo.className)
90 |
91 | writer:writeln([[///
92 | /// 通过此方法获取的FUI,在Dispose时不会释放GObject,需要自行管理(一般在配合FGUI的Pool机制时使用)。
93 | ///
94 | public static %s GetFormPool(Entity domain, GObject go)
95 | {
96 | var fui = go.Get<%s>();
97 |
98 | if(fui == null)
99 | {
100 | fui = Create(domain, go);
101 | }
102 |
103 | fui.isFromFGUIPool = true;
104 |
105 | return fui;
106 | }
107 | ]],classInfo.className,classInfo.className)
108 |
109 | writer:writeln([[public void Awake(GObject go)
110 | {
111 | if(go == null)
112 | {
113 | return;
114 | }
115 |
116 | GObject = go;
117 |
118 | if (string.IsNullOrWhiteSpace(Name))
119 | {
120 | Name = Id.ToString();
121 | }
122 |
123 | self = (%s)go;
124 |
125 | self.Add(this);
126 |
127 | var com = go.asCom;
128 |
129 | if(com != null)
130 | {
131 | ]],classInfo.superClassName)
132 |
133 | for j=0,memberCnt-1 do
134 | local memberInfo = members[j]
135 | local typeName = memberInfo.type
136 | if memberInfo.group==0 then
137 | if getMemberByName then
138 | -- 判断是不是我们自定义类型
139 | local isCustomComponent = false
140 | for i = 0, classCnt - 1 do
141 | if typeName == classes[i].className then
142 | isCustomComponent = true
143 | break
144 | end
145 | end
146 | if isCustomComponent then
147 | writer:writeln('\t\t%s = %s.Create(domain, com.GetChild("%s"));', memberInfo.varName, memberInfo.type, memberInfo.name)
148 | else
149 | writer:writeln('\t\t%s = (%s)com.GetChild("%s");', memberInfo.varName, memberInfo.type, memberInfo.name)
150 | end
151 | else
152 | local isCustomComponent = false
153 | for i = 0, classCnt - 1 do
154 | if typeName == classes[i].className then
155 | isCustomComponent = true
156 | break
157 | end
158 | end
159 | if isCustomComponent then
160 | writer:writeln('\t\t%s = %s.Create(domain, com.GetChildAt(%s));', memberInfo.varName, memberInfo.type, memberInfo.index)
161 | else
162 | writer:writeln('\t\t%s = (%s)com.GetChildAt(%s);', memberInfo.varName, memberInfo.type, memberInfo.index)
163 | end
164 | end
165 | elseif memberInfo.group==1 then
166 | if getMemberByName then
167 | writer:writeln('\t\t%s = com.GetController("%s");', memberInfo.varName, memberInfo.name)
168 | else
169 | writer:writeln('\t\t%s = com.GetControllerAt(%s);', memberInfo.varName, memberInfo.index)
170 | end
171 | else
172 | if getMemberByName then
173 | writer:writeln('\t\t%s = com.GetTransition("%s");', memberInfo.varName, memberInfo.name)
174 | else
175 | writer:writeln('\t\t%s = com.GetTransitionAt(%s);', memberInfo.varName, memberInfo.index)
176 | end
177 | end
178 | end
179 | writer:writeln('\t}')
180 |
181 | writer:endBlock()
182 |
183 | writer:writeln([[ public override void Dispose()
184 | {
185 | if(IsDisposed)
186 | {
187 | return;
188 | }
189 |
190 | base.Dispose();
191 |
192 | self.Remove();
193 | self = null;
194 | ]])
195 |
196 | for j=0,memberCnt-1 do
197 | local memberInfo = members[j]
198 | local typeName = memberInfo.type
199 | if memberInfo.group==0 then
200 | if getMemberByName then
201 | if string.find(typeName,'FUI') then
202 | writer:writeln('\t\t\t%s.Dispose();', memberInfo.varName)
203 | end
204 | writer:writeln('\t\t\t%s = null;', memberInfo.varName)
205 | else
206 | if string.find(typeName,'FUI') then
207 | writer:writeln('\t\t\t%s.Dispose();', memberInfo.varName)
208 | end
209 | writer:writeln('\t\t\t%s = null;', memberInfo.varName)
210 | end
211 | elseif memberInfo.group==1 then
212 | if getMemberByName then
213 | writer:writeln('\t\t\t%s = null;', memberInfo.varName)
214 | else
215 | writer:writeln('\t\t\t%s = null;', memberInfo.varName)
216 | end
217 | else
218 | if getMemberByName then
219 | writer:writeln('\t\t\t%s = null;', memberInfo.varName)
220 | else
221 | writer:writeln('\t\t\t%s = null;', memberInfo.varName)
222 | end
223 | end
224 | end
225 | writer:writeln('\t\t}')
226 |
227 | writer:endBlock() --class
228 | writer:endBlock() --namepsace
229 |
230 | writer:save(exportCodePath..'/'..classInfo.className..'.cs')
231 | end
232 |
233 | -- 写入fuipackage
234 | writer:reset()
235 |
236 | writer:writeln('namespace %s', namespaceName)
237 | writer:startBlock()
238 | writer:writeln('public static partial class FUIPackage')
239 | writer:startBlock()
240 |
241 | writer:writeln('public const string %s = "%s";',codePkgName,codePkgName)
242 |
243 | -- 生成所有的
244 | local itemCount = handler.items.Count
245 | for i=0,itemCount-1 do
246 | writer:writeln('public const string %s_%s = "ui://%s/%s";',codePkgName,handler.items[i].name,codePkgName,handler.items[i].name)
247 | end
248 |
249 |
250 | writer:endBlock() --class
251 | writer:endBlock() --namespace
252 | local binderPackageName = 'Package'..codePkgName
253 | writer:save(exportCodePath..'/'..binderPackageName..'.cs')
254 | end
255 |
256 | return genCode
257 |
--------------------------------------------------------------------------------
/FGUIProject/plugins/FGUI2ET/GenRuntime.lua:
--------------------------------------------------------------------------------
1 | local function genCode(handler)
2 | local settings = handler.project:GetSettings("Publish").codeGeneration
3 | local codePkgName = handler:ToFilename(handler.pkg.name); --convert chinese to pinyin, remove special chars etc.
4 | local exportCodePath = handler.exportCodePath..'/'..codePkgName
5 | local namespaceName = codePkgName
6 |
7 | if settings.packageName ~= nil and settings.packageName~='' then
8 | namespaceName = settings.packageName .. namespaceName;
9 | end
10 |
11 | --CollectClasses(stripeMemeber, stripeClass, fguiNamespace)
12 | local classes = handler:CollectClasses(settings.ignoreNoname, settings.ignoreNoname, nil)
13 | handler:SetupCodeFolder(exportCodePath, "cs") --check if target folder exists, and delete old files
14 |
15 | local getMemberByName = settings.getMemberByName
16 |
17 | local classCnt = classes.Count
18 | local writer = CodeWriter.new()
19 | for i=0,classCnt-1 do
20 | local classInfo = classes[i]
21 | local members = classInfo.members
22 | writer:reset()
23 |
24 | writer:writeln('using FairyGUI;')
25 | writer:writeln('using FairyGUI.Utils;')
26 | writer:writeln()
27 | writer:writeln('namespace %s', namespaceName)
28 | writer:startBlock()
29 | writer:writeln('public partial class %s : %s', classInfo.className, classInfo.superClassName)
30 | writer:startBlock()
31 |
32 | local memberCnt = members.Count
33 | for j=0,memberCnt-1 do
34 | local memberInfo = members[j]
35 | writer:writeln('public %s %s;', memberInfo.type, memberInfo.varName)
36 | end
37 | writer:writeln('public const string URL = "ui://%s%s";', handler.pkg.id, classInfo.resId)
38 | writer:writeln()
39 |
40 | writer:writeln('public static %s CreateInstance()', classInfo.className)
41 | writer:startBlock()
42 | writer:writeln('return (%s)UIPackage.CreateObject("%s", "%s");', classInfo.className, handler.pkg.name, classInfo.resName)
43 | writer:endBlock()
44 | writer:writeln()
45 |
46 | if handler.project.type==ProjectType.MonoGame then
47 | writer:writeln("protected override void OnConstruct()")
48 | writer:startBlock()
49 | else
50 | writer:writeln('public override void ConstructFromXML(XML xml)')
51 | writer:startBlock()
52 | writer:writeln('base.ConstructFromXML(xml);')
53 | writer:writeln()
54 | end
55 | for j=0,memberCnt-1 do
56 | local memberInfo = members[j]
57 | if memberInfo.group==0 then
58 | if getMemberByName then
59 | writer:writeln('%s = (%s)GetChild("%s");', memberInfo.varName, memberInfo.type, memberInfo.name)
60 | else
61 | writer:writeln('%s = (%s)GetChildAt(%s);', memberInfo.varName, memberInfo.type, memberInfo.index)
62 | end
63 | elseif memberInfo.group==1 then
64 | if getMemberByName then
65 | writer:writeln('%s = GetController("%s");', memberInfo.varName, memberInfo.name)
66 | else
67 | writer:writeln('%s = GetControllerAt(%s);', memberInfo.varName, memberInfo.index)
68 | end
69 | else
70 | if getMemberByName then
71 | writer:writeln('%s = GetTransition("%s");', memberInfo.varName, memberInfo.name)
72 | else
73 | writer:writeln('%s = GetTransitionAt(%s);', memberInfo.varName, memberInfo.index)
74 | end
75 | end
76 | end
77 | writer:endBlock()
78 |
79 | writer:endBlock() --class
80 | writer:endBlock() --namepsace
81 |
82 | writer:save(exportCodePath..'/'..classInfo.className..'.cs')
83 | end
84 |
85 | writer:reset()
86 |
87 | local binderName = codePkgName..'Binder'
88 |
89 | writer:writeln('using FairyGUI;')
90 | writer:writeln()
91 | writer:writeln('namespace %s', namespaceName)
92 | writer:startBlock()
93 | writer:writeln('public class %s', binderName)
94 | writer:startBlock()
95 |
96 | writer:writeln('public static void BindAll()')
97 | writer:startBlock()
98 | for i=0,classCnt-1 do
99 | local classInfo = classes[i]
100 | writer:writeln('UIObjectFactory.SetPackageItemExtension(%s.URL, typeof(%s));', classInfo.className, classInfo.className)
101 | end
102 | writer:endBlock() --bindall
103 |
104 | writer:endBlock() --class
105 | writer:endBlock() --namespace
106 |
107 | writer:save(exportCodePath..'/'..binderName..'.cs')
108 | end
109 |
110 | return genCode
--------------------------------------------------------------------------------
/FGUIProject/plugins/FGUI2ET/Main.lua:
--------------------------------------------------------------------------------
1 | local genHotfix = require(PluginPath..'/GenHotfix')
2 | local genRuntime = require(PluginPath..'/GenRuntime')
3 |
4 | function onPublish(handler)
5 | if not handler.genCode then
6 | handler.genCode = false
7 | genHotfix(handler)
8 | else
9 | handler.genCode = false
10 | genRuntime(handler)
11 | end
12 | end
--------------------------------------------------------------------------------
/FGUIProject/plugins/FGUI2ET/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "FGUI2ET",
3 | "displayName": "FGUI2ET",
4 | "description": "FairyGUI自动生成ET代码的插件",
5 | "version": "1.0",
6 | "author": {
7 | "name": "DukeChiang"
8 | },
9 | "icon": "",
10 | "main": "Main.lua"
11 | }
--------------------------------------------------------------------------------
/FGUIProject/settings/Adaptation.json:
--------------------------------------------------------------------------------
1 | {
2 | "defaultResolution":"1920,1080",
3 | "designResolutionX":1920,
4 | "designResolutionY":1080,
5 | "scaleMode":"ScaleWithScreenSize",
6 | "screenMathMode":"MatchWidthOrHeight"
7 | }
--------------------------------------------------------------------------------
/FGUIProject/settings/Common.json:
--------------------------------------------------------------------------------
1 | {
2 | "buttonClickSound":"",
3 | "colorScheme":["自定义颜色 #FF0000"],
4 | "font":"FZXuanZhenZhuanBianS-R-GB",
5 | "fontScheme":["默认字体"],
6 | "fontSize":12,
7 | "fontSizeScheme":["自定义字体大小 30"],
8 | "scrollBars":{
9 | "defaultDisplay":"visible",
10 | "horizontal":"",
11 | "vertical":""
12 | },
13 | "textColor":"#000000",
14 | "tipsRes":""
15 | }
--------------------------------------------------------------------------------
/FGUIProject/settings/CustomProperties.json:
--------------------------------------------------------------------------------
1 | {
2 | "FGUI2ET":"Yes",
3 | "FGUI2ET.ClassNamePrefix":"FUI",
4 | "FGUI2ET.GetMemberByIndexOrName":"Name",
5 | "FGUI2ET.GetMemberByTypeOrName":"Name",
6 | "FGUI2ET.NameSpace":"DCET",
7 | "FGUI2ET.Outpath":"F:\\DukeChiangGit\\ET\\Unity\\Assets\\Hotfix\\FairyGUI\\AutoGeneratedCode"
8 | }
--------------------------------------------------------------------------------
/FGUIProject/settings/Publish.json:
--------------------------------------------------------------------------------
1 | {
2 | "binaryFormat":true,
3 | "codeGeneration":{
4 | "classNamePrefix":"FUI",
5 | "codePath":"F:\\DukeChiangGit\\ET\\Unity\\Assets\\Runtime\\FairyGUI\\AutoGeneratedCode",
6 | "codeType":"",
7 | "getMemberByName":true,
8 | "ignoreNoname":true,
9 | "memberNamePrefix":"",
10 | "packageName":"DCET"
11 | },
12 | "compressDesc":true,
13 | "fileExtension":"",
14 | "packageCount":2,
15 | "path":"F:\\DukeChiangGit\\ET\\Unity\\Assets\\Resources\\FUI"
16 | }
--------------------------------------------------------------------------------
/FairyGUI-Editor/FairyGUI-Editor.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DukeChiang/FGUI2ET/38d485a73f9c862a18d8ebd163555af4480993f8/FairyGUI-Editor/FairyGUI-Editor.exe
--------------------------------------------------------------------------------
/FairyGUI-Editor/FairyGUI-Editor_Data/Plugins/libglib-2.0-0.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DukeChiang/FGUI2ET/38d485a73f9c862a18d8ebd163555af4480993f8/FairyGUI-Editor/FairyGUI-Editor_Data/Plugins/libglib-2.0-0.dll
--------------------------------------------------------------------------------
/FairyGUI-Editor/FairyGUI-Editor_Data/Plugins/libgobject-2.0-0.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DukeChiang/FGUI2ET/38d485a73f9c862a18d8ebd163555af4480993f8/FairyGUI-Editor/FairyGUI-Editor_Data/Plugins/libgobject-2.0-0.dll
--------------------------------------------------------------------------------
/FairyGUI-Editor/FairyGUI-Editor_Data/Plugins/libvips-42.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DukeChiang/FGUI2ET/38d485a73f9c862a18d8ebd163555af4480993f8/FairyGUI-Editor/FairyGUI-Editor_Data/Plugins/libvips-42.dll
--------------------------------------------------------------------------------
/FairyGUI-Editor/FairyGUI-Editor_Data/Plugins/xlua.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DukeChiang/FGUI2ET/38d485a73f9c862a18d8ebd163555af4480993f8/FairyGUI-Editor/FairyGUI-Editor_Data/Plugins/xlua.dll
--------------------------------------------------------------------------------
/FairyGUI-Editor/FairyGUI-Editor_Data/Resources/unity default resources:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DukeChiang/FGUI2ET/38d485a73f9c862a18d8ebd163555af4480993f8/FairyGUI-Editor/FairyGUI-Editor_Data/Resources/unity default resources
--------------------------------------------------------------------------------
/FairyGUI-Editor/FairyGUI-Editor_Data/Resources/unity_builtin_extra:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DukeChiang/FGUI2ET/38d485a73f9c862a18d8ebd163555af4480993f8/FairyGUI-Editor/FairyGUI-Editor_Data/Resources/unity_builtin_extra
--------------------------------------------------------------------------------
/FairyGUI-Editor/FairyGUI-Editor_Data/StreamingAssets/Fonts/SourceHanSansCN-Medium.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DukeChiang/FGUI2ET/38d485a73f9c862a18d8ebd163555af4480993f8/FairyGUI-Editor/FairyGUI-Editor_Data/StreamingAssets/Fonts/SourceHanSansCN-Medium.otf
--------------------------------------------------------------------------------
/FairyGUI-Editor/FairyGUI-Editor_Data/StreamingAssets/Locales/en/strings2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Cut
5 | Copy
6 | Paste
7 | Delete
8 | Select All
9 | Arrange Top
10 | Arrange Up
11 | Arrange Down
12 | Arrange Bottom
13 | Replace Element
14 | Show In Library
15 | Could not use the non export resources of other packages
16 | Can not put the components themselves
17 | Create failed
18 | Convert To Component
19 | Convert To Bitmap
20 | Unselect All
21 | Paste In Center
22 | Paste In Place
23 | Assets
24 | Undo
25 | Redo
26 | Same names found: {0}
27 | No messages or warnings.
28 | Change the layer of design drawings
29 | Group
30 | Ungroup
31 | Align Left
32 | Align Center
33 | Align Right
34 | Align Top
35 | Align Middle
36 | Align Bottom
37 | Same Width
38 | Same Height
39 | Grid layout
40 | Uniform Row Spacing
41 | Uniform Column spacing
42 | Exchange Position
43 | Add Point
44 | Remove Point
45 | Quit
46 | Smooth
47 | Close
48 | Close Others
49 | Close to the Right
50 | Close All
51 | Save Document
52 | Save All Documents
53 | Close Document
54 | Back To Previous
55 | Test
56 | Zoom In
57 | Zoom Out
58 | Restore Scale
59 | Replace group not allowed, skipped
60 |
61 |
62 | Copy URL
63 | Rename
64 | Create Folder
65 | Set Exported
66 | Set Not Exported
67 | Update Resource
68 | Open with Default Application
69 | Reveal in Explorer
70 | Reveal in Finder
71 | Delete
72 | Package Settings
73 | Publish
74 | Remove Package
75 | Are you sure to delete {0} and other {1} items?
76 | Note: this operation can not be recovered.
77 | Are you sure to delete ‘{0}’?
78 | Note: this operation can not be recovered.
79 | Are you sure to delete ‘{0}’?
80 | Are you sure to move '{0}' and other {1} items to '{2}'?
81 | Dependent query
82 | Select Save directory
83 | Copy Name
84 | {0} results.
85 | Move To
86 | Duplicate
87 | Add To Favorites
88 | Remove From Favorites
89 | Paste All
90 | Collapse All
91 | Find
92 | Edit Groups
93 | All Packages
94 | New Group
95 | My Workspace(Local)
96 | Trunk
97 | New Branch
98 | Current project has no branches!
99 | Please switch to branches first!
100 | Branch
101 | Are you sure to rename the branch?
102 | Resources that cannot operate on different packages at the same time
103 | Locate Current Document
104 |
105 |
106 | Create Project
107 | Open Project
108 | New Window
109 | Close Project
110 | Project Settings
111 | Create Package
112 | Import Package
113 | Publish Settings
114 | Preference
115 | Close Window
116 | File
117 | About
118 | Help
119 | Import Resources
120 | All Resource Files
121 | All Files
122 | All Image Files
123 | Flash SWF
124 | Animation Files
125 | Font Files
126 | Media Files
127 | FairyGUI Project
128 | XML Files
129 | Update Resource
130 | Import failed
131 | Select Package
132 | Importing
133 | Edit
134 | Property
135 | Create Component
136 | Create Button
137 | Create Label
138 | Create ComboBox
139 | Create ScrollBar
140 | Create ProgressBar
141 | Create Slider
142 | Create PopupMenu
143 | Import Resource
144 | Dependent Query
145 | Strings Export And Import
146 | Publish Desc Only
147 | Create Bitmap Font
148 | Create MovieClip
149 | Create Window Frame
150 | Tool
151 | New version {0} available, install now?
152 | Install completed, restart now?
153 | Currently the latest version
154 | Import Resource Package
155 | Export Resource Package
156 | Check for Updates
157 | Import Standard Package
158 | Open big text edit form
159 | Online Help
160 | Support
161 | Upgrade to Pro Version
162 | Quit FairyGUI
163 | FairyGUI Editor
164 | Open Recent
165 | Welcome
166 | Failed to open the language file
167 | Revert Factory Settings
168 |
169 |
170 | Resource Size
171 | Preview Components
172 |
173 |
174 | Select All
175 | Select None
176 | Select Reversed
177 | Drag from Library
178 | Show in Library
179 | Copy URL
180 | Clear
181 | Open
182 | Can only choose pictures
183 |
184 |
185 | Create Controller
186 | Edit Controller
187 | Are you sure to delete?
188 | (Any Page)
189 | Play Transition
190 | Switch other controller
191 | (Same Index Page)
192 | (Same Name Page)
193 |
194 |
195 | Font
196 |
197 |
198 | MovieClip
199 |
200 |
201 | Create package failed
202 |
203 |
204 | Create project failed
205 | Select Project Location
206 |
207 |
208 | Download new version failed
209 |
210 |
211 | Can only choose pictures
212 | Can only choose resources in same package
213 |
214 |
215 | Load image failed
216 |
217 |
218 | Edit MovieClip
219 | SpriteSheet
220 |
221 |
222 | Publish Success!
223 | The following is a warning message, but it can be ignored.
224 | {0} items are excluded.
225 | Publish failed
226 | Publishing
227 | File path of '{0}' is not set
228 | File name of '{0}' is not set
229 | Failed to generate code for '{0}', reason: code path is not set!
230 | please check the path
231 | The animation '{0}' is automatically published to different atlas pages, which causes runtime display errors. Please adjust manually.
232 | Alone
233 | The need for texture size over {0}x{1}.
234 | Target file has been opened, can not cover!
235 | File format error
236 | Publish path is empty or not correct!
237 | Code path is empty or not correct!
238 |
239 |
240 | Trying to complete your request...
241 |
242 |
243 | Abg 123
244 |
245 |
246 | Input new name for '{0}'
247 |
248 |
249 | The resource type of source and destination is not the same, cannot be replaced!
250 |
251 |
252 | New branch name
253 | Branch with the same name is already exists.
254 | Are you sure to delete branch '{0}'?
255 |
256 |
257 | Unable to read the package in
258 | Image not exists
259 | Resource not exists
260 | The specified name has been used.
261 | Does not support fonts containing multiple textures
262 | Folder
263 | No data of action 0!
264 | Container
265 | Component
266 | Multiple Objects
267 | Component creation of '{0}' is recursive
268 |
269 |
270 | The specified location does not have a UI project!
271 | Custom color
272 | Custom font size
273 | Default font
274 | Is not a legal package
275 | Packages already exist, cannot cover!
276 | The name cannot contain character .:*?<>|/\
277 | Name can not be empty
278 |
279 |
280 | Default
281 | No
282 | Yes
283 | (None)
284 | Restore to default
285 |
286 |
287 | Default
288 | Alone
289 | Multiple Of 4
290 |
291 |
292 | Visible
293 | Visible on scrolling
294 | Hidden
295 |
296 |
297 | Not in Atlas
298 | In Atlas
299 |
300 |
301 | Check
302 | Radio
303 | Common
304 |
305 |
306 | Percentage
307 | Current/Max
308 | Current
309 | Max
310 |
311 |
312 | Visible
313 | Clipped
314 | Scroll
315 |
316 |
317 | Scroll Vertical
318 | Scroll Horizontal
319 | Scroll Free
320 |
321 |
322 | Button
323 | Label
324 | ProgressBar
325 | ScrollBar
326 | Slider
327 | ComboBox
328 |
329 |
330 | Empty
331 | Rectangle
332 | Circle
333 | Regular Polygon
334 | Polygon
335 |
336 |
337 | Single Column
338 | Single Row
339 | Flow Horizontal
340 | Flow Vertical
341 | Pagination
342 |
343 |
344 | Single
345 | Multiple(Shift)
346 | Multiple(Click)
347 | None
348 |
349 |
350 | Left
351 | Center
352 | Right
353 |
354 |
355 | Top
356 | Middle
357 | Bottom
358 |
359 |
360 | Show All
361 | Exact Fit
362 | Fixed Height
363 | Fixed Width
364 | No Border
365 |
366 |
367 | Display
368 | Position (X/Y)
369 | Size (W/H/ScaleX/ScaleY)
370 | Color
371 | Animation
372 | Look (Alpha/Rot/Grayed/Touch)
373 | Text
374 | Icon
375 | Display-2
376 | Font Size
377 |
378 |
379 | Width+Height
380 | Height
381 | Shrink
382 |
383 |
384 | None
385 | Left
386 | Center
387 | Right
388 | Top
389 | Middle
390 | Bottom
391 | Width
392 | Height
393 | LExt
394 | RExt
395 | TExt
396 | BExt
397 | Center-Center
398 | Middle-Middle
399 |
400 |
401 | Horizontal
402 | Vertical
403 | Radial90
404 | Radial180
405 | Radial360
406 |
407 |
408 | Left
409 | Right
410 | Top
411 | Bottom
412 | TopLeft
413 | BottomLeft
414 | TopRight
415 | BottomRight
416 |
417 |
418 | Select files to import
419 | Export Success
420 | XML Files
421 | Please save all files first
422 | Unable to import
423 | Import Success!
424 | Import Success!
425 |
426 | The following is a warning message, but it can be ignored.
427 |
428 |
429 | Change Position
430 | Change Size
431 | Change Alpha
432 | Change Rotation
433 | Change Scale
434 | Change Color
435 | Change Animation
436 | Change Pivot
437 | Set as Key Frame
438 | Clear Key Frame
439 | Insert Frame
440 | Remove Frame
441 | Remove Timeline
442 | Copy Timeline
443 | Paste Timeline
444 | Change Target
445 | Timeline is not empty, do you want to delete it?
446 | Change Controller
447 | Play Sound
448 | Play Transition
449 | Play Shaking
450 | Change Visibility
451 | Change ColorFilter
452 | Change Skew
453 | Change Text
454 | Change Icon
455 | Are you sure to delete the transition?
456 | Create Tween
457 | Remove Tween
458 | Edit Path
459 |
460 |
461 | Importing{0}/{1}...
462 |
463 |
464 | Blank
465 | Are you sure to reset all to default?
466 | (Main Menu)
467 | (Library Panel)
468 | (Document)
469 | Language has been changed. Do you want to restart now?
470 |
471 |
472 | Professional Edition
473 | Community Edition
474 | Subscription up to
475 | Expired
476 | License key is invalid!
477 | License key is expired!
478 |
479 |
480 | Toggle color space
481 | The color space has been switched. Do you want to restart now?
482 |
483 |
484 | Center
485 | Top Left
486 | Top Right
487 | Bottom Left
488 | Bottom Right
489 |
490 |
491 | Dark
492 | Scale
493 |
494 |
495 | Default
496 | Enabled
497 | Disabled
498 |
499 |
500 | Color
501 |
502 |
503 | ASCII
504 | NumbersAndPunctuation
505 | URL
506 | NumberPad
507 | PhonePad
508 | EMail
509 |
510 |
511 | Your project is created using a low version of the FairyGUI editor.
512 | If you need to open this project in this version of the FairyGUI editor, you need to perform a data format upgrade.
513 | Click "yes" to start the upgrade, you will be asked to select a different folder to place the upgraded project.
514 | After the upgrade, the new location will be opened, and the original project will not make any changes.
515 | Select upgraded project location
516 | Upgrading'{0}'
517 |
518 |
519 | Auto
520 | Always Ask
521 | Disabled
522 |
523 |
524 | Export failed!
525 |
526 |
527 | An object of this type cannot be set
528 |
529 |
530 | Ascent
531 | Descent
532 | Arch
533 |
534 |
535 | Basic
536 | Button
537 | ComboBox
538 | Component
539 | Effect
540 | Etc
541 | Control
542 | Graphics
543 | Group
544 | Image
545 | Label
546 | List
547 | Loader
548 | MovieClip
549 | ProgressBar
550 | Relations
551 | RichText
552 | InputText
553 | ScrollBar
554 | Slider
555 | SWF
556 | Text
557 | Frame
558 | Transition
559 | Design Image
560 | Custom Property
561 | Frame Value
562 | Bounds
563 | List Item
564 | Model/Particals
565 |
566 |
567 | Library
568 | Inspector
569 | Timeline
570 | Hierarchy
571 | Preview
572 | View
573 | Transitions
574 | Favorties
575 | Search
576 | Console
577 | Reference
578 | Plug-In
579 |
580 |
581 | Select Path
582 | The project is already open in another window
583 | Are you sure you want to revoke the authorization?
584 | Png compression tool is not set, please configure external tools in the preferences dialog first. You can download it from: {0}
585 | Find unused resource
586 | {0} packages selected
587 | Find duplicate resource
588 | Please choose more than one resources to merge
589 |
590 |
--------------------------------------------------------------------------------
/FairyGUI-Editor/FairyGUI-Editor_Data/StreamingAssets/Locales/zh-CN/strings2.xml:
--------------------------------------------------------------------------------
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 | 发现元件名字相同:{0}
27 | 当前文档没有提示或警告。
28 | 调整设计图层次
29 | 组合
30 | 取消组合
31 | 左对齐
32 | 左右居中对齐
33 | 右对齐
34 | 上对齐
35 | 上下居中对齐
36 | 下对齐
37 | 相同宽度
38 | 相同高度
39 | 表格排列
40 | 均匀行距
41 | 均匀列距
42 | 交换位置
43 | 增加点
44 | 删除点
45 | 退出
46 | 平滑
47 | 关闭
48 | 关闭其他文档
49 | 关闭右侧文档
50 | 关闭所有文档
51 | 保存文档
52 | 保存所有文档
53 | 关闭当前文档
54 | 打开前一个文档
55 | 测试
56 | 放大舞台
57 | 缩小舞台
58 | 重置舞台比例
59 | 不允许替换组,已跳过
60 |
61 |
62 | 复制URL
63 | 重命名
64 | 新建文件夹
65 | 设置为导出
66 | 设置为不导出
67 | 更新资源
68 | 使用外部程序打开
69 | 在文件管理器中打开
70 | 在访达中打开
71 | 删除
72 | 包设置
73 | 发布
74 | 删除包
75 | 确实要删除 ‘{0}’ 等{1}个项吗?
76 | 注意:此操作不可回退。
77 | 确实要删除 ‘{0}’ 吗?
78 | 注意:此操作不可回退。
79 | 确实要删除包 ‘{0}’ 吗?
80 | 确实要移动 ‘{0}’ 等{1}个项到包 ‘{2}’ 吗?
81 | 依赖关系查询
82 | 选择保存目录
83 | 复制名称
84 | {0}个结果
85 | 移动至
86 | 直接复制
87 | 加入收藏
88 | 取消收藏
89 | 粘贴全部
90 | 全部折叠
91 | 查找
92 | 编辑分组
93 | 所有包
94 | 新的分组
95 | 我的工作区(本地)
96 | 主干
97 | 创建分支
98 | 当前项目没有分支!
99 | 请先切换项目到分支!
100 | 分支
101 | 确实要重名名分支吗?
102 | 不能同时操作不同包的资源
103 | 定位当前文档
104 |
105 |
106 | 新建项目
107 | 打开项目
108 | 新建窗口
109 | 关闭项目
110 | 项目设置
111 | 新建包
112 | 导入包
113 | 发布设置
114 | 首选项
115 | 关闭窗口
116 | 文件
117 | 关于
118 | 帮助
119 | 导入资源到包
120 | 所有资源文件
121 | 所有文件
122 | 图片文件
123 | Flash动画文件
124 | 动画文件
125 | 字体文件
126 | 声音文件
127 | FairyGUI项目
128 | XML文件
129 | 更新资源
130 | 导入失败
131 | 选择包
132 | 正在导入
133 | 编辑
134 | 属性
135 | 新建组件
136 | 新建按钮
137 | 新建标签
138 | 新建下拉框
139 | 新建滚动条
140 | 新建进度条
141 | 新建滑动条
142 | 新建弹出菜单
143 | 导入素材
144 | 依赖关系查询
145 | 字符串导入和导出
146 | 仅发布定义包
147 | 新建位图字体
148 | 新建动画
149 | 新建窗口框架
150 | 工具
151 | 新版本{0}可用,是否立即更新?
152 | 新版本更新完毕,是否立即重启?
153 | 已经是最新版本
154 | 导入资源包
155 | 导出资源包
156 | 检查更新
157 | 导入内置资源包
158 | 打开大文本编辑窗口
159 | 在线教程
160 | 技术支持
161 | 升级为专业版
162 | 退出 FairyGUI 编辑器
163 | FairyGUI 编辑器
164 | 最近打开项目
165 | 欢迎页
166 | 无法打开语言文件
167 | 恢复默认布局
168 |
169 |
170 | 资源大小
171 | 为组件生成预览
172 |
173 |
174 | 全选
175 | 全不选
176 | 反向选择
177 | 从库中拖拽到此
178 | 在库中显示
179 | 复制URL
180 | 清除
181 | 打开
182 | 只能选择图片
183 |
184 |
185 | 新建控制器
186 | 修改控制器
187 | 确认删除?
188 | (任意页面)
189 | 播放动效
190 | 改变其他控制器页面
191 | (相同索引的页面)
192 | (相同名称的页面)
193 |
194 |
195 | 字体
196 |
197 |
198 | 动画
199 |
200 |
201 | 创建包失败
202 |
203 |
204 | 创建项目失败
205 | 选择项目路径
206 |
207 |
208 | 下载新版本失败!
209 |
210 |
211 | 只能拖入图片!
212 | 只能拖入本包的资源!
213 |
214 |
215 | 读取图像错误
216 |
217 |
218 | 动画编辑
219 | Sprite表描述文件
220 |
221 |
222 | 发布成功!
223 | 以下为警告信息,但可以忽略
224 | {0}个资源已被排除
225 | 发布失败!
226 | 正在发布
227 | '{0}'未设置文件路径
228 | '{0}'未设置文件名
229 | 未能为'{0}'发布代码,原因:代码保存路径未设置!
230 | 检查发布路径
231 | 动画'{0}'被自动发布到了不同的纹理集页面上,这会导致运行时显示错误。你可以双击动画,通过调整它的纹理集属性解决此问题。
232 | 单独发布的资源
233 | 无法打包:{2}需要的纹理大小超过{0}x{1}。
234 | 目标文件已被打开,无法覆盖!
235 | 文件格式错误
236 | 未填写发布路径或错误的发布路径
237 | 未填写代码发布路径或错误的代码发布路径
238 |
239 |
240 | 正在努力完成你的请求
241 |
242 |
243 | 字体样式 Abg 123
244 |
245 |
246 | 对“{0}”输入新名称
247 |
248 |
249 | 源和目标的资源类型不相同,无法替换!
250 |
251 |
252 | 新分支名称
253 | 同名分支已存在
254 | 是否要删除分支'{0}'
255 |
256 |
257 | 无法读取包在
258 | 图片不存在
259 | 资源不存在
260 | 指定的名称已被使用
261 | 不支持含多个纹理的字体
262 | 新建文件夹
263 | 动画格式错误
264 | 容器组件
265 | 组件
266 | 多个对象
267 | 创建组件'{0}'时出现循环嵌套!
268 |
269 |
270 | 指定的位置并没有UI项目!(项目位置应该有一个xxx.fairy文件)
271 | 自定义颜色
272 | 自定义字体大小
273 | 默认字体
274 | 不是合法的包
275 | 包已经存在,不能覆盖!
276 | 名称不能包含.:*?<>|/\字符
277 | 名称不能为空
278 |
279 |
280 | 默认
281 | 否
282 | 是
283 | (无)
284 | 重置为默认值
285 |
286 |
287 | 默认
288 | 单独
289 | 4的倍数
290 |
291 |
292 | 可见
293 | 滚动时显示
294 | 隐藏
295 |
296 |
297 | 不使用纹理集
298 | 使用纹理集
299 |
300 |
301 | 复选按钮
302 | 单选按钮
303 | 普通按钮
304 |
305 |
306 | 百分比
307 | 当前值/最大值
308 | 当前值
309 | 最大值
310 |
311 |
312 | 可见
313 | 隐藏
314 | 滚动
315 |
316 |
317 | 垂直滚动
318 | 水平滚动
319 | 自由滚动
320 |
321 |
322 | 按钮
323 | 标签
324 | 进度条
325 | 滚动条
326 | 滑动条
327 | 下拉框
328 |
329 |
330 | 空白
331 | 矩形
332 | 圆形
333 | 正多边形
334 | 多边形
335 |
336 |
337 | 单列竖排
338 | 单行横排
339 | 横向流动
340 | 竖向流动
341 | 分页
342 |
343 |
344 | 单选
345 | 多选(需shift键)
346 | 多选(单击实现)
347 | 无
348 |
349 |
350 | 左
351 | 左右居中
352 | 右
353 |
354 |
355 | 上
356 | 上下居中
357 | 下
358 |
359 |
360 | 等比缩放(显示全部)
361 | 自由缩放
362 | 等比缩放(适应高度)
363 | 等比缩放(适应宽度)
364 | 等比缩放(无边框)
365 |
366 |
367 | 显示
368 | 位置(X/Y)
369 | 大小(宽/高/ScaleX/ScaleY)
370 | 颜色
371 | 动画
372 | 外观(透明度/旋转/变灰/不可触摸)
373 | 文本
374 | 图标
375 | 显示-2
376 | 字体大小
377 |
378 |
379 | 宽度和高度
380 | 高度
381 | 自动收缩
382 |
383 |
384 | 未定义
385 | 左
386 | 中
387 | 右
388 | 顶
389 | 中
390 | 底
391 | 宽
392 | 高
393 | 左延展
394 | 右延展
395 | 顶延展
396 | 底延展
397 | 左右居中
398 | 上下居中
399 |
400 |
401 | 水平
402 | 垂直
403 | 90度
404 | 180度
405 | 360度
406 |
407 |
408 | 左
409 | 右
410 | 上
411 | 下
412 | 左上
413 | 左下
414 | 右上
415 | 右下
416 |
417 |
418 | 请选择导入的文件
419 | 导出完成
420 | XML文件
421 | 请先保存所有文件
422 | 无法导入
423 | 导入完成
424 | 导入完成!
425 |
426 | 以下为警告信息,但可以忽略
427 |
428 |
429 | 改变位置
430 | 改变大小
431 | 改变透明度
432 | 改变旋转
433 | 改变缩放
434 | 改变颜色
435 | 改变动画
436 | 改变轴心
437 | 转换为关键帧
438 | 清除关键帧
439 | 插入帧
440 | 删除帧
441 | 删除时间轴
442 | 复制时间轴
443 | 粘贴时间轴
444 | 更改目标对象
445 | 时间轴非空,确实要删除吗?
446 | 设置控制器
447 | 播放声音
448 | 播放动效
449 | 播放震动
450 | 改变可见性
451 | 改变颜色滤镜
452 | 改变倾斜
453 | 改变文本
454 | 改变图标
455 | 确认删除动效?
456 | 创建Tween
457 | 删除Tween
458 | 编辑引导线
459 |
460 |
461 | 正在导入{0}/{1}...
462 |
463 |
464 | 未定义
465 | 确实要恢复默认设置吗?
466 | (主菜单)
467 | (库面板)
468 | (组件编辑)
469 | 界面语言已更改,是否立刻重启?
470 |
471 |
472 | 专业版
473 | 社区版
474 | 订阅至
475 | 已过期
476 | 注册码不正确
477 | 注册码已过期
478 |
479 |
480 | 切换颜色空间
481 | 颜色空间已切换完毕,是否立刻重启?
482 |
483 |
484 | 中心
485 | 左上角
486 | 右上角
487 | 左下角
488 | 右下角
489 |
490 |
491 | 变暗
492 | 缩放
493 |
494 |
495 | 默认
496 | 启用
497 | 关闭
498 |
499 |
500 | 改变颜色
501 |
502 |
503 | 字母
504 | 数字和标点
505 | URL
506 | 数字
507 | 电话号码
508 | 邮件地址
509 |
510 |
511 | 你的项目是使用低版本的FairyGUI编辑器创建的。
512 | 如果需要在此版本的FairyGUI编辑器打开此项目,需要执行一次数据格式的升级。
513 | 点击“是”开始执行升级,你将被要求选取一个不同的文件夹放置升级后的项目。
514 | 升级结束后将打开新位置的项目,原有的项目不会做任何修改。
515 | 选择转换后的项目的保存位置
516 | 正在升级'{0}'
517 |
518 |
519 | 自动更新
520 | 询问
521 | 关闭
522 |
523 |
524 | 导出失败!
525 |
526 |
527 | 不能设置为此类型的对象
528 |
529 |
530 | 升序
531 | 降序
532 | 拱形
533 |
534 |
535 | 基本
536 | 按钮
537 | 下拉框
538 | 组件
539 | 效果
540 | 其它
541 | 属性控制
542 | 图形
543 | 组
544 | 图片
545 | 标签
546 | 列表
547 | 装载器
548 | 动画
549 | 进度条
550 | 关联
551 | 富文本
552 | 输入文本
553 | 滚动条
554 | 滑动条
555 | SWF
556 | 文本
557 | 帧
558 | 动效
559 | 设计图
560 | 自定义属性
561 | 帧数据
562 | 包围
563 | 列表项目
564 | 模型/特效
565 |
566 |
567 | 资源库
568 | 检查器
569 | 时间轴
570 | 显示列表
571 | 预览
572 | 视图
573 | 动效
574 | 收藏夹
575 | 搜索
576 | 控制台
577 | 引用
578 | 插件
579 |
580 |
581 | 选择保存位置
582 | 该项目已在另外的窗口中打开
583 | 确实要撤回授权吗?
584 | PNG压缩工具未配置,请先在“首选项”对话框配置外部工具。工具下载地址:{0}
585 | 查找未使用资源
586 | 已选择{0}个包
587 | 查找重复的资源
588 | 请选定多于一个需要合并的资源
589 |
590 |
591 |
592 |
--------------------------------------------------------------------------------
/FairyGUI-Editor/FairyGUI-Editor_Data/StreamingAssets/Scripts/GenCode_AS3.lua:
--------------------------------------------------------------------------------
1 | local function genCode(handler)
2 | local settings = handler.project:GetSettings("Publish").codeGeneration
3 | local codePkgName = handler:ToFilename(handler.pkg.name); --convert chinese to pinyin, remove special chars etc.
4 | local exportCodePath = handler.exportCodePath..'/'..codePkgName
5 | local namespaceName = codePkgName
6 |
7 | if settings.packageName~=nil and settings.packageName~='' then
8 | namespaceName = settings.packageName..'.'..namespaceName;
9 | end
10 |
11 | --CollectClasses(stripeMemeber, stripeClass, fguiNamespace)
12 | local classes = handler:CollectClasses(settings.ignoreNoname, settings.ignoreNoname, nil)
13 | handler:SetupCodeFolder(exportCodePath, "as") --check if target folder exists, and delete old files
14 |
15 | local getMemberByName = settings.getMemberByName
16 |
17 | local classCnt = classes.Count
18 | local writer = CodeWriter.new()
19 | for i=0,classCnt-1 do
20 | local classInfo = classes[i]
21 | local members = classInfo.members
22 | writer:reset()
23 |
24 | writer:writeln('package %s', namespaceName)
25 | writer:startBlock()
26 | writer:writeln('import fairygui.*;')
27 | writer:writeln()
28 | writer:writeln('public class %s extends %s', classInfo.className, classInfo.superClassName)
29 | writer:startBlock()
30 |
31 | local memberCnt = members.Count
32 | for j=0,memberCnt-1 do
33 | local memberInfo = members[j]
34 | writer:writeln('public var %s:%s;', memberInfo.varName, memberInfo.type)
35 | end
36 | writer:writeln('public static const URL:String = "ui://%s%s";', handler.pkg.id, classInfo.resId)
37 | writer:writeln()
38 |
39 | writer:writeln('public static function createInstance():%s', classInfo.className)
40 | writer:startBlock()
41 | writer:writeln('return %s(UIPackage.createObject("%s", "%s"));', classInfo.className, handler.pkg.name, classInfo.resName)
42 | writer:endBlock()
43 | writer:writeln()
44 |
45 | writer:writeln('protected override function constructFromXML(xml:XML):void')
46 | writer:startBlock()
47 | writer:writeln('super.constructFromXML(xml);')
48 | writer:writeln()
49 | for j=0,memberCnt-1 do
50 | local memberInfo = members[j]
51 | if memberInfo.group==0 then
52 | if getMemberByName then
53 | writer:writeln('%s = %s(getChild("%s"));', memberInfo.varName, memberInfo.type, memberInfo.name)
54 | else
55 | writer:writeln('%s = %s(getChildAt(%s));', memberInfo.varName, memberInfo.type, memberInfo.index)
56 | end
57 | elseif memberInfo.group==1 then
58 | if getMemberByName then
59 | writer:writeln('%s = getController("%s");', memberInfo.varName, memberInfo.name)
60 | else
61 | writer:writeln('%s = getControllerAt(%s);', memberInfo.varName, memberInfo.index)
62 | end
63 | else
64 | if getMemberByName then
65 | writer:writeln('%s = getTransition("%s");', memberInfo.varName, memberInfo.name)
66 | else
67 | writer:writeln('%s = getTransitionAt(%s);', memberInfo.varName, memberInfo.index)
68 | end
69 | end
70 | end
71 | writer:endBlock()
72 |
73 | writer:endBlock() --class
74 | writer:endBlock() --namepsace
75 |
76 | writer:save(exportCodePath..'/'..classInfo.className..'.as')
77 | end
78 |
79 | writer:reset()
80 |
81 | local binderName = codePkgName..'Binder'
82 |
83 | writer:writeln('package %s', namespaceName)
84 | writer:startBlock()
85 | writer:writeln('import fairygui.*;')
86 | writer:writeln()
87 | writer:writeln('public class %s', binderName)
88 | writer:startBlock()
89 |
90 | writer:writeln('public static function bindAll():void')
91 | writer:startBlock()
92 | for i=0,classCnt-1 do
93 | local classInfo = classes[i]
94 | writer:writeln('UIObjectFactory.setPackageItemExtension(%s.URL, %s);', classInfo.className, classInfo.className)
95 | end
96 | writer:endBlock() --bindall
97 |
98 | writer:endBlock() --class
99 | writer:endBlock() --namespace
100 |
101 | writer:save(exportCodePath..'/'..binderName..'.as')
102 | end
103 |
104 | return genCode
--------------------------------------------------------------------------------
/FairyGUI-Editor/FairyGUI-Editor_Data/StreamingAssets/Scripts/GenCode_CPP.lua:
--------------------------------------------------------------------------------
1 | local function genCode(handler)
2 | local settings = handler.project:GetSettings("Publish").codeGeneration
3 | local codePkgName = handler:ToFilename(handler.pkg.name); --convert chinese to pinyin, remove special chars etc.
4 | local exportCodePath = handler.exportCodePath..'/'..codePkgName
5 | local namespaceName = codePkgName
6 | local binderName = codePkgName..'Binder'
7 |
8 | if settings.packageName~=nil and settings.packageName~='' then
9 | namespaceName = settings.packageName..'.'..namespaceName;
10 | end
11 |
12 | --CollectClasses(stripeMemeber, stripeClass, fguiNamespace)
13 | local classes = handler:CollectClasses(settings.ignoreNoname, settings.ignoreNoname, nil)
14 | handler:SetupCodeFolder(exportCodePath, "cpp,h") --check if target folder exists, and delete old files
15 |
16 | local getMemberByName = settings.getMemberByName
17 |
18 | local classCnt = classes.Count
19 | local writer = CodeWriter.new()
20 | for i=0,classCnt-1 do
21 | local classInfo = classes[i]
22 | local members = classInfo.members
23 | local references = classInfo.references
24 | writer:reset()
25 |
26 | writer:writeln('#ifndef __%s_%s_H__', codePkgName, classInfo.className)
27 | writer:writeln('#define __%s_%s_H__', codePkgName, classInfo.className)
28 | writer:writeln()
29 | writer:writeln('#include "FairyGUI.h"')
30 | writer:writeln()
31 |
32 | writer:writeln('namespace %s', namespaceName)
33 | writer:startBlock()
34 |
35 | local refCount = references.Count
36 | if refCount>0 then
37 | for j=0,refCount-1 do
38 | local ref = references[j]
39 | writer:writeln('class %s;', ref)
40 | end
41 | end
42 |
43 | writer:writeln('class %s : public %s', classInfo.className, classInfo.superClassName)
44 | writer:startBlock()
45 |
46 | writer:writeln('public:')
47 | writer:incIndent()
48 | writer:writeln('static const std::string URL;')
49 | writer:writeln('static %s* create();', classInfo.className)
50 | writer:writeln()
51 | local memberCnt = members.Count
52 | for j=0,memberCnt-1 do
53 | local memberInfo = members[j]
54 | writer:writeln('%s* %s;', memberInfo.type, memberInfo.varName)
55 | end
56 | writer:decIndent()
57 | writer:writeln()
58 |
59 | writer:writeln('protected:')
60 | writer:incIndent()
61 | writer:writeln('virtual void onConstruct() override;')
62 | writer:decIndent()
63 | writer:writeln()
64 |
65 | writer:writeln('private:')
66 | writer:incIndent()
67 | writer:writeln('static %s* createByBinder();', classInfo.className)
68 | writer:writeln('friend class %s;', binderName)
69 | writer:decIndent()
70 |
71 | writer:endBlock()
72 | writer:endBlock()
73 |
74 | writer:writeln()
75 | writer:writeln('#endif')
76 |
77 | writer:save(exportCodePath..'/'..classInfo.className..'.h')
78 |
79 | ----------------
80 |
81 | writer:reset()
82 | writer:writeln('#include "%s.h"', binderName)
83 | writer:writeln()
84 | writer:writeln('namespace %s', namespaceName)
85 | writer:startBlock()
86 | writer:writeln('USING_NS_FGUI;')
87 | writer:writeln()
88 | writer:writeln('const std::string %s::URL = "ui://%s%s";', classInfo.className, handler.pkg.id, classInfo.resId)
89 | writer:writeln()
90 |
91 | writer:writeln('%s* %s:create()', classInfo.className, classInfo.className)
92 | writer:startBlock()
93 | writer:writeln('return dynamic_cast<%s*>(UIPackage::createObject("%s", "%s"));', classInfo.className, handler.pkg.name, classInfo.resName)
94 | writer:endBlock()
95 | writer:writeln()
96 |
97 | writer:writeln('%s* %s::createByBinder()', classInfo.className, classInfo.className)
98 | writer:startBlock()
99 | writer:writeln('%s *pRet = new(std::nothrow) %s();', classInfo.className, classInfo.className)
100 | writer:writeln('if (pRet && pRet->init())')
101 | writer:startBlock()
102 | writer:writeln('pRet->autorelease();')
103 | writer:writeln('return pRet;')
104 | writer:endBlock()
105 | writer:writeln('else')
106 | writer:startBlock()
107 | writer:writeln('delete pRet;')
108 | writer:writeln('pRet = nullptr;')
109 | writer:writeln('return nullptr;')
110 | writer:endBlock()
111 | writer:endBlock()
112 | writer:writeln()
113 |
114 | writer:writeln('void %s::onConstruct()', classInfo.className)
115 | writer:startBlock()
116 |
117 | for j=0,memberCnt-1 do
118 | local memberInfo = members[j]
119 | if memberInfo.group==0 then
120 | if getMemberByName then
121 | writer:writeln('%s = dynamic_cast<%s*>(getChild("%s"));', memberInfo.varName, memberInfo.type, memberInfo.name)
122 | else
123 | writer:writeln('%s = dynamic_cast<%s*>(getChildAt(%s));', memberInfo.varName, memberInfo.type, memberInfo.index)
124 | end
125 | elseif memberInfo.group==1 then
126 | if getMemberByName then
127 | writer:writeln('%s = getController("%s");', memberInfo.varName, memberInfo.name)
128 | else
129 | writer:writeln('%s = getControllerAt(%s);', memberInfo.varName, memberInfo.index)
130 | end
131 | else
132 | if getMemberByName then
133 | writer:writeln('%s = getTransition("%s");', memberInfo.varName, memberInfo.name)
134 | else
135 | writer:writeln('%s = getTransitionAt(%s);', memberInfo.varName, memberInfo.index)
136 | end
137 | end
138 | end
139 |
140 | writer:endBlock()
141 | writer:endBlock()
142 |
143 | writer:save(exportCodePath..'/'..classInfo.className..'.cpp')
144 | end
145 |
146 | writer:reset()
147 |
148 | writer:writeln('#ifndef __%s_%s_H__', codePkgName, binderName)
149 | writer:writeln('#define __%s_%s_H__', codePkgName, binderName)
150 | writer:writeln()
151 | writer:writeln('#include "FairyGUI.h"')
152 |
153 | for i=0,classCnt-1 do
154 | local classInfo = classes[i]
155 | writer:writeln('#include "%s.h";', classInfo.className)
156 | end
157 |
158 | writer:writeln()
159 | writer:writeln('namespace %s', namespaceName)
160 | writer:startBlock()
161 | writer:writeln('class %s', binderName)
162 | writer:startBlock()
163 | writer:writeln('public:')
164 | writer:incIndent()
165 | writer:writeln('static void bindAll();')
166 | writer:decIndent()
167 |
168 | writer:endBlock()
169 | writer:endBlock()
170 | writer:writeln()
171 | writer:writeln('#endif')
172 |
173 | writer:save(exportCodePath..'/'..binderName..'.h')
174 |
175 | -----------------------------------
176 |
177 | writer:reset()
178 | writer:writeln('#include "%s.h"', binderName)
179 | writer:writeln()
180 | writer:writeln('namespace %s', namespaceName)
181 | writer:startBlock()
182 | writer:writeln('USING_NS_FGUI;')
183 | writer:writeln()
184 |
185 | writer:writeln('void %s:bindAll()', binderName)
186 | writer:startBlock()
187 | for i=0,classCnt-1 do
188 | local classInfo = classes[i]
189 | writer:writeln('UIObjectFactory::setExtension(%s::URL, std::bind(&%s::createByBinder));', classInfo.className, classInfo.className)
190 | end
191 | writer:endBlock()
192 |
193 | writer:endBlock()
194 |
195 | writer:save(exportCodePath..'/'..binderName..'.cpp')
196 | end
197 |
198 | return genCode
--------------------------------------------------------------------------------
/FairyGUI-Editor/FairyGUI-Editor_Data/StreamingAssets/Scripts/GenCode_CSharp.lua:
--------------------------------------------------------------------------------
1 | local function genCode(handler)
2 | local settings = handler.project:GetSettings("Publish").codeGeneration
3 | local codePkgName = handler:ToFilename(handler.pkg.name); --convert chinese to pinyin, remove special chars etc.
4 | local exportCodePath = handler.exportCodePath..'/'..codePkgName
5 | local namespaceName = codePkgName
6 |
7 | if settings.packageName~=nil and settings.packageName~='' then
8 | namespaceName = settings.packageName..'.'..namespaceName;
9 | end
10 |
11 | --CollectClasses(stripeMemeber, stripeClass, fguiNamespace)
12 | local classes = handler:CollectClasses(settings.ignoreNoname, settings.ignoreNoname, nil)
13 | handler:SetupCodeFolder(exportCodePath, "cs") --check if target folder exists, and delete old files
14 |
15 | local getMemberByName = settings.getMemberByName
16 |
17 | local classCnt = classes.Count
18 | local writer = CodeWriter.new()
19 | for i=0,classCnt-1 do
20 | local classInfo = classes[i]
21 | local members = classInfo.members
22 | writer:reset()
23 |
24 | writer:writeln('using FairyGUI;')
25 | writer:writeln('using FairyGUI.Utils;')
26 | writer:writeln()
27 | writer:writeln('namespace %s', namespaceName)
28 | writer:startBlock()
29 | writer:writeln('public partial class %s : %s', classInfo.className, classInfo.superClassName)
30 | writer:startBlock()
31 |
32 | local memberCnt = members.Count
33 | for j=0,memberCnt-1 do
34 | local memberInfo = members[j]
35 | writer:writeln('public %s %s;', memberInfo.type, memberInfo.varName)
36 | end
37 | writer:writeln('public const string URL = "ui://%s%s";', handler.pkg.id, classInfo.resId)
38 | writer:writeln()
39 |
40 | writer:writeln('public static %s CreateInstance()', classInfo.className)
41 | writer:startBlock()
42 | writer:writeln('return (%s)UIPackage.CreateObject("%s", "%s");', classInfo.className, handler.pkg.name, classInfo.resName)
43 | writer:endBlock()
44 | writer:writeln()
45 |
46 | if handler.project.type==ProjectType.MonoGame then
47 | writer:writeln("protected override void OnConstruct()")
48 | writer:startBlock()
49 | else
50 | writer:writeln('public override void ConstructFromXML(XML xml)')
51 | writer:startBlock()
52 | writer:writeln('base.ConstructFromXML(xml);')
53 | writer:writeln()
54 | end
55 | for j=0,memberCnt-1 do
56 | local memberInfo = members[j]
57 | if memberInfo.group==0 then
58 | if getMemberByName then
59 | writer:writeln('%s = (%s)GetChild("%s");', memberInfo.varName, memberInfo.type, memberInfo.name)
60 | else
61 | writer:writeln('%s = (%s)GetChildAt(%s);', memberInfo.varName, memberInfo.type, memberInfo.index)
62 | end
63 | elseif memberInfo.group==1 then
64 | if getMemberByName then
65 | writer:writeln('%s = GetController("%s");', memberInfo.varName, memberInfo.name)
66 | else
67 | writer:writeln('%s = GetControllerAt(%s);', memberInfo.varName, memberInfo.index)
68 | end
69 | else
70 | if getMemberByName then
71 | writer:writeln('%s = GetTransition("%s");', memberInfo.varName, memberInfo.name)
72 | else
73 | writer:writeln('%s = GetTransitionAt(%s);', memberInfo.varName, memberInfo.index)
74 | end
75 | end
76 | end
77 | writer:endBlock()
78 |
79 | writer:endBlock() --class
80 | writer:endBlock() --namepsace
81 |
82 | writer:save(exportCodePath..'/'..classInfo.className..'.cs')
83 | end
84 |
85 | writer:reset()
86 |
87 | local binderName = codePkgName..'Binder'
88 |
89 | writer:writeln('using FairyGUI;')
90 | writer:writeln()
91 | writer:writeln('namespace %s', namespaceName)
92 | writer:startBlock()
93 | writer:writeln('public class %s', binderName)
94 | writer:startBlock()
95 |
96 | writer:writeln('public static void BindAll()')
97 | writer:startBlock()
98 | for i=0,classCnt-1 do
99 | local classInfo = classes[i]
100 | writer:writeln('UIObjectFactory.SetPackageItemExtension(%s.URL, typeof(%s));', classInfo.className, classInfo.className)
101 | end
102 | writer:endBlock() --bindall
103 |
104 | writer:endBlock() --class
105 | writer:endBlock() --namespace
106 |
107 | writer:save(exportCodePath..'/'..binderName..'.cs')
108 | end
109 |
110 | return genCode
--------------------------------------------------------------------------------
/FairyGUI-Editor/FairyGUI-Editor_Data/StreamingAssets/Scripts/GenCode_Egret.lua:
--------------------------------------------------------------------------------
1 | local function genCode(handler)
2 | local settings = handler.project:GetSettings("Publish").codeGeneration
3 | local codePkgName = handler:ToFilename(handler.pkg.name); --convert chinese to pinyin, remove special chars etc.
4 | local exportCodePath = handler.exportCodePath..'/'..codePkgName
5 | local namespaceName = codePkgName
6 | local ns = 'fairygui'
7 |
8 | if settings.packageName~=nil and settings.packageName~='' then
9 | namespaceName = settings.packageName..'.'..namespaceName;
10 | end
11 |
12 | --CollectClasses(stripeMemeber, stripeClass, fguiNamespace)
13 | local classes = handler:CollectClasses(settings.ignoreNoname, settings.ignoreNoname, ns)
14 | handler:SetupCodeFolder(exportCodePath, "ts") --check if target folder exists, and delete old files
15 |
16 | local getMemberByName = settings.getMemberByName
17 |
18 | local classCnt = classes.Count
19 | local writer = CodeWriter.new({ blockFromNewLine=false, usingTabs=true })
20 | for i=0,classCnt-1 do
21 | local classInfo = classes[i]
22 | local members = classInfo.members
23 | writer:reset()
24 |
25 | writer:writeln('module %s', namespaceName)
26 | writer:startBlock()
27 | writer:writeln()
28 | writer:writeln('export class %s extends %s', classInfo.className, classInfo.superClassName)
29 | writer:startBlock()
30 |
31 | local memberCnt = members.Count
32 | for j=0,memberCnt-1 do
33 | local memberInfo = members[j]
34 | writer:writeln('public %s:%s;', memberInfo.varName, memberInfo.type)
35 | end
36 | writer:writeln('public static URL:string = "ui://%s%s";', handler.pkg.id, classInfo.resId)
37 | writer:writeln()
38 |
39 | writer:writeln('public static createInstance():%s', classInfo.className)
40 | writer:startBlock()
41 | writer:writeln('return <%s>(%s.UIPackage.createObject("%s", "%s"));', classInfo.className, ns, handler.pkg.name, classInfo.resName)
42 | writer:endBlock()
43 | writer:writeln()
44 |
45 | writer:writeln('protected constructFromXML(xml:any):void')
46 | writer:startBlock()
47 | writer:writeln('super.constructFromXML(xml);')
48 | writer:writeln()
49 | for j=0,memberCnt-1 do
50 | local memberInfo = members[j]
51 | if memberInfo.group==0 then
52 | if getMemberByName then
53 | writer:writeln('this.%s = <%s>(this.getChild("%s"));', memberInfo.varName, memberInfo.type, memberInfo.name)
54 | else
55 | writer:writeln('this.%s = <%s>(this.getChildAt(%s));', memberInfo.varName, memberInfo.type, memberInfo.index)
56 | end
57 | elseif memberInfo.group==1 then
58 | if getMemberByName then
59 | writer:writeln('this.%s = this.getController("%s");', memberInfo.varName, memberInfo.name)
60 | else
61 | writer:writeln('this.%s = this.getControllerAt(%s);', memberInfo.varName, memberInfo.index)
62 | end
63 | else
64 | if getMemberByName then
65 | writer:writeln('this.%s = this.getTransition("%s");', memberInfo.varName, memberInfo.name)
66 | else
67 | writer:writeln('this.%s = this.getTransitionAt(%s);', memberInfo.varName, memberInfo.index)
68 | end
69 | end
70 | end
71 | writer:endBlock()
72 |
73 | writer:endBlock() --class
74 | writer:endBlock() --namepsace
75 |
76 | writer:save(exportCodePath..'/'..classInfo.className..'.ts')
77 | end
78 |
79 | writer:reset()
80 |
81 | local binderName = codePkgName..'Binder'
82 |
83 | writer:writeln('module %s', namespaceName)
84 | writer:startBlock()
85 | writer:writeln()
86 | writer:writeln('export class %s', binderName)
87 | writer:startBlock()
88 |
89 | writer:writeln('public static bindAll():void')
90 | writer:startBlock()
91 | for i=0,classCnt-1 do
92 | local classInfo = classes[i]
93 | writer:writeln('%s.UIObjectFactory.setPackageItemExtension(%s.URL, %s);', ns, classInfo.className, classInfo.className)
94 | end
95 | writer:endBlock() --bindall
96 |
97 | writer:endBlock() --class
98 | writer:endBlock() --namespace
99 |
100 | writer:save(exportCodePath..'/'..binderName..'.ts')
101 | end
102 |
103 | return genCode
--------------------------------------------------------------------------------
/FairyGUI-Editor/FairyGUI-Editor_Data/StreamingAssets/Scripts/GenCode_Haxe.lua:
--------------------------------------------------------------------------------
1 | local function genCode(handler)
2 | local settings = handler.project:GetSettings("Publish").codeGeneration
3 | local codePkgName = handler:ToFilename(handler.pkg.name); --convert chinese to pinyin, remove special chars etc.
4 | local exportCodePath = handler.exportCodePath..'/'..codePkgName
5 | local namespaceName = codePkgName
6 |
7 | if settings.packageName~=nil and settings.packageName~='' then
8 | namespaceName = settings.packageName..'.'..namespaceName;
9 | end
10 |
11 | --CollectClasses(stripeMemeber, stripeClass, fguiNamespace)
12 | local classes = handler:CollectClasses(settings.ignoreNoname, settings.ignoreNoname, nil)
13 | handler:SetupCodeFolder(exportCodePath, "hx") --check if target folder exists, and delete old files
14 |
15 | local getMemberByName = settings.getMemberByName
16 |
17 | local classCnt = classes.Count
18 | local writer = CodeWriter.new()
19 | for i=0,classCnt-1 do
20 | local classInfo = classes[i]
21 | local members = classInfo.members
22 | writer:reset()
23 |
24 | writer:writeln('package %s', namespaceName)
25 | writer:startBlock()
26 | writer:writeln('import fairygui.*;')
27 | writer:writeln()
28 | writer:writeln('class %s extends %s', classInfo.className, classInfo.superClassName)
29 | writer:startBlock()
30 |
31 | local memberCnt = members.Count
32 | for j=0,memberCnt-1 do
33 | local memberInfo = members[j]
34 | writer:writeln('public var %s:%s;', memberInfo.varName, memberInfo.type)
35 | end
36 | writer:writeln('public static inline var URL:String = "ui://%s%s";', handler.pkg.id, classInfo.resId)
37 | writer:writeln()
38 |
39 | writer:writeln('public static function createInstance():%s', classInfo.className)
40 | writer:startBlock()
41 | writer:writeln('return cast(UIPackage.createObject("%s", "%s"), %s);', handler.pkg.name, classInfo.resName, classInfo.className)
42 | writer:endBlock()
43 | writer:writeln()
44 |
45 | writer:writeln('protected override function constructFromXML(xml:FastXML):Void')
46 | writer:startBlock()
47 | writer:writeln('super.constructFromXML(xml);')
48 | writer:writeln()
49 | for j=0,memberCnt-1 do
50 | local memberInfo = members[j]
51 | if memberInfo.group==0 then
52 | if getMemberByName then
53 | writer:writeln('%s = cast(this.getChild("%s"), %s);', memberInfo.varName, memberInfo.type, memberInfo.name)
54 | else
55 | writer:writeln('%s = cast(this.getChildAt(%s), %s);', memberInfo.varName, memberInfo.type, memberInfo.index)
56 | end
57 | elseif memberInfo.group==1 then
58 | if getMemberByName then
59 | writer:writeln('%s = this.getController("%s");', memberInfo.varName, memberInfo.name)
60 | else
61 | writer:writeln('%s = this.getControllerAt(%s);', memberInfo.varName, memberInfo.index)
62 | end
63 | else
64 | if getMemberByName then
65 | writer:writeln('%s = this.getTransition("%s");', memberInfo.varName, memberInfo.name)
66 | else
67 | writer:writeln('%s = this.getTransitionAt(%s);', memberInfo.varName, memberInfo.index)
68 | end
69 | end
70 | end
71 | writer:endBlock()
72 |
73 | writer:endBlock() --class
74 | writer:endBlock() --namepsace
75 |
76 | writer:save(exportCodePath..'/'..classInfo.className..'.hx')
77 | end
78 |
79 | writer:reset()
80 |
81 | local binderName = codePkgName..'Binder'
82 |
83 | writer:writeln('package %s', namespaceName)
84 | writer:startBlock()
85 | writer:writeln('import fairygui.*;')
86 | writer:writeln()
87 | writer:writeln('class %s', binderName)
88 | writer:startBlock()
89 |
90 | writer:writeln('public static function bindAll():Void')
91 | writer:startBlock()
92 | for i=0,classCnt-1 do
93 | local classInfo = classes[i]
94 | writer:writeln('UIObjectFactory.setPackageItemExtension(%s.URL, cast %s);', classInfo.className, classInfo.className)
95 | end
96 | writer:endBlock() --bindall
97 |
98 | writer:endBlock() --class
99 | writer:endBlock() --namespace
100 |
101 | writer:save(exportCodePath..'/'..binderName..'.hx')
102 | end
103 |
104 | return genCode
--------------------------------------------------------------------------------
/FairyGUI-Editor/FairyGUI-Editor_Data/StreamingAssets/Scripts/GenCode_PIXI.lua:
--------------------------------------------------------------------------------
1 | local function genCode(handler)
2 | local settings = handler.project:GetSettings("Publish").codeGeneration
3 | local codePkgName = handler:ToFilename(handler.pkg.name); --convert chinese to pinyin, remove special chars etc.
4 | local exportCodePath = handler.exportCodePath..'/'..codePkgName
5 | local namespaceName = codePkgName
6 | local ns = 'fgui'
7 |
8 | if settings.packageName~=nil and settings.packageName~='' then
9 | namespaceName = settings.packageName..'.'..namespaceName;
10 | end
11 |
12 | --CollectClasses(stripeMemeber, stripeClass, fguiNamespace)
13 | local classes = handler:CollectClasses(settings.ignoreNoname, settings.ignoreNoname, ns)
14 | handler:SetupCodeFolder(exportCodePath, "ts") --check if target folder exists, and delete old files
15 |
16 | local getMemberByName = settings.getMemberByName
17 |
18 | local classCnt = classes.Count
19 | local writer = CodeWriter.new({ blockFromNewLine=false, usingTabs=true })
20 | for i=0,classCnt-1 do
21 | local classInfo = classes[i]
22 | local members = classInfo.members
23 | local references = classInfo.references
24 | writer:reset()
25 |
26 | writer:writeln('namespace %s', namespaceName)
27 | writer:startBlock()
28 |
29 | writer:writeln('export class %s extends %s', classInfo.className, classInfo.superClassName)
30 | writer:startBlock()
31 |
32 | local memberCnt = members.Count
33 | for j=0,memberCnt-1 do
34 | local memberInfo = members[j]
35 | if memberInfo.group==1 then
36 | writer:writeln('public %s:%s.controller.Controller;', memberInfo.name, ns)
37 | else
38 | writer:writeln('public %s:%s;', memberInfo.varName, memberInfo.type)
39 | end
40 | end
41 | writer:writeln('public static URL:string = "ui://%s%s";', handler.pkg.id, classInfo.resId)
42 | writer:writeln()
43 |
44 | writer:writeln('public static createInstance():%s', classInfo.className)
45 | writer:startBlock()
46 | writer:writeln('return <%s>(%s.UIPackage.createObject("%s", "%s"));', classInfo.className, ns, handler.pkg.name, classInfo.resName)
47 | writer:endBlock()
48 | writer:writeln()
49 |
50 | writer:writeln('protected onConstruct():void')
51 | writer:startBlock()
52 | for j=0,memberCnt-1 do
53 | local memberInfo = members[j]
54 | if memberInfo.group==0 then
55 | if getMemberByName then
56 | writer:writeln('this.%s = <%s>(this.getChild("%s"));', memberInfo.varName, memberInfo.type, memberInfo.name)
57 | else
58 | writer:writeln('this.%s = <%s>(this.getChildAt(%s));', memberInfo.varName, memberInfo.type, memberInfo.index)
59 | end
60 | elseif memberInfo.group==1 then
61 | if getMemberByName then
62 | writer:writeln('this.%s = this.getController("%s");', memberInfo.varName, memberInfo.name)
63 | else
64 | writer:writeln('this.%s = this.getControllerAt(%s);', memberInfo.varName, memberInfo.index)
65 | end
66 | else
67 | if getMemberByName then
68 | writer:writeln('this.%s = this.getTransition("%s");', memberInfo.varName, memberInfo.name)
69 | else
70 | writer:writeln('this.%s = this.getTransitionAt(%s);', memberInfo.varName, memberInfo.index)
71 | end
72 | end
73 | end
74 | writer:endBlock()
75 |
76 | writer:endBlock() --class
77 | writer:endBlock() --namespace
78 |
79 | writer:save(exportCodePath..'/'..classInfo.className..'.ts')
80 | end
81 |
82 | writer:reset()
83 |
84 | local binderName = codePkgName..'Binder'
85 |
86 | writer:writeln('namespace %s', namespaceName)
87 | writer:startBlock()
88 | writer:writeln()
89 | writer:writeln('export class %s', binderName)
90 | writer:startBlock()
91 |
92 | writer:writeln('public static bindAll():void')
93 | writer:startBlock()
94 | for i=0,classCnt-1 do
95 | local classInfo = classes[i]
96 | writer:writeln('%s.UIObjectFactory.setExtension(%s.URL, %s);', ns, classInfo.className, classInfo.className)
97 | end
98 | writer:endBlock() --bindall
99 |
100 | writer:endBlock() --class
101 | writer:endBlock() --namespace
102 |
103 | writer:save(exportCodePath..'/'..binderName..'.ts')
104 | end
105 |
106 | return genCode
--------------------------------------------------------------------------------
/FairyGUI-Editor/FairyGUI-Editor_Data/StreamingAssets/Scripts/GenCode_TS.lua:
--------------------------------------------------------------------------------
1 | local function genCode(handler)
2 | local settings = handler.project:GetSettings("Publish").codeGeneration
3 | local codePkgName = handler:ToFilename(handler.pkg.name); --convert chinese to pinyin, remove special chars etc.
4 | local exportCodePath = handler.exportCodePath..'/'..codePkgName
5 | local namespaceName = codePkgName
6 | local ns = 'fgui'
7 |
8 | if settings.packageName~=nil and settings.packageName~='' then
9 | namespaceName = settings.packageName..'.'..namespaceName;
10 | end
11 |
12 | --CollectClasses(stripeMemeber, stripeClass, fguiNamespace)
13 | local classes = handler:CollectClasses(settings.ignoreNoname, settings.ignoreNoname, ns)
14 | handler:SetupCodeFolder(exportCodePath, "ts") --check if target folder exists, and delete old files
15 |
16 | local getMemberByName = settings.getMemberByName
17 |
18 | local classCnt = classes.Count
19 | local writer = CodeWriter.new({ blockFromNewLine=false, usingTabs=true })
20 | for i=0,classCnt-1 do
21 | local classInfo = classes[i]
22 | local members = classInfo.members
23 | local references = classInfo.references
24 | writer:reset()
25 |
26 | local refCount = references.Count
27 | if refCount>0 then
28 | for j=0,refCount-1 do
29 | local ref = references[j]
30 | writer:writeln('import %s from "./%s";', ref, ref)
31 | end
32 | writer:writeln()
33 | end
34 |
35 | writer:writeln('export default class %s extends %s', classInfo.className, classInfo.superClassName)
36 | writer:startBlock()
37 | writer:writeln()
38 |
39 | local memberCnt = members.Count
40 | for j=0,memberCnt-1 do
41 | local memberInfo = members[j]
42 | writer:writeln('public %s:%s;', memberInfo.varName, memberInfo.type)
43 | end
44 | writer:writeln('public static URL:string = "ui://%s%s";', handler.pkg.id, classInfo.resId)
45 | writer:writeln()
46 |
47 | writer:writeln('public static createInstance():%s', classInfo.className)
48 | writer:startBlock()
49 | writer:writeln('return <%s>(%s.UIPackage.createObject("%s", "%s"));', classInfo.className, ns, handler.pkg.name, classInfo.resName)
50 | writer:endBlock()
51 | writer:writeln()
52 |
53 | writer:writeln('protected onConstruct():void')
54 | writer:startBlock()
55 | for j=0,memberCnt-1 do
56 | local memberInfo = members[j]
57 | if memberInfo.group==0 then
58 | if getMemberByName then
59 | writer:writeln('this.%s = <%s>(this.getChild("%s"));', memberInfo.varName, memberInfo.type, memberInfo.name)
60 | else
61 | writer:writeln('this.%s = <%s>(this.getChildAt(%s));', memberInfo.varName, memberInfo.type, memberInfo.index)
62 | end
63 | elseif memberInfo.group==1 then
64 | if getMemberByName then
65 | writer:writeln('this.%s = this.getController("%s");', memberInfo.varName, memberInfo.name)
66 | else
67 | writer:writeln('this.%s = this.getControllerAt(%s);', memberInfo.varName, memberInfo.index)
68 | end
69 | else
70 | if getMemberByName then
71 | writer:writeln('this.%s = this.getTransition("%s");', memberInfo.varName, memberInfo.name)
72 | else
73 | writer:writeln('this.%s = this.getTransitionAt(%s);', memberInfo.varName, memberInfo.index)
74 | end
75 | end
76 | end
77 | writer:endBlock()
78 |
79 | writer:endBlock() --class
80 |
81 | writer:save(exportCodePath..'/'..classInfo.className..'.ts')
82 | end
83 |
84 | writer:reset()
85 |
86 | local binderName = codePkgName..'Binder'
87 |
88 | for i=0,classCnt-1 do
89 | local classInfo = classes[i]
90 | writer:writeln('import %s from "./%s";', classInfo.className, classInfo.className)
91 | end
92 |
93 | writer:writeln()
94 | writer:writeln('export default class %s', binderName)
95 | writer:startBlock()
96 |
97 | writer:writeln('public static bindAll():void')
98 | writer:startBlock()
99 | for i=0,classCnt-1 do
100 | local classInfo = classes[i]
101 | writer:writeln('%s.UIObjectFactory.setExtension(%s.URL, %s);', ns, classInfo.className, classInfo.className)
102 | end
103 | writer:endBlock() --bindall
104 |
105 | writer:endBlock() --class
106 |
107 | writer:save(exportCodePath..'/'..binderName..'.ts')
108 | end
109 |
110 | return genCode
--------------------------------------------------------------------------------
/FairyGUI-Editor/FairyGUI-Editor_Data/StreamingAssets/Scripts/Main.lua:
--------------------------------------------------------------------------------
1 | local util = require 'xlua.util'
2 |
3 | App = CS.FairyEditor.App
4 | ProjectType = CS.FairyEditor.ProjectType
5 | fprint = function(msg)
6 | App.consoleView:Log(tostring(msg))
7 | end
8 |
9 | function printLeakingReferences()
10 | local str = 'These references from Lua to C# have not been released: \n'
11 | local registry = debug.getregistry()
12 | for k, v in pairs(registry) do
13 | if type(k) == 'number' and type(v) == 'function' and registry[v] == k then
14 | local info = debug.getinfo(v)
15 | str = str..string.format('%s:%d', info.short_src, info.linedefined)..'\n'
16 | end
17 | end
18 | str = str..'Try to solve it in a function with name \'onDestroy\'.'
19 | App.consoleView:LogWarning(str)
20 | end
21 |
22 | function fclass()
23 | local cls = {}
24 | cls.__index=cls
25 |
26 | function cls.new(...)
27 | local inst=setmetatable({}, cls)
28 | if inst.ctor then
29 | inst.ctor(inst, ...)
30 | end
31 | return inst
32 | end
33 |
34 | return cls
35 | end
36 |
37 | local codeGenerators = {
38 | [ProjectType.Flash] = require('GenCode_AS3'),
39 | [ProjectType.Starling] = require('GenCode_AS3'),
40 | [ProjectType.Layabox] = require('GenCode_TS'),
41 | [ProjectType.Egret] = require('GenCode_Egret'),
42 | [ProjectType.PIXI] = require('GenCode_PIXI'),
43 | [ProjectType.Unity] = require('GenCode_CSharp'),
44 | [ProjectType.CryEngine] = require('GenCode_CSharp'),
45 | [ProjectType.MonoGame] = require('GenCode_CSharp'),
46 | [ProjectType.Haxe] = require('GenCode_Haxe'),
47 | [ProjectType.Cocos2dx] = require('GenCode_CPP'),
48 | [ProjectType.Vision] = require('GenCode_CPP'),
49 | [ProjectType.CocosCreator] = require('GenCode_TS')
50 | }
51 |
52 | function genCodeDefault(handler)
53 | local func = codeGenerators[handler.project.type]
54 | if func~=nil then
55 | func(handler)
56 | end
57 | end
58 |
59 | CodeWriter = fclass()
60 |
61 | function CodeWriter:ctor(config)
62 | config = config or {}
63 | self.blockStart = config.blockStart or '{'
64 | self.blockEnd = config.blockEnd or '}'
65 | self.blockFromNewLine = config.blockFromNewLine
66 | if self.blockFromNewLine==nil then self.blockFromNewLine = true end
67 | if config.usingTabs then
68 | self.indentStr = '\t'
69 | else
70 | self.indentStr = ' '
71 | end
72 | self.usingTabs = config.usingTabs
73 | self.endOfLine = config.endOfLine or '\n'
74 | self.lines = {}
75 | self.indent = 0
76 |
77 | self:writeMark()
78 | end
79 |
80 | function CodeWriter:writeMark()
81 | table.insert(self.lines, '/** This is an automatically generated class by FairyGUI. Please do not modify it. **/')
82 | table.insert(self.lines, '')
83 | end
84 |
85 | function CodeWriter:writeln(format, ...)
86 | if not format then
87 | table.insert(self.lines, '')
88 | return
89 | end
90 |
91 | local str = ''
92 | for i=0,self.indent-1 do
93 | str = str..self.indentStr
94 | end
95 | str = str..string.format(format, ...)
96 | table.insert(self.lines, str)
97 |
98 | return self
99 | end
100 |
101 | function CodeWriter:startBlock()
102 | if self.blockFromNewLine or #self.lines==0 then
103 | self:writeln(self.blockStart)
104 | else
105 | local str = self.lines[#self.lines]
106 | self.lines[#self.lines] = str..' '..self.blockStart
107 | end
108 | self.indent = self.indent + 1
109 |
110 | return self
111 | end
112 |
113 | function CodeWriter:endBlock()
114 | self.indent = self.indent - 1
115 | self:writeln(self.blockEnd)
116 |
117 | return self
118 | end
119 |
120 | function CodeWriter:incIndent()
121 | self.indent = self.indent + 1
122 |
123 | return self
124 | end
125 |
126 | function CodeWriter:decIndent()
127 | self.indent = self.indent - 1
128 |
129 | return self
130 | end
131 |
132 | function CodeWriter:reset()
133 | if #self.lines>0 then self.lines = {} end
134 | self.indent = 0
135 |
136 | self:writeMark()
137 | end
138 |
139 | function CodeWriter:tostring()
140 | return table.concat(self.lines, self.endOfLine)
141 | end
142 |
143 | function CodeWriter:save(filePath)
144 | local str = table.concat(self.lines, self.endOfLine)
145 |
146 | CS.System.IO.File.WriteAllText(filePath, str)
147 | -- local file = io.open(filePath, 'w+b')
148 | -- io.output(file)
149 | -- io.write(str)
150 | -- io.close(file)
151 | end
--------------------------------------------------------------------------------
/FairyGUI-Editor/FairyGUI-Editor_Data/app.info:
--------------------------------------------------------------------------------
1 | HuaGu
2 | FairyGUI-Editor
--------------------------------------------------------------------------------
/FairyGUI-Editor/FairyGUI-Editor_Data/boot.config:
--------------------------------------------------------------------------------
1 | gfx-enable-native-gfx-jobs=
2 | wait-for-native-debugger=0
3 | scripting-runtime-version=latest
4 | vr-enabled=0
5 | hdr-display-enabled=0
6 |
--------------------------------------------------------------------------------
/FairyGUI-Editor/FairyGUI-Editor_Data/globalgamemanagers:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DukeChiang/FGUI2ET/38d485a73f9c862a18d8ebd163555af4480993f8/FairyGUI-Editor/FairyGUI-Editor_Data/globalgamemanagers
--------------------------------------------------------------------------------
/FairyGUI-Editor/FairyGUI-Editor_Data/globalgamemanagers.assets:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DukeChiang/FGUI2ET/38d485a73f9c862a18d8ebd163555af4480993f8/FairyGUI-Editor/FairyGUI-Editor_Data/globalgamemanagers.assets
--------------------------------------------------------------------------------
/FairyGUI-Editor/FairyGUI-Editor_Data/il2cpp_data/Metadata/global-metadata.dat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DukeChiang/FGUI2ET/38d485a73f9c862a18d8ebd163555af4480993f8/FairyGUI-Editor/FairyGUI-Editor_Data/il2cpp_data/Metadata/global-metadata.dat
--------------------------------------------------------------------------------
/FairyGUI-Editor/FairyGUI-Editor_Data/il2cpp_data/Resources/I18N.CJK.dll-resources.dat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DukeChiang/FGUI2ET/38d485a73f9c862a18d8ebd163555af4480993f8/FairyGUI-Editor/FairyGUI-Editor_Data/il2cpp_data/Resources/I18N.CJK.dll-resources.dat
--------------------------------------------------------------------------------
/FairyGUI-Editor/FairyGUI-Editor_Data/il2cpp_data/Resources/NAudio.dll-resources.dat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DukeChiang/FGUI2ET/38d485a73f9c862a18d8ebd163555af4480993f8/FairyGUI-Editor/FairyGUI-Editor_Data/il2cpp_data/Resources/NAudio.dll-resources.dat
--------------------------------------------------------------------------------
/FairyGUI-Editor/FairyGUI-Editor_Data/il2cpp_data/Resources/Newtonsoft.Json.dll-resources.dat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DukeChiang/FGUI2ET/38d485a73f9c862a18d8ebd163555af4480993f8/FairyGUI-Editor/FairyGUI-Editor_Data/il2cpp_data/Resources/Newtonsoft.Json.dll-resources.dat
--------------------------------------------------------------------------------
/FairyGUI-Editor/FairyGUI-Editor_Data/il2cpp_data/Resources/mscorlib.dll-resources.dat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DukeChiang/FGUI2ET/38d485a73f9c862a18d8ebd163555af4480993f8/FairyGUI-Editor/FairyGUI-Editor_Data/il2cpp_data/Resources/mscorlib.dll-resources.dat
--------------------------------------------------------------------------------
/FairyGUI-Editor/FairyGUI-Editor_Data/il2cpp_data/etc/mono/2.0/Browsers/Compat.browser:
--------------------------------------------------------------------------------
1 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/FairyGUI-Editor/FairyGUI-Editor_Data/il2cpp_data/etc/mono/2.0/settings.map:
--------------------------------------------------------------------------------
1 |
2 |
3 |
25 |
26 |
48 |
49 |
--------------------------------------------------------------------------------
/FairyGUI-Editor/FairyGUI-Editor_Data/il2cpp_data/etc/mono/2.0/web.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
64 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
108 |
110 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
150 |
151 |
152 |
153 |
154 |
155 |
--------------------------------------------------------------------------------
/FairyGUI-Editor/FairyGUI-Editor_Data/il2cpp_data/etc/mono/4.0/Browsers/Compat.browser:
--------------------------------------------------------------------------------
1 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/FairyGUI-Editor/FairyGUI-Editor_Data/il2cpp_data/etc/mono/4.0/settings.map:
--------------------------------------------------------------------------------
1 |
2 |
3 |
25 |
26 |
48 |
49 |
--------------------------------------------------------------------------------
/FairyGUI-Editor/FairyGUI-Editor_Data/il2cpp_data/etc/mono/4.0/web.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
79 |
80 |
81 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
94 |
95 |
98 |
99 |
100 |
103 |
104 |
105 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
123 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
197 |
199 |
201 |
202 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
228 |
229 |
230 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
249 |
250 |
251 |
252 |
253 |
254 |
--------------------------------------------------------------------------------
/FairyGUI-Editor/FairyGUI-Editor_Data/il2cpp_data/etc/mono/4.5/Browsers/Compat.browser:
--------------------------------------------------------------------------------
1 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/FairyGUI-Editor/FairyGUI-Editor_Data/il2cpp_data/etc/mono/4.5/settings.map:
--------------------------------------------------------------------------------
1 |
2 |
3 |
25 |
26 |
48 |
49 |
--------------------------------------------------------------------------------
/FairyGUI-Editor/FairyGUI-Editor_Data/il2cpp_data/etc/mono/4.5/web.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
79 |
80 |
81 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
94 |
95 |
98 |
99 |
100 |
103 |
104 |
105 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
123 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
197 |
199 |
201 |
202 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
228 |
229 |
230 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
249 |
250 |
251 |
252 |
253 |
254 |
--------------------------------------------------------------------------------
/FairyGUI-Editor/FairyGUI-Editor_Data/il2cpp_data/etc/mono/browscap.ini:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DukeChiang/FGUI2ET/38d485a73f9c862a18d8ebd163555af4480993f8/FairyGUI-Editor/FairyGUI-Editor_Data/il2cpp_data/etc/mono/browscap.ini
--------------------------------------------------------------------------------
/FairyGUI-Editor/FairyGUI-Editor_Data/il2cpp_data/etc/mono/config:
--------------------------------------------------------------------------------
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 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/FairyGUI-Editor/FairyGUI-Editor_Data/il2cpp_data/etc/mono/mconfig/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
11 |
14 |
17 |
18 |
19 |
20 |
21 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
92 |
93 |
94 |
95 |
97 | ]]>
98 |
99 |
100 |
101 |
102 |
103 |
104 |
107 |
108 |
109 |
110 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 | ]]>
123 |
124 |
125 |
126 |
127 |
128 |
135 |
136 |
137 |
138 |
140 |
141 | ]]>
142 |
143 |
144 |
145 |
146 |
147 |
154 |
155 |
156 |
157 |
159 |
160 |
161 |
162 |
163 | ]]>
164 |
165 |
166 |
167 |
168 |
169 |
174 |
175 |
176 |
177 |
179 |
180 |
181 |
182 | ]]>
183 |
184 |
185 |
186 |
187 |
188 |
193 |
194 |
195 |
196 |
198 | ]]>
199 |
200 |
201 |
202 |
203 |
204 |
209 |
210 |
211 |
212 |
215 |
216 |
217 |
218 |
220 |
221 |
222 |
223 |
224 | ]]>
225 |
226 |
227 |
228 |
229 |
230 |
233 |
234 |
235 |
236 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 | ]]>
248 |
249 |
250 |
251 |
252 |
253 |
256 |
257 |
258 |
259 |
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
272 |
274 |
275 |
276 | ]]>
277 |
278 |
279 |
280 |
281 |
282 |
283 |
284 |
287 |
288 |
289 |
290 |
292 |
293 |
294 |
295 |
296 |
297 |
298 |
299 |
300 |
301 | ]]>
302 |
303 |
304 |
305 |
306 |
307 |
314 |
315 |
316 |
317 |
319 | ]]>
320 |
321 |
322 |
323 |
324 |
325 |
332 |
333 |
334 |
335 |
337 | ]]>
338 |
339 |
340 |
341 |
342 |
343 |
348 |
349 |
350 |
351 |
353 |
354 |
355 |
356 | ]]>
357 |
358 |
359 |
360 |
361 |
362 |
367 |
368 |
369 |
370 |
372 | ]]>
373 |
374 |
375 |
376 |
377 |
378 |
381 |
382 |
383 |
384 |
386 |
387 |
388 |
395 |
396 |
399 |
400 |
403 |
408 |
409 |
412 |
413 | ]]>
414 |
415 |
416 |
417 |
418 |
419 |
422 |
423 |
424 |
425 |
427 |
428 |
429 |
430 |
431 |
432 |
434 |
436 |
437 |
438 | ]]>
439 |
440 |
441 |
442 |
443 |
444 |
445 |
452 |
453 |
454 |
455 |
457 | ]]>
458 |
459 |
460 |
461 |
462 |
463 |
470 |
471 |
472 |
473 |
475 |
476 |
477 |
478 |
479 |
480 |
481 |
482 | ]]>
483 |
484 |
485 |
486 |
487 |
488 |
493 |
494 |
495 |
496 |
498 | ]]>
499 |
500 |
501 |
502 |
503 |
504 |
506 |
507 | ]]>
508 |
509 |
510 |
511 |
513 |
514 | ]]>
515 |
516 |
517 |
518 |
520 |
521 | ]]>
522 |
523 |
524 |
525 |
527 |
528 | ]]>
529 |
530 |
531 |
532 |
534 |
535 | ]]>
536 |
537 |
538 |
539 |
541 |
542 | ]]>
543 |
544 |
545 |
546 |
548 |
549 | ]]>
550 |
551 |
552 |
553 |
555 |
556 | ]]>
557 |
558 |
559 |
560 |
562 |
563 | ]]>
564 |
565 |
566 |
567 |
569 |
570 | ]]>
571 |
572 |
573 |
574 |
576 |
577 | ]]>
578 |
579 |
580 |
581 |
583 | ]]>
584 |
585 |
586 |
587 |
589 |
590 | ]]>
591 |
592 |
593 |
594 |
596 |
597 | ]]>
598 |
599 |
600 |
601 |
603 |
604 | ]]>
605 |
606 |
607 |
608 |
609 |
615 |
616 |
617 |
--------------------------------------------------------------------------------
/FairyGUI-Editor/FairyGUI-Editor_Data/level0:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DukeChiang/FGUI2ET/38d485a73f9c862a18d8ebd163555af4480993f8/FairyGUI-Editor/FairyGUI-Editor_Data/level0
--------------------------------------------------------------------------------
/FairyGUI-Editor/FairyGUI-Editor_Data/level0.resS:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DukeChiang/FGUI2ET/38d485a73f9c862a18d8ebd163555af4480993f8/FairyGUI-Editor/FairyGUI-Editor_Data/level0.resS
--------------------------------------------------------------------------------
/FairyGUI-Editor/FairyGUI-Editor_Data/linear.assets:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DukeChiang/FGUI2ET/38d485a73f9c862a18d8ebd163555af4480993f8/FairyGUI-Editor/FairyGUI-Editor_Data/linear.assets
--------------------------------------------------------------------------------
/FairyGUI-Editor/FairyGUI-Editor_Data/resources.assets:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DukeChiang/FGUI2ET/38d485a73f9c862a18d8ebd163555af4480993f8/FairyGUI-Editor/FairyGUI-Editor_Data/resources.assets
--------------------------------------------------------------------------------
/FairyGUI-Editor/FairyGUI-Editor_Data/resources.assets.resS:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DukeChiang/FGUI2ET/38d485a73f9c862a18d8ebd163555af4480993f8/FairyGUI-Editor/FairyGUI-Editor_Data/resources.assets.resS
--------------------------------------------------------------------------------
/FairyGUI-Editor/FairyGUI-Editor_Data/sharedassets0.assets:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DukeChiang/FGUI2ET/38d485a73f9c862a18d8ebd163555af4480993f8/FairyGUI-Editor/FairyGUI-Editor_Data/sharedassets0.assets
--------------------------------------------------------------------------------
/FairyGUI-Editor/GameAssembly.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DukeChiang/FGUI2ET/38d485a73f9c862a18d8ebd163555af4480993f8/FairyGUI-Editor/GameAssembly.dll
--------------------------------------------------------------------------------
/FairyGUI-Editor/UnityCrashHandler64.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DukeChiang/FGUI2ET/38d485a73f9c862a18d8ebd163555af4480993f8/FairyGUI-Editor/UnityCrashHandler64.exe
--------------------------------------------------------------------------------
/FairyGUI-Editor/UnityPlayer.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DukeChiang/FGUI2ET/38d485a73f9c862a18d8ebd163555af4480993f8/FairyGUI-Editor/UnityPlayer.dll
--------------------------------------------------------------------------------
/FairyGUI-Editor/WinPixEventRuntime.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DukeChiang/FGUI2ET/38d485a73f9c862a18d8ebd163555af4480993f8/FairyGUI-Editor/WinPixEventRuntime.dll
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # FGUI2ET
2 | FairyGUI自动生成ET代码的插件
3 |
--------------------------------------------------------------------------------