lexgui 0.5.10 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/build/components/codeeditor.js +89 -40
- package/build/components/nodegraph.js +32 -23
- package/build/components/timeline.js +5 -5
- package/build/components/videoeditor.js +1 -1
- package/build/lexgui.css +187 -394
- package/build/lexgui.js +892 -1001
- package/build/lexgui.min.css +1 -1
- package/build/lexgui.min.js +1 -1
- package/build/lexgui.module.js +892 -1001
- package/build/lexgui.module.min.js +1 -1
- package/changelog.md +38 -1
- package/demo.js +103 -86
- package/examples/all_widgets.html +37 -38
- package/examples/area_tabs.html +5 -5
- package/examples/asset_view.html +1 -1
- package/examples/code_editor.html +1 -1
- package/examples/dialogs.html +4 -4
- package/examples/immediate_ui.html +1 -1
- package/examples/index.html +8 -8
- package/examples/node_graph.html +1 -1
- package/examples/side_bar.html +15 -15
- package/examples/timeline.html +9 -9
- package/examples/video_editor.html +1 -1
- package/examples/video_editor2.html +5 -6
- package/package.json +1 -1
package/changelog.md
CHANGED
|
@@ -2,7 +2,44 @@
|
|
|
2
2
|
|
|
3
3
|
## dev
|
|
4
4
|
|
|
5
|
-
## 0.
|
|
5
|
+
## 0.6.0 (master)
|
|
6
|
+
|
|
7
|
+
`LX.init` now has to called using `await`.
|
|
8
|
+
Use Dropdowns elements in menubar.
|
|
9
|
+
Remove legacy:
|
|
10
|
+
- Removed `options.selected` in ComboButtons Widget.
|
|
11
|
+
- Removed FA icons.
|
|
12
|
+
Added LucideIcons as main icon provider.
|
|
13
|
+
`LX.makeIcon`: Support for solid variants in supported icons (also using `iconName@variant`).
|
|
14
|
+
`LX.registerIcon`: Support for classes and attributes for svg and path elements.
|
|
15
|
+
Refactor `strictViewport` to `layoutMode` (app|document) in `LX.init`.
|
|
16
|
+
Added support for Sheet element (hiding dialog at the window sides).
|
|
17
|
+
Support disabling layer (zindex) update in `LX.makeDraggable` using `options.updateLayers`.
|
|
18
|
+
Fixed minor issues with some Nodegraph elements.
|
|
19
|
+
Added `className` to `LX.sameLine(numberOfWidgets, class)` to allow customization when using `numberOfWidgets`.
|
|
20
|
+
Added support for right sidebar.
|
|
21
|
+
Restyled Number Widget units to avoid layout trashing when recomputing units span location.
|
|
22
|
+
|
|
23
|
+
CodeEditor:
|
|
24
|
+
- Remove language images and use SVG instead.
|
|
25
|
+
- Scrolling fixes.
|
|
26
|
+
- Fixed minor css issues.
|
|
27
|
+
|
|
28
|
+
Docs updated:
|
|
29
|
+
- Added interactive code examples for widgets.
|
|
30
|
+
- Improved widget list parameters and options.
|
|
31
|
+
- Added live examples for sidebar and menubar.
|
|
32
|
+
|
|
33
|
+
## 0.5.11
|
|
34
|
+
|
|
35
|
+
Widgets:
|
|
36
|
+
- Form: Add more custom options. Fixed issue using a String as Form field.
|
|
37
|
+
|
|
38
|
+
Added `LX.makeElement` to expand support for creating other HTML types.
|
|
39
|
+
Added more theme utils methods: `LX.getTheme` and `LX.switchTheme`.
|
|
40
|
+
Minor css fixes.
|
|
41
|
+
|
|
42
|
+
## 0.5.10
|
|
6
43
|
|
|
7
44
|
Fixed Date Calendar popover not opening.
|
|
8
45
|
Fixed creation of AssetView inner areas.
|
package/demo.js
CHANGED
|
@@ -5,37 +5,39 @@ import 'lexgui/components/audio.js';
|
|
|
5
5
|
|
|
6
6
|
window.LX = LX;
|
|
7
7
|
|
|
8
|
-
const area = LX.init( {
|
|
8
|
+
const area = await LX.init( { layoutMode: "document", rootClass: "wrapper" } );
|
|
9
|
+
|
|
9
10
|
|
|
10
11
|
// Menubar
|
|
11
12
|
{
|
|
12
|
-
area.addMenubar(
|
|
13
|
+
const menubar = area.addMenubar( [
|
|
14
|
+
{ name: "Docs", icon: "search", kbd: "F1", callback: () => { window.open("./docs/") } }
|
|
15
|
+
] );
|
|
13
16
|
|
|
14
|
-
|
|
17
|
+
menubar.setButtonImage("lexgui.js", "images/icon.png", () => {window.open("https://jxarco.github.io/lexgui.js/")}, {float: "left"})
|
|
15
18
|
|
|
16
|
-
|
|
19
|
+
const commandButton = new LX.Button(null, "Search command...", () => { LX.setCommandbarState( true ) }, {
|
|
20
|
+
width: "256px", className: "right", buttonClass: "border left fg-tertiary bg-secondary" }
|
|
21
|
+
);
|
|
22
|
+
menubar.root.appendChild( commandButton.root );
|
|
17
23
|
|
|
18
|
-
|
|
19
|
-
width: "256px", className: "right", buttonClass: "border left fg-tertiary bg-secondary" }
|
|
20
|
-
);
|
|
21
|
-
m.root.appendChild( commandButton.root );
|
|
24
|
+
const starterTheme = LX.getTheme();
|
|
22
25
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
title: "Change Theme",
|
|
33
|
-
icon: "fa-solid fa-sun",
|
|
34
|
-
swap: "fa-solid fa-moon",
|
|
35
|
-
callback: (swapValue) => { LX.setTheme( swapValue ? "light" : "dark" ) }
|
|
26
|
+
menubar.addButtons( [
|
|
27
|
+
{
|
|
28
|
+
title: "Github",
|
|
29
|
+
icon: "Github@solid",
|
|
30
|
+
callback: (event) => {
|
|
31
|
+
window.open( "https://github.com/jxarco/lexgui.js/", "_blank" );
|
|
36
32
|
}
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
title: "Switch Theme",
|
|
36
|
+
icon: starterTheme == "dark" ? "Moon" : "Sun",
|
|
37
|
+
swap: starterTheme == "dark" ? "Sun" : "Moon",
|
|
38
|
+
callback: (value, event) => { LX.switchTheme() }
|
|
39
|
+
}
|
|
40
|
+
], { float: "right" });
|
|
39
41
|
}
|
|
40
42
|
|
|
41
43
|
// Header
|
|
@@ -60,34 +62,49 @@ const area = LX.init( { strictViewport: false, rootClass: "wrapper" } );
|
|
|
60
62
|
const editorArea = new LX.Area({ className: "rounded-lg" });
|
|
61
63
|
editorContainer.appendChild( editorArea.root );
|
|
62
64
|
|
|
63
|
-
editorArea.addMenubar(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
{
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
},
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
65
|
+
const menubar = editorArea.addMenubar( [
|
|
66
|
+
{ name: "Scene", submenu: [
|
|
67
|
+
{ name: "New Scene" },
|
|
68
|
+
{ name: "Open Scene", icon: "FolderOpen", kbd: "S" },
|
|
69
|
+
{ name: "Open Recent", icon: "File", submenu: [
|
|
70
|
+
{ name: "hello.scene" },
|
|
71
|
+
{ name: "goodbye.scene" }
|
|
72
|
+
] }
|
|
73
|
+
] },
|
|
74
|
+
{ name: "Project", submenu: [
|
|
75
|
+
{ name: "Project Settings", disabled: true },
|
|
76
|
+
null,
|
|
77
|
+
{ name: "Export", submenu: [
|
|
78
|
+
{ name: "DAE", icon: "Frame", kbd: "D" },
|
|
79
|
+
{ name: "GLTF", kbd: "G" }
|
|
80
|
+
] },
|
|
81
|
+
{ name: "Export", icon: "Download" }
|
|
82
|
+
] },
|
|
83
|
+
{ name: "Editor", submenu: [
|
|
84
|
+
{ name: "Autosave", checked: true, icon: "Save" },
|
|
85
|
+
{ name: "Settings", icon: "Settings2" },
|
|
86
|
+
] },
|
|
87
|
+
{ name: "Account", submenu: [
|
|
88
|
+
{ name: "Login", icon: "User" },
|
|
89
|
+
] },
|
|
90
|
+
{ name: "Help", submenu: [
|
|
91
|
+
{ name: "Search Help", icon: "Search", kbd: "F1" },
|
|
92
|
+
{ name: "Support LexGUI", icon: "Heart" },
|
|
93
|
+
] },
|
|
94
|
+
], { sticky: false });
|
|
95
|
+
|
|
96
|
+
menubar.addButtons( [
|
|
97
|
+
{
|
|
98
|
+
title: "Play",
|
|
99
|
+
icon: "Play@solid",
|
|
100
|
+
swap: "Stop@solid"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
title: "Pause",
|
|
104
|
+
icon: "Pause@solid",
|
|
105
|
+
disabled: true
|
|
106
|
+
}
|
|
107
|
+
]);
|
|
91
108
|
|
|
92
109
|
// split main area
|
|
93
110
|
const [ left, right ] = editorArea.split({ sizes:["70%","30%"], minimizable: true });
|
|
@@ -108,13 +125,13 @@ const area = LX.init( { strictViewport: false, rootClass: "wrapper" } );
|
|
|
108
125
|
left.onresize = resizeCanvas;
|
|
109
126
|
left.addOverlayButtons( [
|
|
110
127
|
[
|
|
111
|
-
{ name: "Select", icon: "
|
|
112
|
-
{ name: "Move", icon: "
|
|
113
|
-
{ name: "Rotate", icon: "
|
|
128
|
+
{ name: "Select", icon: "MousePointer", selectable: true },
|
|
129
|
+
{ name: "Move", icon: "Move", selectable: true },
|
|
130
|
+
{ name: "Rotate", icon: "RotateRight", selectable: true }
|
|
114
131
|
],
|
|
115
132
|
{ name: "Lit", options: ["Lit", "Unlit", "Wireframe"] },
|
|
116
133
|
[
|
|
117
|
-
{ name: "Enable Snap", icon: "
|
|
134
|
+
{ name: "Enable Snap", icon: "Frame", selectable: true },
|
|
118
135
|
{ name: 10, options: [10, 100, 1000] }
|
|
119
136
|
]
|
|
120
137
|
], { float: "htc" } );
|
|
@@ -151,12 +168,12 @@ const area = LX.init( { strictViewport: false, rootClass: "wrapper" } );
|
|
|
151
168
|
'children': [
|
|
152
169
|
{
|
|
153
170
|
'id': 'node_1_1',
|
|
154
|
-
'icon': '
|
|
171
|
+
'icon': 'Box',
|
|
155
172
|
'children': [],
|
|
156
173
|
'actions': [
|
|
157
174
|
{
|
|
158
175
|
'name': 'Open script',
|
|
159
|
-
'icon': '
|
|
176
|
+
'icon': 'Script'
|
|
160
177
|
}
|
|
161
178
|
]
|
|
162
179
|
}
|
|
@@ -164,7 +181,7 @@ const area = LX.init( { strictViewport: false, rootClass: "wrapper" } );
|
|
|
164
181
|
},
|
|
165
182
|
{
|
|
166
183
|
'id': 'node_2',
|
|
167
|
-
'icon': '
|
|
184
|
+
'icon': 'CirclePlay',
|
|
168
185
|
'children': []
|
|
169
186
|
}
|
|
170
187
|
]
|
|
@@ -174,11 +191,11 @@ const area = LX.init( { strictViewport: false, rootClass: "wrapper" } );
|
|
|
174
191
|
const treeIcons = [
|
|
175
192
|
{
|
|
176
193
|
'name':'Add node',
|
|
177
|
-
'icon': '
|
|
194
|
+
'icon': 'Plus'
|
|
178
195
|
},
|
|
179
196
|
{
|
|
180
197
|
'name':'Instantiate scene',
|
|
181
|
-
'icon': '
|
|
198
|
+
'icon': 'Link'
|
|
182
199
|
}
|
|
183
200
|
];
|
|
184
201
|
|
|
@@ -197,9 +214,9 @@ const area = LX.init( { strictViewport: false, rootClass: "wrapper" } );
|
|
|
197
214
|
});
|
|
198
215
|
|
|
199
216
|
// add widgets to panel branch
|
|
200
|
-
panel.branch("Canvas", {icon: "
|
|
217
|
+
panel.branch("Canvas", { icon: "Palette", filter: true });
|
|
201
218
|
panel.addColor("Background", "#b7a9b1", null);
|
|
202
|
-
panel.addText("Text", "LexGUI.js @jxarco", null, {placeholder: "e.g. ColorPicker", icon: "
|
|
219
|
+
panel.addText("Text", "LexGUI.js @jxarco", null, {placeholder: "e.g. ColorPicker", icon: "Type"});
|
|
203
220
|
panel.addColor("Font Color", "#303b8d", null);
|
|
204
221
|
panel.addNumber("Font Size", 36, null, { min: 1, max: 48, step: 1, units: "px"});
|
|
205
222
|
panel.addSelect("Font Family", ["Arial", "GeistSans", "Monospace", "Ubuntu"], "GeistSans");
|
|
@@ -214,7 +231,7 @@ const area = LX.init( { strictViewport: false, rootClass: "wrapper" } );
|
|
|
214
231
|
panel.addSize("Resolution", [1280, 720], null, { units: "p", precision: 0 });
|
|
215
232
|
panel.merge();
|
|
216
233
|
|
|
217
|
-
panel.branch("Node", { icon: "
|
|
234
|
+
panel.branch("Node", { icon: "Box" });
|
|
218
235
|
panel.addText("Name", "node_1");
|
|
219
236
|
panel.addCheckbox("Visibility", true, null, { className: "accent" });
|
|
220
237
|
panel.addLayers("Layers", 10, null);
|
|
@@ -238,18 +255,18 @@ const area = LX.init( { strictViewport: false, rootClass: "wrapper" } );
|
|
|
238
255
|
const badgeClass = "ml-auto no-bg font-medium";
|
|
239
256
|
|
|
240
257
|
const sidebar = mailArea.addSidebar( m => {
|
|
241
|
-
m.add( "Inbox", { selected: true, icon: "
|
|
242
|
-
m.add( "Drafts", { icon: "
|
|
243
|
-
m.add( "Sent", { icon: "
|
|
244
|
-
m.add( "Junk", { icon: "
|
|
245
|
-
m.add( "Trash", { icon: "
|
|
246
|
-
m.add( "Archive", { icon: "
|
|
258
|
+
m.add( "Inbox", { selected: true, icon: "Inbox", content: LX.badge("128", badgeClass, { asElement: true }) } );
|
|
259
|
+
m.add( "Drafts", { icon: "File", content: LX.badge("9", badgeClass, { asElement: true }) } );
|
|
260
|
+
m.add( "Sent", { icon: "PaperPlane" } );
|
|
261
|
+
m.add( "Junk", { icon: "ArchiveX", content: LX.badge("23", badgeClass, { asElement: true }) } );
|
|
262
|
+
m.add( "Trash", { icon: "Trash3" } );
|
|
263
|
+
m.add( "Archive", { icon: "Archive" } );
|
|
247
264
|
m.separator();
|
|
248
|
-
m.add( "Social", { icon: "
|
|
249
|
-
m.add( "Updates", { icon: "
|
|
250
|
-
m.add( "Forums", { icon: "
|
|
251
|
-
m.add( "Shopping ", { icon: "
|
|
252
|
-
m.add( "Promotions", { icon: "
|
|
265
|
+
m.add( "Social", { icon: "User", content: LX.badge("972", badgeClass, { asElement: true }) } );
|
|
266
|
+
m.add( "Updates", { icon: "Info", content: LX.badge("342", badgeClass, { asElement: true }) } );
|
|
267
|
+
m.add( "Forums", { icon: "MessagesCircle", content: LX.badge("96", badgeClass, { asElement: true }) } );
|
|
268
|
+
m.add( "Shopping ", { icon: "ShoppingCart" } );
|
|
269
|
+
m.add( "Promotions", { icon: "Flag", content: LX.badge("21", badgeClass, { asElement: true }) } );
|
|
253
270
|
}, {
|
|
254
271
|
className: "border-right",
|
|
255
272
|
headerTitle: "jxarco",
|
|
@@ -279,7 +296,7 @@ const area = LX.init( { strictViewport: false, rootClass: "wrapper" } );
|
|
|
279
296
|
{
|
|
280
297
|
const allMailFilter = LX.makeContainer( [ "100%", "50px" ], "flex p-2", "", container );
|
|
281
298
|
const filterInput = new LX.TextInput(null, "", null,
|
|
282
|
-
{ inputClass: "outline", width: "100%", icon: "
|
|
299
|
+
{ inputClass: "outline", width: "100%", icon: "Search", placeholder: "Search..." }
|
|
283
300
|
);
|
|
284
301
|
allMailFilter.appendChild( filterInput.root );
|
|
285
302
|
}
|
|
@@ -346,15 +363,15 @@ const area = LX.init( { strictViewport: false, rootClass: "wrapper" } );
|
|
|
346
363
|
{
|
|
347
364
|
const mailPreviewHeader = LX.makeContainer( [ "100%", "59.59px" ], "flex flex-row border-bottom p-1", "", right );
|
|
348
365
|
|
|
349
|
-
mailPreviewHeader.appendChild( new LX.Button( null, "", null, { title: "Archive", tooltip: true, buttonClass: "bg-none", icon: "
|
|
350
|
-
mailPreviewHeader.appendChild( new LX.Button( null, "", null, { title: "Move to junk", tooltip: true, buttonClass: "bg-none", icon: "
|
|
351
|
-
mailPreviewHeader.appendChild( new LX.Button( null, "", null, { title: "Move to trash", tooltip: true, buttonClass: "bg-none", icon: "
|
|
366
|
+
mailPreviewHeader.appendChild( new LX.Button( null, "", null, { title: "Archive", tooltip: true, buttonClass: "bg-none", icon: "Archive" } ).root );
|
|
367
|
+
mailPreviewHeader.appendChild( new LX.Button( null, "", null, { title: "Move to junk", tooltip: true, buttonClass: "bg-none", icon: "ArchiveX" } ).root );
|
|
368
|
+
mailPreviewHeader.appendChild( new LX.Button( null, "", null, { title: "Move to trash", tooltip: true, buttonClass: "bg-none", icon: "Trash3" } ).root );
|
|
352
369
|
mailPreviewHeader.appendChild( LX.makeContainer( [ "1px", "35%" ], "border-right self-center ml-2 mr-2" ) );
|
|
353
|
-
mailPreviewHeader.appendChild( new LX.Button( null, "", null, { title: "Snooze", tooltip: true, buttonClass: "bg-none", icon: "
|
|
370
|
+
mailPreviewHeader.appendChild( new LX.Button( null, "", null, { title: "Snooze", tooltip: true, buttonClass: "bg-none", icon: "Clock" } ).root );
|
|
354
371
|
|
|
355
|
-
mailPreviewHeader.appendChild( new LX.Button( null, "", null, { title: "Reply", tooltip: true, buttonClass: "bg-none", className: "ml-auto", icon: "
|
|
356
|
-
mailPreviewHeader.appendChild( new LX.Button( null, "", null, { title: "Reply all", tooltip: true, buttonClass: "bg-none", icon: "
|
|
357
|
-
mailPreviewHeader.appendChild( new LX.Button( null, "", null, { title: "Forward", tooltip: true, buttonClass: "bg-none", icon: "
|
|
372
|
+
mailPreviewHeader.appendChild( new LX.Button( null, "", null, { title: "Reply", tooltip: true, buttonClass: "bg-none", className: "ml-auto", icon: "Reply" } ).root );
|
|
373
|
+
mailPreviewHeader.appendChild( new LX.Button( null, "", null, { title: "Reply all", tooltip: true, buttonClass: "bg-none", icon: "ReplyAll" } ).root );
|
|
374
|
+
mailPreviewHeader.appendChild( new LX.Button( null, "", null, { title: "Forward", tooltip: true, buttonClass: "bg-none", icon: "Forward" } ).root );
|
|
358
375
|
mailPreviewHeader.appendChild( LX.makeContainer( [ "1px", "35%" ], "border-right self-center ml-2 mr-2" ) );
|
|
359
376
|
mailPreviewHeader.appendChild( new LX.Button( null, "", (value, event) => {
|
|
360
377
|
new LX.DropdownMenu( event.target, [
|
|
@@ -363,7 +380,7 @@ const area = LX.init( { strictViewport: false, rootClass: "wrapper" } );
|
|
|
363
380
|
{ name: "Add label" },
|
|
364
381
|
{ name: "Mute thread" }
|
|
365
382
|
], { side: "bottom", align: "end" });
|
|
366
|
-
}, { buttonClass: "bg-none", icon: "
|
|
383
|
+
}, { buttonClass: "bg-none", icon: "EllipsisVertical" } ).root );
|
|
367
384
|
}
|
|
368
385
|
|
|
369
386
|
// Prewiew Info
|
|
@@ -444,7 +461,7 @@ const area = LX.init( { strictViewport: false, rootClass: "wrapper" } );
|
|
|
444
461
|
{ name: "Priority", options: ["Low", "Medium", "High"] },
|
|
445
462
|
],
|
|
446
463
|
rowActions: [
|
|
447
|
-
{ icon: "
|
|
464
|
+
{ icon: "Edit", title: "Edit Row" },
|
|
448
465
|
"delete",
|
|
449
466
|
"menu"
|
|
450
467
|
],
|
|
@@ -515,8 +532,8 @@ const area = LX.init( { strictViewport: false, rootClass: "wrapper" } );
|
|
|
515
532
|
],
|
|
516
533
|
credits: `2019-${ new Date().getUTCFullYear() } Alex Rodríguez and contributors. Website source code on GitHub.`,
|
|
517
534
|
socials: [
|
|
518
|
-
{ title: "Github", link: "https://github.com/jxarco/lexgui.js/", icon:
|
|
519
|
-
{ title: "Discord", link: "https://discord.gg/vwqVrMZBXv", icon:
|
|
535
|
+
{ title: "Github", link: "https://github.com/jxarco/lexgui.js/", icon: "Github" },
|
|
536
|
+
{ title: "Discord", link: "https://discord.gg/vwqVrMZBXv", icon: "Discord" }
|
|
520
537
|
]
|
|
521
538
|
} );
|
|
522
539
|
}
|
|
@@ -30,26 +30,25 @@
|
|
|
30
30
|
window.LX = LX;
|
|
31
31
|
|
|
32
32
|
// Init library and get main area
|
|
33
|
-
let area = LX.init();
|
|
34
|
-
|
|
35
|
-
area.addMenubar(
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}, { sticky: false });
|
|
33
|
+
let area = await LX.init();
|
|
34
|
+
|
|
35
|
+
const menubar = area.addMenubar( [], { sticky: false } );
|
|
36
|
+
menubar.addButtons([
|
|
37
|
+
{
|
|
38
|
+
title: "Toggle Sections",
|
|
39
|
+
icon: "Eye",
|
|
40
|
+
callback: (swapValue) => { closedDefault = !closedDefault; fillPanels(); }
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
title: "Change Theme",
|
|
44
|
+
icon: "Moon",
|
|
45
|
+
swap: "Sun",
|
|
46
|
+
callback: (swapValue) => { LX.setTheme(swapValue ? "light" : "dark") }
|
|
47
|
+
}
|
|
48
|
+
]);
|
|
49
|
+
|
|
50
|
+
menubar.setButtonIcon("Github", "Github", () => { window.open("https://github.com/jxarco/lexgui.js/") })
|
|
51
|
+
menubar.setButtonImage("lexgui.js", "../images/icon.png", () => { window.open("https://jxarco.github.io/lexgui.js/") }, { float: "left" })
|
|
53
52
|
|
|
54
53
|
var [middle, right] = area.split({ sizes: ["70%", "30%"], minimizable: true });
|
|
55
54
|
var [left, center] = middle.split({ sizes: ["50%", null], minimizable: true });
|
|
@@ -72,9 +71,9 @@
|
|
|
72
71
|
panelC.root.innerHTML = "";
|
|
73
72
|
|
|
74
73
|
const comboValues = [
|
|
75
|
-
{ value: 'left', selected: true, icon: '
|
|
76
|
-
{ value: 'center', icon: '
|
|
77
|
-
{ value: 'right', icon: '
|
|
74
|
+
{ value: 'left', selected: true, icon: 'AlignLeft' },
|
|
75
|
+
{ value: 'center', icon: 'AlignCenter' },
|
|
76
|
+
{ value: 'right', icon: 'AlignRight' }
|
|
78
77
|
];
|
|
79
78
|
|
|
80
79
|
const selectValues = ["Godot", "Unity", "Unreal Engine", "Visual Studio", "Visual Studio Code"];
|
|
@@ -108,19 +107,19 @@
|
|
|
108
107
|
buttonsLeftPanel.addButton(null, "Warning", null, { disabled: true, buttonClass: "warning" });
|
|
109
108
|
buttonsLeftPanel.addButton(null, "Error", null, { disabled: true, buttonClass: "error" });
|
|
110
109
|
buttonsLeftPanel.branch("Advanced Buttons", { closed: closedDefault });
|
|
111
|
-
buttonsLeftPanel.addButton("Icon Button", "Not used", null, { icon: "
|
|
110
|
+
buttonsLeftPanel.addButton("Icon Button", "Not used", null, { icon: "Skull" });
|
|
112
111
|
buttonsLeftPanel.sameLine();
|
|
113
112
|
buttonsLeftPanel.addLabel("Customized Inline Buttons");
|
|
114
|
-
buttonsLeftPanel.addButton(null, "Not used", null, { icon: "
|
|
115
|
-
buttonsLeftPanel.addButton(null, "Not used", null, { icon: "
|
|
116
|
-
buttonsLeftPanel.addButton(null, "Not used", null, { icon: "
|
|
113
|
+
buttonsLeftPanel.addButton(null, "Not used", null, { icon: "Skull", buttonClass: "bg-none" });
|
|
114
|
+
buttonsLeftPanel.addButton(null, "Not used", null, { icon: "Box", buttonClass: "bg-primary" });
|
|
115
|
+
buttonsLeftPanel.addButton(null, "Not used", null, { icon: "Grid3x3", buttonClass: "bg-tertiary fg-tertiary" });
|
|
117
116
|
buttonsLeftPanel.endLine("justify-start");
|
|
118
117
|
buttonsLeftPanel.sameLine();
|
|
119
118
|
buttonsLeftPanel.addLabel("Swap Buttons");
|
|
120
|
-
buttonsLeftPanel.addButton(null, "Not used", null, { icon: "
|
|
121
|
-
buttonsLeftPanel.addButton(null, "Not used", null, { icon: "
|
|
119
|
+
buttonsLeftPanel.addButton(null, "Not used", null, { icon: "Moon", swap: "Sun", buttonClass: "bg-none" });
|
|
120
|
+
buttonsLeftPanel.addButton(null, "Not used", null, { icon: "Eye", swap: "EyeOff" });
|
|
122
121
|
buttonsLeftPanel.endLine("justify-start");
|
|
123
|
-
buttonsLeftPanel.addButton(null, LX.makeIcon("
|
|
122
|
+
buttonsLeftPanel.addButton(null, LX.makeIcon("CirclePlus").innerHTML + "Button with Inlined Icon", null);
|
|
124
123
|
buttonsLeftPanel.addButton(null, "With a Badge" + LX.badge("+99", "accent sm"));
|
|
125
124
|
buttonsRightPanel.branch("Outline Buttons", { closed: closedDefault });
|
|
126
125
|
buttonsRightPanel.addButton(null, "Classic Outline", null, { buttonClass: "outline" });
|
|
@@ -265,12 +264,12 @@
|
|
|
265
264
|
'children': [
|
|
266
265
|
{
|
|
267
266
|
'id': 'node_1_1',
|
|
268
|
-
'icon': '
|
|
267
|
+
'icon': 'Box',
|
|
269
268
|
'children': [],
|
|
270
269
|
'actions': [
|
|
271
270
|
{
|
|
272
271
|
'name': 'Open script',
|
|
273
|
-
'icon': '
|
|
272
|
+
'icon': 'Script',
|
|
274
273
|
'callback': function (node) {
|
|
275
274
|
console.log(node.id + ": Script opened!")
|
|
276
275
|
}
|
|
@@ -281,7 +280,7 @@
|
|
|
281
280
|
},
|
|
282
281
|
{
|
|
283
282
|
'id': 'node_2',
|
|
284
|
-
'icon': '
|
|
283
|
+
'icon': 'CirclePlay',
|
|
285
284
|
'children': []
|
|
286
285
|
},
|
|
287
286
|
{
|
|
@@ -289,12 +288,12 @@
|
|
|
289
288
|
'children': [
|
|
290
289
|
{
|
|
291
290
|
'id': 'node_3_1',
|
|
292
|
-
'icon': '
|
|
291
|
+
'icon': 'Box',
|
|
293
292
|
'children': []
|
|
294
293
|
},
|
|
295
294
|
{
|
|
296
295
|
'id': 'node_3_2',
|
|
297
|
-
'icon': '
|
|
296
|
+
'icon': 'Box',
|
|
298
297
|
'children': []
|
|
299
298
|
}
|
|
300
299
|
]
|
|
@@ -306,12 +305,12 @@
|
|
|
306
305
|
const treeIcons = [
|
|
307
306
|
{
|
|
308
307
|
'name': 'Add node',
|
|
309
|
-
'icon': '
|
|
308
|
+
'icon': 'Plus',
|
|
310
309
|
'callback': () => { console.log("Node added!") }
|
|
311
310
|
},
|
|
312
311
|
{
|
|
313
312
|
'name': 'Instantiate scene',
|
|
314
|
-
'icon': '
|
|
313
|
+
'icon': 'Link',
|
|
315
314
|
'callback': () => { console.log("Scene instantiated!") }
|
|
316
315
|
}
|
|
317
316
|
];
|
|
@@ -357,7 +356,7 @@
|
|
|
357
356
|
{ name: "Priority", options: ["Low", "Medium", "High"] },
|
|
358
357
|
],
|
|
359
358
|
rowActions: [
|
|
360
|
-
{ icon: "
|
|
359
|
+
{ icon: "Edit", title: "Edit Row" },
|
|
361
360
|
"delete",
|
|
362
361
|
"menu"
|
|
363
362
|
],
|
package/examples/area_tabs.html
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
import { LX } from 'lexgui';
|
|
24
24
|
|
|
25
25
|
// init library and get main area
|
|
26
|
-
let area = LX.init();
|
|
26
|
+
let area = await LX.init();
|
|
27
27
|
|
|
28
28
|
// split main area
|
|
29
29
|
var [leftArea, rightArea] = area.split({ sizes: ["75%", "25%"] });
|
|
@@ -84,9 +84,9 @@
|
|
|
84
84
|
// **** **** **** **** **** **** **** **** **** **** **** ****
|
|
85
85
|
|
|
86
86
|
function fillPanelA(panel) {
|
|
87
|
-
panel.branch("Canvas", { icon: "
|
|
87
|
+
panel.branch("Canvas", { icon: "Palette", filter: true });
|
|
88
88
|
panel.addColor("Background", "#b7a9b1");
|
|
89
|
-
panel.addText("Text", "Lexgui.js @jxarco", null, { placeholder: "e.g. ColorPicker", icon: "
|
|
89
|
+
panel.addText("Text", "Lexgui.js @jxarco", null, { placeholder: "e.g. ColorPicker", icon: "Type" });
|
|
90
90
|
panel.addColor("Font Color", { r: 1, g: 0.1, b: 0.6 }, (value, event) => {
|
|
91
91
|
console.log("Font Color: ", value);
|
|
92
92
|
});
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
function fillPanelB(panel) {
|
|
103
|
-
panel.branch("Settings", { icon: "
|
|
103
|
+
panel.branch("Settings", { icon: "Palette", filter: true });
|
|
104
104
|
panel.addTitle("Configuration (Im a title)");
|
|
105
105
|
panel.addCheckbox("Toggle me", true, (value, event) => {
|
|
106
106
|
console.log(value);
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
function fillPanelC(panel) {
|
|
118
|
-
panel.branch("Some Branch", { icon: "
|
|
118
|
+
panel.branch("Some Branch", { icon: "Palette", filter: true });
|
|
119
119
|
panel.addTitle("C title");
|
|
120
120
|
panel.addToggle("A cool Toggle", true, (value, event) => {
|
|
121
121
|
console.log(value);
|
package/examples/asset_view.html
CHANGED
package/examples/dialogs.html
CHANGED
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
import { LX } from 'lexgui';
|
|
23
23
|
|
|
24
24
|
// Init library and get main area
|
|
25
|
-
let area = LX.init({ skip_default_area: true });
|
|
25
|
+
let area = await LX.init({ skip_default_area: true });
|
|
26
26
|
|
|
27
27
|
LX.popup("Hello! I'm a popup dialog :)", null, { position: ["45%", "20%"] })
|
|
28
28
|
|
|
29
29
|
const pocketDialog = new LX.PocketDialog("Load Settings", p => {
|
|
30
30
|
p.branch("Canvas");
|
|
31
31
|
p.addColor("Background", "#b7a9b1");
|
|
32
|
-
p.addText("Text", "Pocket Dialog Lexgui.js @jxarco", null, { placeholder: "e.g. ColorPicker", icon: "
|
|
32
|
+
p.addText("Text", "Pocket Dialog Lexgui.js @jxarco", null, { placeholder: "e.g. ColorPicker", icon: "Type" });
|
|
33
33
|
p.addColor("Font Color", { r: 1, g: 0.1, b: 0.6 }, (value, event) => {
|
|
34
34
|
console.log("Font Color: ", value);
|
|
35
35
|
});
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
const dialogClosable = new LX.Dialog("Closable Dialog", p => {
|
|
50
50
|
p.branch("Canvas");
|
|
51
51
|
p.addColor("Background", "#b7a9b1");
|
|
52
|
-
p.addText("Text", "Dialog Lexgui.js @jxarco", null, { placeholder: "e.g. ColorPicker", icon: "
|
|
52
|
+
p.addText("Text", "Dialog Lexgui.js @jxarco", null, { placeholder: "e.g. ColorPicker", icon: "Type" });
|
|
53
53
|
p.addColor("Font Color", { r: 1, g: 0.1, b: 0.6 }, (value, event) => {
|
|
54
54
|
console.log("Font Color: ", value);
|
|
55
55
|
});
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
const draggablePocketDialog = new LX.PocketDialog("Draggable PocketDialog", p => {
|
|
69
69
|
p.branch("Canvas");
|
|
70
70
|
p.addColor("Background", "#b7a9b1");
|
|
71
|
-
p.addText("Text", "Pocket Dialog Lexgui.js @jxarco", null, { placeholder: "e.g. ColorPicker", icon: "
|
|
71
|
+
p.addText("Text", "Pocket Dialog Lexgui.js @jxarco", null, { placeholder: "e.g. ColorPicker", icon: "Type" });
|
|
72
72
|
p.addSelect("Best Engine", ["Godot", "Unity", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Pepe"], "Godot", (value, event) => {
|
|
73
73
|
console.log(value);
|
|
74
74
|
}, { filter: true });
|