lexgui 0.1.43 → 0.1.44
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/build/components/codeeditor.js +1 -0
- package/build/components/videoeditor.js +154 -2
- package/build/lexgui.css +2780 -2158
- package/build/lexgui.js +755 -140
- package/build/lexgui.module.js +757 -139
- package/changelog.md +14 -2
- package/demo.js +57 -31
- package/examples/asset_view.html +1 -1
- package/examples/video_editor.html +1 -1
- package/package.json +1 -1
package/changelog.md
CHANGED
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
# lexgui.js changelog
|
|
2
2
|
|
|
3
|
-
## 0.1.
|
|
3
|
+
## 0.1.45 (dev)
|
|
4
4
|
|
|
5
|
+
## 0.1.44 (master)
|
|
5
6
|
|
|
7
|
+
VideoEditor:
|
|
8
|
+
- Support cropping video area.
|
|
6
9
|
|
|
7
|
-
|
|
10
|
+
Added new `Toggle` Widget (same usage as Checkbox).
|
|
11
|
+
Adding support for inline HTML badges `LX.badge(text)`.
|
|
12
|
+
Checkbox, Progressbar, FileInput css updated.
|
|
13
|
+
Improved Form widget.
|
|
14
|
+
Begin support for light-scheme appearance.
|
|
15
|
+
Fix ContextMenu position when scroll > 0.
|
|
16
|
+
Minor bug fixes.
|
|
17
|
+
Docs Updated.
|
|
18
|
+
|
|
19
|
+
## 0.1.43
|
|
8
20
|
|
|
9
21
|
CodeEditor:
|
|
10
22
|
- Support C and CMake highlight.
|
package/demo.js
CHANGED
|
@@ -81,12 +81,8 @@ area.addMenubar( m => {
|
|
|
81
81
|
|
|
82
82
|
}, { size: ["30%", null], float: "right", draggable: false});
|
|
83
83
|
}} );
|
|
84
|
-
m.add( "Editor/Open AssetView", { icon: "fa-solid fa-rect", callback: () => {
|
|
85
|
-
|
|
86
|
-
}} );
|
|
87
|
-
m.add( "Help/Search Help", { icon: "fa-solid fa-magnifying-glass", short: "F1", callback: () => { window.open("./docs/") }});
|
|
88
|
-
m.add( "Help/Support LexGUI/Please", { icon: "fa-solid fa-heart" } );
|
|
89
|
-
m.add( "Help/Support LexGUI/Do it" );
|
|
84
|
+
m.add( "Editor/Open AssetView", { icon: "fa-solid fa-rect", callback: () => { createAssetDialog(); }} );
|
|
85
|
+
m.add( "Account/Login", { icon: "fa-solid fa-user", callback: () => { createLoginForm(); }} );
|
|
90
86
|
m.add( "Timeline/Shortcuts", { disabled: true });
|
|
91
87
|
m.add( "Timeline/Shortcuts/Play-Pause", { short: "SPACE" });
|
|
92
88
|
m.add( "Timeline/Shortcuts/Zoom", { short: "Wheel" });
|
|
@@ -100,6 +96,9 @@ area.addMenubar( m => {
|
|
|
100
96
|
m.add( "Timeline/Shortcuts/Key Selection/Single", { short: "Left Click" });
|
|
101
97
|
m.add( "Timeline/Shortcuts/Key Selection/Multiple", { short: "Hold LSHIFT" });
|
|
102
98
|
m.add( "Timeline/Shortcuts/Key Selection/Box", { short: "Hold LSHIFT+Drag" });
|
|
99
|
+
m.add( "Help/Search Help", { icon: "fa-solid fa-magnifying-glass", short: "F1", callback: () => { window.open("./docs/") }});
|
|
100
|
+
m.add( "Help/Support LexGUI/Please", { icon: "fa-solid fa-heart" } );
|
|
101
|
+
m.add( "Help/Support LexGUI/Do it" );
|
|
103
102
|
m.addButtons( [
|
|
104
103
|
{
|
|
105
104
|
title: "Play",
|
|
@@ -480,15 +479,19 @@ function fillPanel( panel ) {
|
|
|
480
479
|
|
|
481
480
|
// add widgets to panel branch
|
|
482
481
|
panel.branch("Preferences", {icon: "fa-solid fa-gear"});
|
|
483
|
-
panel.addButton(null, "
|
|
482
|
+
panel.addButton(null, "Show Notifications" + LX.badge("+99", "accent sm"));
|
|
484
483
|
panel.addText("Text", "Warning text", null, { warning: true });
|
|
485
|
-
panel.
|
|
486
|
-
|
|
487
|
-
|
|
484
|
+
panel.addCheckbox("Check me, Please", false, (value, event) => {
|
|
485
|
+
console.log(value);
|
|
486
|
+
}, { className: "secondary" });
|
|
487
|
+
panel.addToggle("Toggle me, Please", false, (value, event) => {
|
|
488
|
+
console.log(value);
|
|
489
|
+
}, { className: "accent" });
|
|
490
|
+
panel.addFile("I'm a File Input", data => { console.log(data) }, { disabled: true } );
|
|
488
491
|
panel.addDropdown("Best Engine", ["Godot", "Unity", "Unreal Engine"], "Unity", (value, event) => {
|
|
489
492
|
console.log(value);
|
|
490
493
|
});
|
|
491
|
-
panel.addDropdown("Best Logo", [{value:"Godot", src: "https://godotengine.org/assets/press/logo_vertical_color_light.
|
|
494
|
+
panel.addDropdown("Best Logo", [{value:"Godot", src: "https://godotengine.org/assets/press/logo_vertical_color_light.png"}, {value: "Unity", src: "https://logos-world.net/wp-content/uploads/2023/01/Unity-Logo.png"}, {value:"Unreal Engine", src: "https://cdn2.unrealengine.com/ue-logo-stacked-unreal-engine-w-677x545-fac11de0943f.png"}], "Godot", (value, event) => {
|
|
492
495
|
console.log(value);
|
|
493
496
|
}, {filter: true});
|
|
494
497
|
|
|
@@ -548,11 +551,6 @@ function fillPanel( panel ) {
|
|
|
548
551
|
console.log(value);
|
|
549
552
|
}, { units: "p", precision: 0 });
|
|
550
553
|
|
|
551
|
-
const formData = { username: "", password: { value: "", type: "password" } };
|
|
552
|
-
panel.addForm("Test form", formData, (value, event) => {
|
|
553
|
-
console.log(value);
|
|
554
|
-
}, { actionName: "Login" });
|
|
555
|
-
|
|
556
554
|
// another branch
|
|
557
555
|
panel.branch("Canvas", {icon: "fa-solid fa-palette", filter: true});
|
|
558
556
|
panel.addColor("Background", "#b7a9b1");
|
|
@@ -631,7 +629,7 @@ function fillRightBottomPanel( panel, tab ) {
|
|
|
631
629
|
panel.addNumber("HeadRoll Value", 0, (value, event) => {
|
|
632
630
|
panel.setValue('HeadRoll', value);
|
|
633
631
|
}, { min: -1, max: 1, step: 0.1 });
|
|
634
|
-
panel.addProgress("HeadRoll", 0, { min: -1, max: 1, showValue: true, editable: true, callback: (value, event) => {
|
|
632
|
+
panel.addProgress("HeadRoll", 0, { min: -1, max: 1, low: -0.25, high: 0.25, optimum: 0.75, showValue: true, editable: true, callback: (value, event) => {
|
|
635
633
|
panel.setValue('HeadRoll Value', value);
|
|
636
634
|
} });
|
|
637
635
|
}
|
|
@@ -671,24 +669,24 @@ function fillRightBottomPanel( panel, tab ) {
|
|
|
671
669
|
/************** */
|
|
672
670
|
// Custom Widget
|
|
673
671
|
|
|
674
|
-
LX.ADD_CUSTOM_WIDGET(
|
|
675
|
-
|
|
672
|
+
LX.ADD_CUSTOM_WIDGET( "Shader", {
|
|
673
|
+
icon: "fa-cube",
|
|
676
674
|
default: {
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
675
|
+
position: [0, 0],
|
|
676
|
+
velocity: [0, 0, 0],
|
|
677
|
+
color: [0, 0, 0, 0],
|
|
678
|
+
hexColor: "#000",
|
|
679
|
+
highRes: false
|
|
682
680
|
}
|
|
683
681
|
});
|
|
684
682
|
|
|
685
683
|
const shaderInstance = {
|
|
686
|
-
'
|
|
687
|
-
'
|
|
684
|
+
'hexColor': "#f5f505",
|
|
685
|
+
'highRes': true
|
|
688
686
|
};
|
|
689
687
|
|
|
690
|
-
panel.addShader( "
|
|
691
|
-
panel.addShader( "Empty", null );
|
|
688
|
+
panel.addShader( "A Shader", shaderInstance, (instance) => { console.log(instance) } );
|
|
689
|
+
panel.addShader( "Empty Instance", null );
|
|
692
690
|
|
|
693
691
|
/************** */
|
|
694
692
|
}
|
|
@@ -722,6 +720,35 @@ function fillBottomPanel( panel ) {
|
|
|
722
720
|
panel.merge();
|
|
723
721
|
}
|
|
724
722
|
|
|
723
|
+
function createLoginForm() {
|
|
724
|
+
|
|
725
|
+
let dialog = new LX.Dialog('Login', panel => {
|
|
726
|
+
|
|
727
|
+
const formData = {
|
|
728
|
+
Username: {
|
|
729
|
+
value: "",
|
|
730
|
+
placeholder: "Enter username",
|
|
731
|
+
icon: "fa fa-user"
|
|
732
|
+
},
|
|
733
|
+
Password: {
|
|
734
|
+
value: "",
|
|
735
|
+
type: "password",
|
|
736
|
+
placeholder: "Enter password",
|
|
737
|
+
icon: "fa fa-key"
|
|
738
|
+
}
|
|
739
|
+
};
|
|
740
|
+
|
|
741
|
+
panel.addForm("Test form", formData, (value, event) => {
|
|
742
|
+
console.log(value);
|
|
743
|
+
}, { actionName: "Login" });
|
|
744
|
+
|
|
745
|
+
panel.addLabel( "Or", { float: 'center' } );
|
|
746
|
+
|
|
747
|
+
panel.addButton( null, "Sign up", ( value, event ) => { });
|
|
748
|
+
|
|
749
|
+
}, { close: true, minimize: false, size: ["25%"], scroll: true, resizable: true, draggable: true });
|
|
750
|
+
}
|
|
751
|
+
|
|
725
752
|
function createAssetDialog() {
|
|
726
753
|
|
|
727
754
|
let dialog = new LX.Dialog('Non Manual Features lexemes', (p) => {
|
|
@@ -788,7 +815,6 @@ function createAssetDialog() {
|
|
|
788
815
|
}
|
|
789
816
|
})
|
|
790
817
|
},{ title:'Lexemes', close: true, minimize: false, size: ["80%"], scroll: true, resizable: true, draggable: true });
|
|
791
|
-
|
|
792
|
-
|
|
793
818
|
}
|
|
794
|
-
|
|
819
|
+
|
|
820
|
+
LX.popup("Hello! I'm a popup :)", null, {position: ["50px", "100px"]});
|
package/examples/asset_view.html
CHANGED
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
video.src = "../data/video.mp4";
|
|
32
32
|
videoArea.attach(video);
|
|
33
33
|
|
|
34
|
-
const videoEditor = new LX.VideoEditor(leftArea, {videoArea, video})
|
|
34
|
+
const videoEditor = new LX.VideoEditor(leftArea, {videoArea, video, crop: true})
|
|
35
35
|
|
|
36
36
|
const canvas = document.createElement('canvas');
|
|
37
37
|
canvas.width = video.clientWidth;
|