lexgui 0.4.2 → 0.5.1

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/changelog.md CHANGED
@@ -2,11 +2,44 @@
2
2
 
3
3
  ## dev
4
4
 
5
- ## 0.4.2 (master)
5
+ ## 0.5.1 (master)
6
+
7
+ Widgets:
8
+ - Added support for `text centering` all/specific columns in Table Widget.
9
+ - Fixed widget content size when using `options.nameWidth`. First fix for sizes in inline widgets.
10
+ - Fixed issue in Tree Widget when selecting from code using `NodeTree.select`.
11
+ - Support for closing all Node items recursively by using `Alt+Close` on a specific node.
12
+
13
+ Fixed Area tabs drag&drop when `fit` mode.
14
+ Fixed issue on open/destroy dropdown.
15
+ Fixed label text wrap on Checkbox&Toggle widgets.
16
+ Added `contrast` theme for supported Widgets.
17
+
18
+ ## 0.5.0
19
+
20
+ Widgets:
21
+ - Created classes for each widget to create them at any place.
22
+ - `Panel.addTabs`: Renamed to `addTabSections`. Added name parameter (1st). Returns `TabSections` widget instance.
23
+ - `Panel.addDropdown`: Renamed to `addSelect`. Returns `Select` widget instance.
24
+ - Added support for labels in Select Widget.
25
+ - `Panel.addContent` and `Panel.addImage` now accepts name as first parameter.
26
+ - Title: `Panel.addTitle` now returns `Title` widget instance, not its inner title HTMLElement.
27
+ - Tree: `Panel.addTree` now returns `Tree` widget instance, not its inner `NodeTree`.
28
+ - Table: Added support for `options.sortable` rows and `title` for row action icons.
29
+
30
+ Fixed Select Widget overflow inside dialog.
31
+ New `DropdownMenu` class.
32
+ Added `displaySelected` option to Sidebar to display selected entry.
33
+ Started Notifications docs.
34
+ Added Icons/ page in docs.
35
+ Fixed Menubar entries auto-open when menubar is focused.
36
+ Minor CSS tweaks.
37
+
38
+ ## 0.4.2
6
39
 
7
40
  Widgets:
8
41
  - RadioGroup: Add name parameter (1st).
9
- - Add `options.hideName` for supported widgets: Don't use label but add `name` to allow registering.
42
+ - Added `options.hideName` for supported widgets: Don't use label but add `name` to allow registering.
10
43
 
11
44
  Sidebar subentries are now collapsable (`true` by default).
12
45
  Support `options.header` and `options.footer` for custom sidebar elements.
@@ -53,6 +53,10 @@
53
53
  fillPanelB( panelB );
54
54
  rightTabs.add( "PanelB", panelB );
55
55
 
56
+ var panelC = new LX.Panel();
57
+ fillPanelC( panelC );
58
+ rightTabs.add( "panelC", panelC );
59
+
56
60
  function loop(dt) {
57
61
 
58
62
  var ctx = canvas.getContext("2d");
@@ -77,7 +81,6 @@
77
81
  // **** **** **** **** **** **** **** **** **** **** **** ****
78
82
 
79
83
  function fillPanelA( panel ) {
80
-
81
84
  panel.branch("Canvas", {icon: "fa-solid fa-palette", filter: true});
82
85
  panel.addColor("Background", "#b7a9b1");
83
86
  panel.addText("Text", "Lexgui.js @jxarco", null, {placeholder: "e.g. ColorPicker", icon: "fa fa-font"});
@@ -94,7 +97,6 @@
94
97
  }
95
98
 
96
99
  function fillPanelB( panel ) {
97
-
98
100
  panel.branch("Settings", {icon: "fa-solid fa-palette", filter: true});
99
101
  panel.addTitle("Configuration (Im a title)");
100
102
  panel.addCheckbox("Toggle me", true, (value, event) => {
@@ -107,5 +109,18 @@
107
109
  panel.merge();
108
110
  }
109
111
 
112
+ function fillPanelC( panel ) {
113
+ panel.branch("Some Branch", {icon: "fa-solid fa-palette", filter: true});
114
+ panel.addTitle("C title");
115
+ panel.addToggle("A cool Toggle", true, (value, event) => {
116
+ console.log(value);
117
+ }, { suboptions: (p) => {
118
+ p.addText(null, "Suboption 1");
119
+ p.addNumber("Suboption 2", 12);
120
+ } });
121
+ panel.addRange("Yup", 15, data => { console.log(data) }, {} );
122
+ panel.merge();
123
+ }
124
+
110
125
  </script>
111
126
  </html>
@@ -67,6 +67,9 @@
67
67
  p.branch("Canvas");
68
68
  p.addColor("Background", "#b7a9b1");
69
69
  p.addText("Text", "Pocket Dialog Lexgui.js @jxarco", null, {placeholder: "e.g. ColorPicker", icon: "fa fa-font"});
70
+ 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) => {
71
+ console.log(value);
72
+ }, {filter: true});
70
73
  p.addColor("Font Color", [1, 0.1, 0.6], (value, event) => {
71
74
  console.log("Font Color: ", value);
72
75
  });
@@ -76,9 +79,6 @@
76
79
  p.addVector2("2D Position", [250, 350], (value, event) => {
77
80
  console.log(value);
78
81
  }, { min: 0, max: 1024 });
79
- p.addDropdown("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) => {
80
- console.log(value);
81
- }, {filter: true});
82
82
  p.merge();
83
83
  }, { size: ["350px", null], draggable: true });
84
84
 
@@ -188,7 +188,7 @@
188
188
  let kfTimeline = new LX.KeyFramesTimeline('keyframesTimeline', {
189
189
  disableNewTracks: true,
190
190
  onBeforeCreateTopBar: (panel) => {
191
- panel.addDropdown("Animation", ["Anim 1", "Anim 2", "Anim 3"], "Anim 1", ()=> {})
191
+ panel.addSelect("Animation", ["Anim 1", "Anim 2", "Anim 3"], "Anim 1", ()=> {})
192
192
  },
193
193
  onAfterCreateTopBar: (panel) => {
194
194
  panel.addButton("", "autoKeyEnable", null, { icon: 'fa fa-wand-magic-sparkles', name: 'autoKeyEnabled', width: "40px" });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lexgui",
3
- "version": "0.4.2",
3
+ "version": "0.5.1",
4
4
  "description": "JS library to create web graphical user interfaces",
5
5
  "type": "module",
6
6
  "main": "./build/lexgui.js",