Update config, LuaLS definitions, bundle and changelog
This commit is contained in:
561
config.lua
561
config.lua
@@ -1,351 +1,360 @@
|
|||||||
return {
|
return {
|
||||||
["metadata"] = {
|
["metadata"] = {
|
||||||
|
["generated"] = "Mon Feb 24 19:52:36 2025",
|
||||||
["version"] = "2.0",
|
["version"] = "2.0",
|
||||||
["generated"] = "Sun Feb 23 11:20:35 2025",
|
|
||||||
},
|
},
|
||||||
["categories"] = {
|
["categories"] = {
|
||||||
["elements"] = {
|
["plugins"] = {
|
||||||
["description"] = "UI Elements",
|
|
||||||
["files"] = {
|
["files"] = {
|
||||||
|
["pluginTemplate"] = {
|
||||||
|
["size"] = 695,
|
||||||
|
["requires"] = {
|
||||||
|
},
|
||||||
|
["path"] = "plugins/pluginTemplate.lua",
|
||||||
|
["default"] = true,
|
||||||
|
["description"] = "",
|
||||||
|
},
|
||||||
|
["xml"] = {
|
||||||
|
["size"] = 6371,
|
||||||
|
["requires"] = {
|
||||||
|
},
|
||||||
|
["path"] = "plugins/xml.lua",
|
||||||
|
["default"] = true,
|
||||||
|
["description"] = "",
|
||||||
|
},
|
||||||
|
["benchmark"] = {
|
||||||
|
["size"] = 12515,
|
||||||
|
["requires"] = {
|
||||||
|
},
|
||||||
|
["path"] = "plugins/benchmark.lua",
|
||||||
|
["default"] = true,
|
||||||
|
["description"] = "",
|
||||||
|
},
|
||||||
|
["state"] = {
|
||||||
|
["size"] = 5867,
|
||||||
|
["requires"] = {
|
||||||
|
},
|
||||||
|
["path"] = "plugins/state.lua",
|
||||||
|
["default"] = true,
|
||||||
|
["description"] = "",
|
||||||
|
},
|
||||||
|
["theme"] = {
|
||||||
|
["size"] = 5879,
|
||||||
|
["requires"] = {
|
||||||
|
},
|
||||||
|
["path"] = "plugins/theme.lua",
|
||||||
|
["default"] = true,
|
||||||
|
["description"] = "",
|
||||||
|
},
|
||||||
|
["animation"] = {
|
||||||
|
["size"] = 14116,
|
||||||
|
["requires"] = {
|
||||||
|
},
|
||||||
|
["path"] = "plugins/animation.lua",
|
||||||
|
["default"] = true,
|
||||||
|
["description"] = "",
|
||||||
|
},
|
||||||
|
["debug"] = {
|
||||||
|
["size"] = 6175,
|
||||||
|
["requires"] = {
|
||||||
|
},
|
||||||
|
["path"] = "plugins/debug.lua",
|
||||||
|
["default"] = true,
|
||||||
|
["description"] = "",
|
||||||
|
},
|
||||||
|
["reactive"] = {
|
||||||
|
["size"] = 6989,
|
||||||
|
["requires"] = {
|
||||||
|
},
|
||||||
|
["path"] = "plugins/reactive.lua",
|
||||||
|
["default"] = true,
|
||||||
|
["description"] = "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
["description"] = "Plugins",
|
||||||
|
},
|
||||||
|
["libraries"] = {
|
||||||
|
["files"] = {
|
||||||
|
["utils"] = {
|
||||||
|
["size"] = 2661,
|
||||||
|
["requires"] = {
|
||||||
|
},
|
||||||
|
["path"] = "libraries/utils.lua",
|
||||||
|
["default"] = true,
|
||||||
|
["description"] = "",
|
||||||
|
},
|
||||||
|
["colorHex"] = {
|
||||||
|
["size"] = 132,
|
||||||
|
["requires"] = {
|
||||||
|
},
|
||||||
|
["path"] = "libraries/colorHex.lua",
|
||||||
|
["default"] = true,
|
||||||
|
["description"] = "",
|
||||||
|
},
|
||||||
|
["expect"] = {
|
||||||
|
["size"] = 880,
|
||||||
|
["requires"] = {
|
||||||
|
},
|
||||||
|
["path"] = "libraries/expect.lua",
|
||||||
|
["default"] = true,
|
||||||
|
["description"] = "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
["description"] = "Libraries",
|
||||||
|
},
|
||||||
|
["elements"] = {
|
||||||
|
["files"] = {
|
||||||
|
["BaseElement"] = {
|
||||||
|
["size"] = 8733,
|
||||||
|
["requires"] = {
|
||||||
|
},
|
||||||
|
["path"] = "elements/BaseElement.lua",
|
||||||
|
["default"] = true,
|
||||||
|
["description"] = "The base class for all UI elements in Basalt.",
|
||||||
|
},
|
||||||
["Slider"] = {
|
["Slider"] = {
|
||||||
["description"] = "",
|
["size"] = 4767,
|
||||||
["default"] = true,
|
["requires"] = {
|
||||||
|
[1] = "VisualElement",
|
||||||
|
},
|
||||||
["path"] = "elements/Slider.lua",
|
["path"] = "elements/Slider.lua",
|
||||||
["requires"] = {
|
["default"] = true,
|
||||||
[1] = "VisualElement",
|
|
||||||
},
|
|
||||||
["size"] = 4465,
|
|
||||||
},
|
|
||||||
["Label"] = {
|
|
||||||
["description"] = "",
|
["description"] = "",
|
||||||
["default"] = true,
|
|
||||||
["path"] = "elements/Label.lua",
|
|
||||||
["requires"] = {
|
|
||||||
[1] = "VisualElement",
|
|
||||||
},
|
|
||||||
["size"] = 2848,
|
|
||||||
},
|
|
||||||
["Tree"] = {
|
|
||||||
["description"] = "",
|
|
||||||
["default"] = true,
|
|
||||||
["path"] = "elements/Tree.lua",
|
|
||||||
["requires"] = {
|
|
||||||
[1] = "VisualElement",
|
|
||||||
},
|
|
||||||
["size"] = 7284,
|
|
||||||
},
|
|
||||||
["Button"] = {
|
|
||||||
["description"] = "Standard button element with click handling and state management",
|
|
||||||
["default"] = true,
|
|
||||||
["path"] = "elements/Button.lua",
|
|
||||||
["requires"] = {
|
|
||||||
[1] = "VisualElement",
|
|
||||||
},
|
|
||||||
["size"] = 1837,
|
|
||||||
},
|
|
||||||
["Flexbox"] = {
|
|
||||||
["description"] = "",
|
|
||||||
["default"] = true,
|
|
||||||
["path"] = "elements/Flexbox.lua",
|
|
||||||
["requires"] = {
|
|
||||||
[1] = "Container",
|
|
||||||
},
|
|
||||||
["size"] = 10132,
|
|
||||||
},
|
},
|
||||||
["Menu"] = {
|
["Menu"] = {
|
||||||
["description"] = "A horizontal menu bar with selectable",
|
["size"] = 4721,
|
||||||
["default"] = true,
|
|
||||||
["path"] = "elements/Menu.lua",
|
|
||||||
["requires"] = {
|
["requires"] = {
|
||||||
[1] = "List",
|
[1] = "List",
|
||||||
},
|
},
|
||||||
["size"] = 4714,
|
["path"] = "elements/Menu.lua",
|
||||||
},
|
|
||||||
["Program"] = {
|
|
||||||
["description"] = "",
|
|
||||||
["default"] = true,
|
["default"] = true,
|
||||||
["path"] = "elements/Program.lua",
|
["description"] = "A horizontal menu bar with selectable items.",
|
||||||
["requires"] = {
|
|
||||||
[1] = "VisualElement",
|
|
||||||
},
|
|
||||||
["size"] = 5589,
|
|
||||||
},
|
},
|
||||||
["Checkbox"] = {
|
["Flexbox"] = {
|
||||||
["description"] = "",
|
["size"] = 11685,
|
||||||
["default"] = true,
|
|
||||||
["path"] = "elements/Checkbox.lua",
|
|
||||||
["requires"] = {
|
["requires"] = {
|
||||||
[1] = "VisualElement",
|
[1] = "Container",
|
||||||
},
|
},
|
||||||
["size"] = 2874,
|
["path"] = "elements/Flexbox.lua",
|
||||||
|
["default"] = true,
|
||||||
|
["description"] = "A flexbox container that arranges its children in a flexible layout.",
|
||||||
},
|
},
|
||||||
["VisualElement"] = {
|
["VisualElement"] = {
|
||||||
["description"] = "The Visual Element class which is the base class for all visual UI elements",
|
["size"] = 14506,
|
||||||
["default"] = true,
|
|
||||||
["path"] = "elements/VisualElement.lua",
|
|
||||||
["requires"] = {
|
["requires"] = {
|
||||||
[1] = "BaseElement",
|
[1] = "BaseElement",
|
||||||
},
|
},
|
||||||
["size"] = 14456,
|
["path"] = "elements/VisualElement.lua",
|
||||||
},
|
|
||||||
["Table"] = {
|
|
||||||
["description"] = "",
|
|
||||||
["default"] = true,
|
["default"] = true,
|
||||||
["path"] = "elements/Table.lua",
|
["description"] = "The Visual Element class which is the base class for all visual UI elements",
|
||||||
["requires"] = {
|
|
||||||
[1] = "VisualElement",
|
|
||||||
},
|
|
||||||
["size"] = 8475,
|
|
||||||
},
|
},
|
||||||
["Input"] = {
|
["Frame"] = {
|
||||||
["description"] = "A text input field with various features",
|
["size"] = 1147,
|
||||||
["default"] = true,
|
|
||||||
["path"] = "elements/Input.lua",
|
|
||||||
["requires"] = {
|
|
||||||
[1] = "VisualElement",
|
|
||||||
},
|
|
||||||
["size"] = 7180,
|
|
||||||
},
|
|
||||||
["BaseFrame"] = {
|
|
||||||
["description"] = "This is the base frame class. It is the root element of all elements and the only element without a parent.",
|
|
||||||
["default"] = true,
|
|
||||||
["path"] = "elements/BaseFrame.lua",
|
|
||||||
["requires"] = {
|
["requires"] = {
|
||||||
[1] = "Container",
|
[1] = "Container",
|
||||||
},
|
},
|
||||||
["size"] = 5188,
|
["path"] = "elements/Frame.lua",
|
||||||
|
["default"] = true,
|
||||||
|
["description"] = "A frame element that serves as a grouping container for other elements.",
|
||||||
|
},
|
||||||
|
["Tree"] = {
|
||||||
|
["size"] = 7902,
|
||||||
|
["requires"] = {
|
||||||
|
[1] = "VisualElement",
|
||||||
|
},
|
||||||
|
["path"] = "elements/Tree.lua",
|
||||||
|
["default"] = true,
|
||||||
|
["description"] = "",
|
||||||
|
},
|
||||||
|
["Input"] = {
|
||||||
|
["size"] = 7157,
|
||||||
|
["requires"] = {
|
||||||
|
[1] = "VisualElement",
|
||||||
|
},
|
||||||
|
["path"] = "elements/Input.lua",
|
||||||
|
["default"] = true,
|
||||||
|
["description"] = "A text input field with various features",
|
||||||
|
},
|
||||||
|
["Checkbox"] = {
|
||||||
|
["size"] = 2942,
|
||||||
|
["requires"] = {
|
||||||
|
[1] = "VisualElement",
|
||||||
|
},
|
||||||
|
["path"] = "elements/Checkbox.lua",
|
||||||
|
["default"] = true,
|
||||||
|
["description"] = "",
|
||||||
|
},
|
||||||
|
["Label"] = {
|
||||||
|
["size"] = 2964,
|
||||||
|
["requires"] = {
|
||||||
|
[1] = "VisualElement",
|
||||||
|
},
|
||||||
|
["path"] = "elements/Label.lua",
|
||||||
|
["default"] = true,
|
||||||
|
["description"] = "A simple text display element that automatically resizes its width based on the text content.",
|
||||||
|
},
|
||||||
|
["Image"] = {
|
||||||
|
["size"] = 5638,
|
||||||
|
["requires"] = {
|
||||||
|
[1] = "VisualElement",
|
||||||
|
},
|
||||||
|
["path"] = "elements/Image.lua",
|
||||||
|
["default"] = false,
|
||||||
|
["description"] = "An element that displays an image in bimg format",
|
||||||
|
},
|
||||||
|
["ProgressBar"] = {
|
||||||
|
["size"] = 2348,
|
||||||
|
["requires"] = {
|
||||||
|
[1] = "VisualElement",
|
||||||
|
},
|
||||||
|
["path"] = "elements/ProgressBar.lua",
|
||||||
|
["default"] = true,
|
||||||
|
["description"] = "",
|
||||||
},
|
},
|
||||||
["TextBox"] = {
|
["TextBox"] = {
|
||||||
["description"] = "A multi-line text editor component with cursor support and text manipulation features",
|
["size"] = 10931,
|
||||||
["default"] = false,
|
["requires"] = {
|
||||||
|
[1] = "VisualElement",
|
||||||
|
},
|
||||||
["path"] = "elements/TextBox.lua",
|
["path"] = "elements/TextBox.lua",
|
||||||
|
["default"] = false,
|
||||||
|
["description"] = "A multi-line text editor component with cursor support and text manipulation features",
|
||||||
|
},
|
||||||
|
["Program"] = {
|
||||||
|
["size"] = 6687,
|
||||||
["requires"] = {
|
["requires"] = {
|
||||||
[1] = "VisualElement",
|
[1] = "VisualElement",
|
||||||
},
|
},
|
||||||
["size"] = 8976,
|
["path"] = "elements/Program.lua",
|
||||||
},
|
|
||||||
["Container"] = {
|
|
||||||
["description"] = "The container class. It is a visual element that can contain other elements. It is the base class for all containers",
|
|
||||||
["default"] = true,
|
["default"] = true,
|
||||||
["path"] = "elements/Container.lua",
|
|
||||||
["requires"] = {
|
|
||||||
[1] = "VisualElement",
|
|
||||||
},
|
|
||||||
["size"] = 21768,
|
|
||||||
},
|
|
||||||
["Scrollbar"] = {
|
|
||||||
["description"] = "",
|
["description"] = "",
|
||||||
["default"] = true,
|
|
||||||
["path"] = "elements/Scrollbar.lua",
|
|
||||||
["requires"] = {
|
|
||||||
[1] = "VisualElement",
|
|
||||||
},
|
|
||||||
["size"] = 7793,
|
|
||||||
},
|
},
|
||||||
["Dropdown"] = {
|
["Dropdown"] = {
|
||||||
["description"] = "A dropdown menu that shows a list of selectable items",
|
["size"] = 5975,
|
||||||
["default"] = false,
|
|
||||||
["path"] = "elements/Dropdown.lua",
|
|
||||||
["requires"] = {
|
["requires"] = {
|
||||||
[1] = "List",
|
[1] = "List",
|
||||||
},
|
},
|
||||||
["size"] = 5976,
|
["path"] = "elements/Dropdown.lua",
|
||||||
|
["default"] = false,
|
||||||
|
["description"] = "A dropdown menu that shows a list of selectable items",
|
||||||
},
|
},
|
||||||
["Frame"] = {
|
["List"] = {
|
||||||
["description"] = "",
|
["size"] = 8382,
|
||||||
|
["requires"] = {
|
||||||
|
[1] = "VisualElement",
|
||||||
|
},
|
||||||
|
["path"] = "elements/List.lua",
|
||||||
["default"] = true,
|
["default"] = true,
|
||||||
["path"] = "elements/Frame.lua",
|
["description"] = "A scrollable list of selectable items",
|
||||||
|
},
|
||||||
|
["Container"] = {
|
||||||
|
["size"] = 23200,
|
||||||
|
["requires"] = {
|
||||||
|
[1] = "VisualElement",
|
||||||
|
},
|
||||||
|
["path"] = "elements/Container.lua",
|
||||||
|
["default"] = true,
|
||||||
|
["description"] = "The container class. It is a visual element that can contain other elements. It is the base class for all containers",
|
||||||
|
},
|
||||||
|
["Table"] = {
|
||||||
|
["size"] = 7673,
|
||||||
|
["requires"] = {
|
||||||
|
[1] = "VisualElement",
|
||||||
|
},
|
||||||
|
["path"] = "elements/Table.lua",
|
||||||
|
["default"] = true,
|
||||||
|
["description"] = "",
|
||||||
|
},
|
||||||
|
["Button"] = {
|
||||||
|
["size"] = 1846,
|
||||||
|
["requires"] = {
|
||||||
|
[1] = "VisualElement",
|
||||||
|
},
|
||||||
|
["path"] = "elements/Button.lua",
|
||||||
|
["default"] = true,
|
||||||
|
["description"] = "Standard button element with click handling and state management",
|
||||||
|
},
|
||||||
|
["BaseFrame"] = {
|
||||||
|
["size"] = 5212,
|
||||||
["requires"] = {
|
["requires"] = {
|
||||||
[1] = "Container",
|
[1] = "Container",
|
||||||
},
|
},
|
||||||
["size"] = 1053,
|
["path"] = "elements/BaseFrame.lua",
|
||||||
},
|
|
||||||
["BaseElement"] = {
|
|
||||||
["description"] = "The base class for all UI elements in Basalt",
|
|
||||||
["default"] = true,
|
["default"] = true,
|
||||||
["path"] = "elements/BaseElement.lua",
|
["description"] = "This is the base frame class. It is the root element of all elements and the only element without a parent.",
|
||||||
["requires"] = {
|
|
||||||
},
|
|
||||||
["size"] = 8969,
|
|
||||||
},
|
},
|
||||||
["ProgressBar"] = {
|
["Scrollbar"] = {
|
||||||
["description"] = "",
|
["size"] = 9281,
|
||||||
["default"] = true,
|
|
||||||
["path"] = "elements/ProgressBar.lua",
|
|
||||||
["requires"] = {
|
["requires"] = {
|
||||||
[1] = "VisualElement",
|
[1] = "VisualElement",
|
||||||
},
|
},
|
||||||
["size"] = 2348,
|
["path"] = "elements/Scrollbar.lua",
|
||||||
},
|
|
||||||
["List"] = {
|
|
||||||
["description"] = "A scrollable list of selectable items",
|
|
||||||
["default"] = true,
|
["default"] = true,
|
||||||
["path"] = "elements/List.lua",
|
["description"] = "",
|
||||||
["requires"] = {
|
|
||||||
[1] = "VisualElement",
|
|
||||||
},
|
|
||||||
["size"] = 8413,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
["plugins"] = {
|
|
||||||
["description"] = "Plugins",
|
|
||||||
["files"] = {
|
|
||||||
["state"] = {
|
|
||||||
["description"] = "",
|
|
||||||
["default"] = true,
|
|
||||||
["path"] = "plugins/state.lua",
|
|
||||||
["requires"] = {
|
|
||||||
},
|
|
||||||
["size"] = 5867,
|
|
||||||
},
|
|
||||||
["xml"] = {
|
|
||||||
["description"] = "",
|
|
||||||
["default"] = true,
|
|
||||||
["path"] = "plugins/xml.lua",
|
|
||||||
["requires"] = {
|
|
||||||
},
|
|
||||||
["size"] = 6371,
|
|
||||||
},
|
|
||||||
["animation"] = {
|
|
||||||
["description"] = "",
|
|
||||||
["default"] = true,
|
|
||||||
["path"] = "plugins/animation.lua",
|
|
||||||
["requires"] = {
|
|
||||||
},
|
|
||||||
["size"] = 14116,
|
|
||||||
},
|
|
||||||
["pluginTemplate"] = {
|
|
||||||
["description"] = "",
|
|
||||||
["default"] = true,
|
|
||||||
["path"] = "plugins/pluginTemplate.lua",
|
|
||||||
["requires"] = {
|
|
||||||
},
|
|
||||||
["size"] = 695,
|
|
||||||
},
|
|
||||||
["reactive"] = {
|
|
||||||
["description"] = "",
|
|
||||||
["default"] = true,
|
|
||||||
["path"] = "plugins/reactive.lua",
|
|
||||||
["requires"] = {
|
|
||||||
},
|
|
||||||
["size"] = 6989,
|
|
||||||
},
|
|
||||||
["benchmark"] = {
|
|
||||||
["description"] = "",
|
|
||||||
["default"] = true,
|
|
||||||
["path"] = "plugins/benchmark.lua",
|
|
||||||
["requires"] = {
|
|
||||||
},
|
|
||||||
["size"] = 12515,
|
|
||||||
},
|
|
||||||
["theme"] = {
|
|
||||||
["description"] = "",
|
|
||||||
["default"] = true,
|
|
||||||
["path"] = "plugins/theme.lua",
|
|
||||||
["requires"] = {
|
|
||||||
},
|
|
||||||
["size"] = 5879,
|
|
||||||
},
|
|
||||||
["debug"] = {
|
|
||||||
["description"] = "",
|
|
||||||
["default"] = true,
|
|
||||||
["path"] = "plugins/debug.lua",
|
|
||||||
["requires"] = {
|
|
||||||
},
|
|
||||||
["size"] = 6175,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
["description"] = "UI Elements",
|
||||||
},
|
},
|
||||||
["core"] = {
|
["core"] = {
|
||||||
["description"] = "Core Files",
|
|
||||||
["files"] = {
|
["files"] = {
|
||||||
["errorManager"] = {
|
["main"] = {
|
||||||
["description"] = "",
|
["size"] = 7849,
|
||||||
["default"] = true,
|
|
||||||
["path"] = "errorManager.lua",
|
|
||||||
["requires"] = {
|
["requires"] = {
|
||||||
},
|
},
|
||||||
["size"] = 3789,
|
["path"] = "main.lua",
|
||||||
},
|
|
||||||
["propertySystem"] = {
|
|
||||||
["description"] = "",
|
|
||||||
["default"] = true,
|
["default"] = true,
|
||||||
["path"] = "propertySystem.lua",
|
|
||||||
["requires"] = {
|
|
||||||
},
|
|
||||||
["size"] = 15220,
|
|
||||||
},
|
|
||||||
["elementManager"] = {
|
|
||||||
["description"] = "",
|
["description"] = "",
|
||||||
["default"] = true,
|
|
||||||
["path"] = "elementManager.lua",
|
|
||||||
["requires"] = {
|
|
||||||
},
|
|
||||||
["size"] = 6290,
|
|
||||||
},
|
|
||||||
["log"] = {
|
|
||||||
["description"] = "",
|
|
||||||
["default"] = true,
|
|
||||||
["path"] = "log.lua",
|
|
||||||
["requires"] = {
|
|
||||||
},
|
|
||||||
["size"] = 3142,
|
|
||||||
},
|
},
|
||||||
["render"] = {
|
["render"] = {
|
||||||
["description"] = "",
|
["size"] = 10919,
|
||||||
["default"] = true,
|
|
||||||
["path"] = "render.lua",
|
|
||||||
["requires"] = {
|
["requires"] = {
|
||||||
},
|
},
|
||||||
["size"] = 10919,
|
["path"] = "render.lua",
|
||||||
|
["default"] = true,
|
||||||
|
["description"] = "",
|
||||||
},
|
},
|
||||||
["init"] = {
|
["init"] = {
|
||||||
["description"] = "",
|
|
||||||
["default"] = true,
|
|
||||||
["path"] = "init.lua",
|
|
||||||
["requires"] = {
|
|
||||||
},
|
|
||||||
["size"] = 519,
|
["size"] = 519,
|
||||||
},
|
|
||||||
["main"] = {
|
|
||||||
["description"] = "",
|
|
||||||
["default"] = true,
|
|
||||||
["path"] = "main.lua",
|
|
||||||
["requires"] = {
|
["requires"] = {
|
||||||
},
|
},
|
||||||
["size"] = 7849,
|
["path"] = "init.lua",
|
||||||
},
|
["default"] = true,
|
||||||
},
|
["description"] = "",
|
||||||
},
|
},
|
||||||
["libraries"] = {
|
["elementManager"] = {
|
||||||
["description"] = "Libraries",
|
["size"] = 6290,
|
||||||
["files"] = {
|
["requires"] = {
|
||||||
["colorHex"] = {
|
},
|
||||||
["description"] = "",
|
["path"] = "elementManager.lua",
|
||||||
["default"] = true,
|
["default"] = true,
|
||||||
["path"] = "libraries/colorHex.lua",
|
["description"] = "",
|
||||||
["requires"] = {
|
},
|
||||||
},
|
["errorManager"] = {
|
||||||
["size"] = 132,
|
["size"] = 3789,
|
||||||
},
|
["requires"] = {
|
||||||
["expect"] = {
|
},
|
||||||
["description"] = "",
|
["path"] = "errorManager.lua",
|
||||||
["default"] = true,
|
["default"] = true,
|
||||||
["path"] = "libraries/expect.lua",
|
["description"] = "",
|
||||||
["requires"] = {
|
},
|
||||||
},
|
["log"] = {
|
||||||
["size"] = 880,
|
["size"] = 3142,
|
||||||
},
|
["requires"] = {
|
||||||
["utils"] = {
|
},
|
||||||
["description"] = "",
|
["path"] = "log.lua",
|
||||||
["default"] = true,
|
["default"] = true,
|
||||||
["path"] = "libraries/utils.lua",
|
["description"] = "",
|
||||||
["requires"] = {
|
},
|
||||||
},
|
["propertySystem"] = {
|
||||||
["size"] = 2661,
|
["size"] = 15220,
|
||||||
|
["requires"] = {
|
||||||
|
},
|
||||||
|
["path"] = "propertySystem.lua",
|
||||||
|
["default"] = true,
|
||||||
|
["description"] = "",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
["description"] = "Core Files",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@@ -21,6 +21,7 @@ minified_elementDirectory["Frame"] = {}
|
|||||||
minified_elementDirectory["Button"] = {}
|
minified_elementDirectory["Button"] = {}
|
||||||
minified_elementDirectory["Program"] = {}
|
minified_elementDirectory["Program"] = {}
|
||||||
minified_elementDirectory["Label"] = {}
|
minified_elementDirectory["Label"] = {}
|
||||||
|
minified_elementDirectory["Image"] = {}
|
||||||
minified_elementDirectory["Flexbox"] = {}
|
minified_elementDirectory["Flexbox"] = {}
|
||||||
minified_elementDirectory["Container"] = {}
|
minified_elementDirectory["Container"] = {}
|
||||||
minified_elementDirectory["Slider"] = {}
|
minified_elementDirectory["Slider"] = {}
|
||||||
@@ -763,11 +764,10 @@ aa.defineEvent(aa,"mouse_scroll")
|
|||||||
function aa.new()local ba=setmetatable({},aa):__init()
|
function aa.new()local ba=setmetatable({},aa):__init()
|
||||||
ba.set("width",30)ba.set("height",10)ba.set("z",5)return ba end
|
ba.set("width",30)ba.set("height",10)ba.set("z",5)return ba end
|
||||||
function aa:init(ba,ca)d.init(self,ba,ca)self.set("type","Table")return self end
|
function aa:init(ba,ca)d.init(self,ba,ca)self.set("type","Table")return self end
|
||||||
function aa:setColumns(ba)self.set("columns",ba)return self end;function aa:setData(ba)self.set("data",ba)return self end
|
function aa:sortData(ba)local ca=self.get("data")
|
||||||
function aa:sortData(ba)
|
local da=self.get("sortDirection")
|
||||||
local ca=self.get("data")local da=self.get("sortDirection")
|
table.sort(ca,function(_b,ab)
|
||||||
table.sort(ca,function(_b,ab)if da=="asc"then return
|
if da=="asc"then return _b[ba]<ab[ba]else return _b[ba]>ab[ba]end end)self.set("data",ca)return self end
|
||||||
_b[ba]<ab[ba]else return _b[ba]>ab[ba]end end)self.set("data",ca)return self end
|
|
||||||
function aa:mouse_click(ba,ca,da)
|
function aa:mouse_click(ba,ca,da)
|
||||||
if not d.mouse_click(self,ba,ca,da)then return false end;local _b,ab=self:getRelativePosition(ca,da)
|
if not d.mouse_click(self,ba,ca,da)then return false end;local _b,ab=self:getRelativePosition(ca,da)
|
||||||
if ab==1 then local bb=1
|
if ab==1 then local bb=1
|
||||||
@@ -827,13 +827,14 @@ cb=string.sub(cb,1 -da)da=1 end
|
|||||||
self._render:blit(da,_b,ab,bb,cb)end;function ca:setCursor(da,_b,ab,bb)local cb=self.get("term")
|
self._render:blit(da,_b,ab,bb,cb)end;function ca:setCursor(da,_b,ab,bb)local cb=self.get("term")
|
||||||
self._render:setCursor(da,_b,ab,bb)end
|
self._render:setCursor(da,_b,ab,bb)end
|
||||||
function ca:mouse_up(da,_b,ab)
|
function ca:mouse_up(da,_b,ab)
|
||||||
aa.mouse_up(self,da,_b,ab)aa.mouse_release(self,da,_b,ab)end;function ca:render()
|
aa.mouse_up(self,da,_b,ab)aa.mouse_release(self,da,_b,ab)end
|
||||||
|
function ca:term_resize()local da,_b=self.get("term").getSize()
|
||||||
|
if(da==
|
||||||
|
self.get("width")and _b==self.get("height"))then return end;self.set("width",da)self.set("height",_b)
|
||||||
|
self._render:setSize(da,_b)self._renderUpdate=true end;function ca:render()
|
||||||
if(self._renderUpdate)then if self._render~=nil then aa.render(self)
|
if(self._renderUpdate)then if self._render~=nil then aa.render(self)
|
||||||
self._render:render()self._renderUpdate=false end end end
|
self._render:render()self._renderUpdate=false end end end
|
||||||
function ca:term_resize()
|
return ca end
|
||||||
local da,_b=self.get("term").getSize()if
|
|
||||||
(da==self.get("width")and _b==self.get("height"))then return end;self.set("width",da)
|
|
||||||
self.set("height",_b)self._render:setSize(da,_b)self._renderUpdate=true end;return ca end
|
|
||||||
project["elements/ProgressBar.lua"] = function(...) local c=require("elements/VisualElement")
|
project["elements/ProgressBar.lua"] = function(...) local c=require("elements/VisualElement")
|
||||||
local d=setmetatable({},c)d.__index=d
|
local d=setmetatable({},c)d.__index=d
|
||||||
d.defineProperty(d,"progress",{default=0,type="number",canTriggerRender=true})
|
d.defineProperty(d,"progress",{default=0,type="number",canTriggerRender=true})
|
||||||
@@ -940,7 +941,7 @@ da.header="Basalt Program Error"da.error(ac)end;return _c,ac end;function ab:sto
|
|||||||
local cb=setmetatable({},_b):__init()cb.set("z",5)cb.set("width",30)cb.set("height",12)
|
local cb=setmetatable({},_b):__init()cb.set("z",5)cb.set("width",30)cb.set("height",12)
|
||||||
return cb end
|
return cb end
|
||||||
function _b:init(cb,db)
|
function _b:init(cb,db)
|
||||||
ca.init(self,cb,db)self.set("type","Program")end
|
ca.init(self,cb,db)self.set("type","Program")return self end
|
||||||
function _b:execute(cb)self.set("path",cb)self.set("running",true)
|
function _b:execute(cb)self.set("path",cb)self.set("running",true)
|
||||||
local db=ab.new()self.set("program",db)
|
local db=ab.new()self.set("program",db)
|
||||||
db:run(cb,self.get("width"),self.get("height"))self:updateRender()return self end
|
db:run(cb,self.get("width"),self.get("height"))self:updateRender()return self end
|
||||||
@@ -979,6 +980,53 @@ if
|
|||||||
(self.get("autoSize"))then self:textFg(1,1,da,self.get("foreground"))else
|
(self.get("autoSize"))then self:textFg(1,1,da,self.get("foreground"))else
|
||||||
local _b=ba(da,self.get("width"))for ab,bb in ipairs(_b)do
|
local _b=ba(da,self.get("width"))for ab,bb in ipairs(_b)do
|
||||||
self:textFg(1,ab,bb,self.get("foreground"))end end end;return ca end
|
self:textFg(1,ab,bb,self.get("foreground"))end end end;return ca end
|
||||||
|
project["elements/Image.lua"] = function(...) local _a=require("elementManager")
|
||||||
|
local aa=_a.getElement("VisualElement")local ba=require("libraries/colorHex")
|
||||||
|
local ca=setmetatable({},aa)ca.__index=ca
|
||||||
|
ca.defineProperty(ca,"bimg",{default={},type="table",canTriggerRender=true})
|
||||||
|
ca.defineProperty(ca,"currentFrame",{default=1,type="number",canTriggerRender=true})
|
||||||
|
ca.defineProperty(ca,"metadata",{default={},type="table"})
|
||||||
|
function ca.new()local da=setmetatable({},ca):__init()return da end;function ca:init(da,_b)aa.init(self,da,_b)self.set("type","Image")
|
||||||
|
return self end
|
||||||
|
function ca:loadBimg(da)
|
||||||
|
if type(da)~="table"then return self end;local _b={}local ab={}for bb,cb in pairs(da)do
|
||||||
|
if type(bb)=="number"then _b[bb]=cb else ab[bb]=cb end end;self.set("bimg",_b)
|
||||||
|
self.set("metadata",ab)
|
||||||
|
if _b[1]and _b[1][1]then
|
||||||
|
self.set("width",#_b[1][1][2])self.set("height",#_b[1])end;return self end
|
||||||
|
function ca:getPixelData(da,_b)
|
||||||
|
local ab=self.get("bimg")[self.get("currentFrame")]if not ab or not ab[_b]then return end;local bb=ab[_b][1]
|
||||||
|
local cb=ab[_b][2]local db=ab[_b][3]
|
||||||
|
if not bb or not cb or not db then return end;local _c=tonumber(cb:sub(da,da),16)
|
||||||
|
local ac=tonumber(db:sub(da,da),16)local bc=bb:sub(da,da)return _c,ac,bc end
|
||||||
|
function ca:setChar(da,_b,ab)
|
||||||
|
if type(ab)~="string"or#ab~=1 then return self end
|
||||||
|
local bb=self.get("bimg")[self.get("currentFrame")]if not bb then bb={{},{},{}}
|
||||||
|
self.get("bimg")[self.get("currentFrame")]=bb end
|
||||||
|
if not bb[_b]then bb[_b]={"","",""}end;local cb=bb[_b][1]while#cb<da do cb=cb.." "end;bb[_b][1]=
|
||||||
|
cb:sub(1,da-1)..ab..cb:sub(da+1)
|
||||||
|
self:updateRender()return self end
|
||||||
|
function ca:setFg(da,_b,ab)if type(ab)~="number"then return self end
|
||||||
|
local bb=self.get("bimg")[self.get("currentFrame")]if not bb then bb={{},{},{}}
|
||||||
|
self.get("bimg")[self.get("currentFrame")]=bb end
|
||||||
|
if not bb[_b]then bb[_b]={"","",""}end;local cb=bb[_b][2]while#cb<da do cb=cb.."f"end;bb[_b][2]=
|
||||||
|
cb:sub(1,da-1)..ba[ab]..cb:sub(da+1)
|
||||||
|
self:updateRender()return self end
|
||||||
|
function ca:setBg(da,_b,ab)if type(ab)~="number"then return self end
|
||||||
|
local bb=self.get("bimg")[self.get("currentFrame")]if not bb then bb={{},{},{}}
|
||||||
|
self.get("bimg")[self.get("currentFrame")]=bb end
|
||||||
|
if not bb[_b]then bb[_b]={"","",""}end;local cb=bb[_b][3]while#cb<da do cb=cb.."f"end;bb[_b][3]=
|
||||||
|
cb:sub(1,da-1)..ba[ab]..cb:sub(da+1)
|
||||||
|
self:updateRender()return self end
|
||||||
|
function ca:setPixel(da,_b,ab,bb,cb)if ab then self:setChar(da,_b,ab)end;if bb then
|
||||||
|
self:setFg(da,_b,bb)end;if cb then self:setBg(da,_b,cb)end;return self end
|
||||||
|
function ca:nextFrame()
|
||||||
|
if not self.get("metadata").animation then return end;local da=self.get("bimg")local _b=self.get("currentFrame")
|
||||||
|
local ab=_b+1;if ab>#da then ab=1 end;self.set("currentFrame",ab)return self end
|
||||||
|
function ca:render()aa.render(self)
|
||||||
|
local da=self.get("bimg")[self.get("currentFrame")]if not da then return end
|
||||||
|
for _b,ab in ipairs(da)do local bb=ab[1]local cb=ab[2]local db=ab[3]if
|
||||||
|
bb and cb and db then self:blit(1,_b,bb,cb,db)end end end;return ca end
|
||||||
project["elements/Flexbox.lua"] = function(...) local da=require("elementManager")
|
project["elements/Flexbox.lua"] = function(...) local da=require("elementManager")
|
||||||
local _b=da.getElement("Container")local ab=setmetatable({},_b)ab.__index=ab
|
local _b=da.getElement("Container")local ab=setmetatable({},_b)ab.__index=ab
|
||||||
ab.defineProperty(ab,"flexDirection",{default="row",type="string"})
|
ab.defineProperty(ab,"flexDirection",{default="row",type="string"})
|
||||||
@@ -1047,9 +1095,10 @@ bc.set("width",12)bc.set("height",6)
|
|||||||
bc.set("background",colors.blue)bc.set("z",10)
|
bc.set("background",colors.blue)bc.set("z",10)
|
||||||
bc:observe("width",function()
|
bc:observe("width",function()
|
||||||
bc.set("flexUpdateLayout",true)end)
|
bc.set("flexUpdateLayout",true)end)
|
||||||
bc:observe("height",function()bc.set("flexUpdateLayout",true)end)return bc end
|
bc:observe("height",function()bc.set("flexUpdateLayout",true)end)return bc end;function ab:init(bc,cc)_b.init(self,bc,cc)self.set("type","Flexbox")
|
||||||
function ab:init(bc,cc)_b.init(self,bc,cc)self.set("type","Flexbox")end
|
return self end
|
||||||
function ab:addChild(bc)_b.addChild(self,bc)
|
function ab:addChild(bc)
|
||||||
|
_b.addChild(self,bc)
|
||||||
if(bc~=bb)then
|
if(bc~=bb)then
|
||||||
bc:instanceProperty("flexGrow",{default=0,type="number"})
|
bc:instanceProperty("flexGrow",{default=0,type="number"})
|
||||||
bc:instanceProperty("flexShrink",{default=0,type="number"})
|
bc:instanceProperty("flexShrink",{default=0,type="number"})
|
||||||
@@ -1419,11 +1468,12 @@ _b.defineProperty(_b,"ignoreOffset",{default=false,type="boolean"})_b.combinePro
|
|||||||
_b.combineProperties(_b,"size","width","height")
|
_b.combineProperties(_b,"size","width","height")
|
||||||
_b.combineProperties(_b,"color","foreground","background")_b.defineEvent(_b,"focus")
|
_b.combineProperties(_b,"color","foreground","background")_b.defineEvent(_b,"focus")
|
||||||
_b.defineEvent(_b,"blur")
|
_b.defineEvent(_b,"blur")
|
||||||
_b.registerEventCallback(_b,"MouseClick","mouse_click","mouse_up")
|
_b.registerEventCallback(_b,"Click","mouse_click","mouse_up")
|
||||||
_b.registerEventCallback(_b,"MouseUp","mouse_up","mouse_click")
|
_b.registerEventCallback(_b,"MouseUp","mouse_up","mouse_click")
|
||||||
_b.registerEventCallback(_b,"MouseDrag","mouse_drag","mouse_click","mouse_up")
|
_b.registerEventCallback(_b,"Drag","mouse_drag","mouse_click","mouse_up")
|
||||||
_b.registerEventCallback(_b,"MouseScroll","mouse_scroll")
|
_b.registerEventCallback(_b,"Scroll","mouse_scroll")
|
||||||
_b.registerEventCallback(_b,"MouseEnter","mouse_enter","mouse_move")_b.registerEventCallback(_b,"Focus","focus","blur")
|
_b.registerEventCallback(_b,"Enter","mouse_enter","mouse_move")
|
||||||
|
_b.registerEventCallback(_b,"LeEave","mouse_leave","mouse_move")_b.registerEventCallback(_b,"Focus","focus","blur")
|
||||||
_b.registerEventCallback(_b,"Blur","blur","focus")local ab,bb=math.max,math.min;function _b.new()
|
_b.registerEventCallback(_b,"Blur","blur","focus")local ab,bb=math.max,math.min;function _b.new()
|
||||||
local cb=setmetatable({},_b):__init()return cb end;function _b:init(cb,db)ca.init(self,cb,db)
|
local cb=setmetatable({},_b):__init()return cb end;function _b:init(cb,db)ca.init(self,cb,db)
|
||||||
self.set("type","VisualElement")end;function _b:multiBlit(cb,db,_c,ac,bc,cc,dc)
|
self.set("type","VisualElement")end;function _b:multiBlit(cb,db,_c,ac,bc,cc,dc)
|
||||||
@@ -1510,7 +1560,8 @@ function ca:updateAttachedElement()local ab=self.get("attachedElement")
|
|||||||
if not ab then return end;local bb=self.get("value")local cb=self.get("minValue")
|
if not ab then return end;local bb=self.get("value")local cb=self.get("minValue")
|
||||||
local db=self.get("maxValue")if type(cb)=="function"then cb=cb()end;if type(db)=="function"then
|
local db=self.get("maxValue")if type(cb)=="function"then cb=cb()end;if type(db)=="function"then
|
||||||
db=db()end;local _c=cb+ (bb/100)* (db-cb)ab.set(self.get("attachedProperty"),math.floor(
|
db=db()end;local _c=cb+ (bb/100)* (db-cb)ab.set(self.get("attachedProperty"),math.floor(
|
||||||
_c+0.5))end;local function da(ab)
|
_c+0.5))
|
||||||
|
return self end;local function da(ab)
|
||||||
return
|
return
|
||||||
ab.get("orientation")=="vertical"and ab.get("height")or ab.get("width")end
|
ab.get("orientation")=="vertical"and ab.get("height")or ab.get("width")end
|
||||||
local function _b(ab,bb,cb)
|
local function _b(ab,bb,cb)
|
||||||
@@ -1600,7 +1651,8 @@ bb and(_b.selectedForeground or self.get("selectedForeground"))or(_b.foreground
|
|||||||
self:textFg(1,i,ab:sub(1,ca),db)end end end end;return d end
|
self:textFg(1,i,ab:sub(1,ca),db)end end end end;return d end
|
||||||
project["elements/Tree.lua"] = function(...) local _a=require("elements/VisualElement")local aa=string.sub
|
project["elements/Tree.lua"] = function(...) local _a=require("elements/VisualElement")local aa=string.sub
|
||||||
local ba=setmetatable({},_a)ba.__index=ba
|
local ba=setmetatable({},_a)ba.__index=ba
|
||||||
ba.defineProperty(ba,"nodes",{default={},type="table",canTriggerRender=true})
|
ba.defineProperty(ba,"nodes",{default={},type="table",canTriggerRender=true,setter=function(da,_b)if#_b>0 then
|
||||||
|
da.get("expandedNodes")[_b[1]]=true end;return _b end})
|
||||||
ba.defineProperty(ba,"selectedNode",{default=nil,type="table",canTriggerRender=true})
|
ba.defineProperty(ba,"selectedNode",{default=nil,type="table",canTriggerRender=true})
|
||||||
ba.defineProperty(ba,"expandedNodes",{default={},type="table",canTriggerRender=true})
|
ba.defineProperty(ba,"expandedNodes",{default={},type="table",canTriggerRender=true})
|
||||||
ba.defineProperty(ba,"scrollOffset",{default=0,type="number",canTriggerRender=true})
|
ba.defineProperty(ba,"scrollOffset",{default=0,type="number",canTriggerRender=true})
|
||||||
@@ -1610,9 +1662,7 @@ ba.defineProperty(ba,"selectedColor",{default=colors.lightBlue,type="number"})ba
|
|||||||
ba.defineEvent(ba,"mouse_scroll")
|
ba.defineEvent(ba,"mouse_scroll")
|
||||||
function ba.new()local da=setmetatable({},ba):__init()
|
function ba.new()local da=setmetatable({},ba):__init()
|
||||||
da.set("width",30)da.set("height",10)da.set("z",5)return da end
|
da.set("width",30)da.set("height",10)da.set("z",5)return da end
|
||||||
function ba:init(da,_b)_a.init(self,da,_b)self.set("type","Tree")return self end
|
function ba:init(da,_b)_a.init(self,da,_b)self.set("type","Tree")return self end;function ba:expandNode(da)self.get("expandedNodes")[da]=true
|
||||||
function ba:setNodes(da)self.set("nodes",da)if#da>0 then
|
|
||||||
self.get("expandedNodes")[da[1]]=true end;return self end;function ba:expandNode(da)self.get("expandedNodes")[da]=true
|
|
||||||
self:updateRender()return self end
|
self:updateRender()return self end
|
||||||
function ba:collapseNode(da)self.get("expandedNodes")[da]=
|
function ba:collapseNode(da)self.get("expandedNodes")[da]=
|
||||||
nil;self:updateRender()return self end;function ba:toggleNode(da)if self.get("expandedNodes")[da]then
|
nil;self:updateRender()return self end;function ba:toggleNode(da)if self.get("expandedNodes")[da]then
|
||||||
@@ -1688,7 +1738,7 @@ local ac=self.get("cursorY")local bc=self.get("scrollX")local cc=self.get("scrol
|
|||||||
local dc=self.get("width")local _d=self.get("height")
|
local dc=self.get("width")local _d=self.get("height")
|
||||||
if _c-bc>dc then
|
if _c-bc>dc then
|
||||||
self.set("scrollX",_c-dc)elseif _c-bc<1 then self.set("scrollX",_c-1)end;if ac-cc>_d then self.set("scrollY",ac-_d)elseif ac-cc<1 then
|
self.set("scrollX",_c-dc)elseif _c-bc<1 then self.set("scrollX",_c-1)end;if ac-cc>_d then self.set("scrollY",ac-_d)elseif ac-cc<1 then
|
||||||
self.set("scrollY",ac-1)end end
|
self.set("scrollY",ac-1)end;return self end
|
||||||
function _b:char(_c)if
|
function _b:char(_c)if
|
||||||
not self.get("editable")or not self.get("focused")then return false end;ab(self,_c)return true end
|
not self.get("editable")or not self.get("focused")then return false end;ab(self,_c)return true end
|
||||||
function _b:key(_c)if
|
function _b:key(_c)if
|
||||||
|
|||||||
215
src/LuaLS.lua
215
src/LuaLS.lua
@@ -374,6 +374,14 @@ function Container:addFrame()
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Adds a new Image to the container
|
||||||
|
---@generic Element: Container
|
||||||
|
---@param self Element
|
||||||
|
---@return Image
|
||||||
|
function Container:addImage()
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
--- Adds a new Input to the container
|
--- Adds a new Input to the container
|
||||||
---@generic Element: Container
|
---@generic Element: Container
|
||||||
---@param self Element
|
---@param self Element
|
||||||
@@ -551,6 +559,166 @@ function Dropdown:setDropSymbol(dropSymbol)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
---@class Flexbox
|
||||||
|
---@field flexDirection string
|
||||||
|
---@field flexSpacing number
|
||||||
|
---@field flexJustifyContent string
|
||||||
|
---@field flexWrap boolean
|
||||||
|
---@field flexUpdateLayout boolean
|
||||||
|
local Flexbox = {}
|
||||||
|
|
||||||
|
--- Gets the The direction of the flexbox layout "row" or "column"
|
||||||
|
---@generic Element: Flexbox
|
||||||
|
---@param self Element
|
||||||
|
---@return string
|
||||||
|
function Flexbox:getFlexDirection()
|
||||||
|
return self.flexDirection
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Sets the The direction of the flexbox layout "row" or "column"
|
||||||
|
---@generic Element: Flexbox
|
||||||
|
---@param self Element
|
||||||
|
---@param flexDirection string
|
||||||
|
---@return Element
|
||||||
|
function Flexbox:setFlexDirection(flexDirection)
|
||||||
|
self.flexDirection = flexDirection
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Gets the The spacing between flex items
|
||||||
|
---@generic Element: Flexbox
|
||||||
|
---@param self Element
|
||||||
|
---@return number
|
||||||
|
function Flexbox:getFlexSpacing()
|
||||||
|
return self.flexSpacing
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Sets the The spacing between flex items
|
||||||
|
---@generic Element: Flexbox
|
||||||
|
---@param self Element
|
||||||
|
---@param flexSpacing number
|
||||||
|
---@return Element
|
||||||
|
function Flexbox:setFlexSpacing(flexSpacing)
|
||||||
|
self.flexSpacing = flexSpacing
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Gets the The alignment of flex items along the main axis
|
||||||
|
---@generic Element: Flexbox
|
||||||
|
---@param self Element
|
||||||
|
---@return string
|
||||||
|
function Flexbox:getFlexJustifyContent()
|
||||||
|
return self.flexJustifyContent
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Sets the The alignment of flex items along the main axis
|
||||||
|
---@generic Element: Flexbox
|
||||||
|
---@param self Element
|
||||||
|
---@param flexJustifyContent string
|
||||||
|
---@return Element
|
||||||
|
function Flexbox:setFlexJustifyContent(flexJustifyContent)
|
||||||
|
self.flexJustifyContent = flexJustifyContent
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Gets the Whether to wrap flex items onto multiple lines
|
||||||
|
---@generic Element: Flexbox
|
||||||
|
---@param self Element
|
||||||
|
---@return boolean
|
||||||
|
function Flexbox:getFlexWrap()
|
||||||
|
return self.flexWrap
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Sets the Whether to wrap flex items onto multiple lines
|
||||||
|
---@generic Element: Flexbox
|
||||||
|
---@param self Element
|
||||||
|
---@param flexWrap boolean
|
||||||
|
---@return Element
|
||||||
|
function Flexbox:setFlexWrap(flexWrap)
|
||||||
|
self.flexWrap = flexWrap
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Gets the Whether to update the layout of the flexbox
|
||||||
|
---@generic Element: Flexbox
|
||||||
|
---@param self Element
|
||||||
|
---@return boolean
|
||||||
|
function Flexbox:getFlexUpdateLayout()
|
||||||
|
return self.flexUpdateLayout
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Sets the Whether to update the layout of the flexbox
|
||||||
|
---@generic Element: Flexbox
|
||||||
|
---@param self Element
|
||||||
|
---@param flexUpdateLayout boolean
|
||||||
|
---@return Element
|
||||||
|
function Flexbox:setFlexUpdateLayout(flexUpdateLayout)
|
||||||
|
self.flexUpdateLayout = flexUpdateLayout
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
---@class Image
|
||||||
|
---@field bimg table
|
||||||
|
---@field currentFrame number
|
||||||
|
---@field metadata table
|
||||||
|
local Image = {}
|
||||||
|
|
||||||
|
--- Gets the The bimg image data
|
||||||
|
---@generic Element: Image
|
||||||
|
---@param self Element
|
||||||
|
---@return table
|
||||||
|
function Image:getBimg()
|
||||||
|
return self.bimg
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Sets the The bimg image data
|
||||||
|
---@generic Element: Image
|
||||||
|
---@param self Element
|
||||||
|
---@param bimg table
|
||||||
|
---@return Element
|
||||||
|
function Image:setBimg(bimg)
|
||||||
|
self.bimg = bimg
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Gets the Current animation frame
|
||||||
|
---@generic Element: Image
|
||||||
|
---@param self Element
|
||||||
|
---@return number
|
||||||
|
function Image:getCurrentFrame()
|
||||||
|
return self.currentFrame
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Sets the Current animation frame
|
||||||
|
---@generic Element: Image
|
||||||
|
---@param self Element
|
||||||
|
---@param currentFrame number
|
||||||
|
---@return Element
|
||||||
|
function Image:setCurrentFrame(currentFrame)
|
||||||
|
self.currentFrame = currentFrame
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Gets the Image metadata (version, palette, etc)
|
||||||
|
---@generic Element: Image
|
||||||
|
---@param self Element
|
||||||
|
---@return table
|
||||||
|
function Image:getMetadata()
|
||||||
|
return self.metadata
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Sets the Image metadata (version, palette, etc)
|
||||||
|
---@generic Element: Image
|
||||||
|
---@param self Element
|
||||||
|
---@param metadata table
|
||||||
|
---@return Element
|
||||||
|
function Image:setMetadata(metadata)
|
||||||
|
self.metadata = metadata
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
---@class Input
|
---@class Input
|
||||||
---@field text string
|
---@field text string
|
||||||
---@field cursorPos number
|
---@field cursorPos number
|
||||||
@@ -1923,16 +2091,16 @@ function VisualElement:setIgnoreOffset(ignoreOffset)
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
--- {button number, x number, y number} Fired on mouse click
|
--- {button, x, y} Fired on mouse click
|
||||||
---@generic Element: VisualElement
|
---@generic Element: VisualElement
|
||||||
---@param self Element
|
---@param self Element
|
||||||
---@param callback function
|
---@param callback function
|
||||||
---@return Element
|
---@return Element
|
||||||
function VisualElement:onOnMouseClick(callback)
|
function VisualElement:onOnClick(callback)
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
--- {button number, x number, y number} Fired on mouse button release
|
--- {button, x, y} Fired on mouse button release
|
||||||
---@generic Element: VisualElement
|
---@generic Element: VisualElement
|
||||||
---@param self Element
|
---@param self Element
|
||||||
---@param callback function
|
---@param callback function
|
||||||
@@ -1941,21 +2109,48 @@ function VisualElement:onOnMouseUp(callback)
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
--- {button number, x number, y number} Fired when mouse leaves while clicked
|
--- {button, x, y} Fired when mouse leaves while clicked
|
||||||
---@generic Element: VisualElement
|
---@generic Element: VisualElement
|
||||||
---@param self Element
|
---@param self Element
|
||||||
---@param callback function
|
---@param callback function
|
||||||
---@return Element
|
---@return Element
|
||||||
function VisualElement:onOnMouseRelease(callback)
|
function VisualElement:onOnRelease(callback)
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
--- {button number, x number, y number} Fired when mouse moves while clicked
|
--- {button, x, y} Fired when mouse moves while clicked
|
||||||
---@generic Element: VisualElement
|
---@generic Element: VisualElement
|
||||||
---@param self Element
|
---@param self Element
|
||||||
---@param callback function
|
---@param callback function
|
||||||
---@return Element
|
---@return Element
|
||||||
function VisualElement:onOnMouseDrag(callback)
|
function VisualElement:onOnDrag(callback)
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
--- {direction, x, y} Fired on mouse scroll
|
||||||
|
---@generic Element: VisualElement
|
||||||
|
---@param self Element
|
||||||
|
---@param callback function
|
||||||
|
---@return Element
|
||||||
|
function VisualElement:onOnScroll(callback)
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
--- {-} Fired when mouse enters element
|
||||||
|
---@generic Element: VisualElement
|
||||||
|
---@param self Element
|
||||||
|
---@param callback function
|
||||||
|
---@return Element
|
||||||
|
function VisualElement:onOnEnter(callback)
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
--- {-} Fired when mouse leaves element
|
||||||
|
---@generic Element: VisualElement
|
||||||
|
---@param self Element
|
||||||
|
---@param callback function
|
||||||
|
---@return Element
|
||||||
|
function VisualElement:onOnLeave(callback)
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -1977,7 +2172,7 @@ function VisualElement:onOnBlur(callback)
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
--- {key number, code number, isRepeat boolean} Fired on key press
|
--- {key} Fired on key press
|
||||||
---@generic Element: VisualElement
|
---@generic Element: VisualElement
|
||||||
---@param self Element
|
---@param self Element
|
||||||
---@param callback function
|
---@param callback function
|
||||||
@@ -1986,7 +2181,7 @@ function VisualElement:onOnKey(callback)
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
--- {key number, code number} Fired on key release
|
--- {key} Fired on key release
|
||||||
---@generic Element: VisualElement
|
---@generic Element: VisualElement
|
||||||
---@param self Element
|
---@param self Element
|
||||||
---@param callback function
|
---@param callback function
|
||||||
@@ -1995,7 +2190,7 @@ function VisualElement:onOnKeyUp(callback)
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
--- {char string} Fired on character input
|
--- {char} Fired on character input
|
||||||
---@generic Element: VisualElement
|
---@generic Element: VisualElement
|
||||||
---@param self Element
|
---@param self Element
|
||||||
---@param callback function
|
---@param callback function
|
||||||
|
|||||||
Reference in New Issue
Block a user