Merge branch 'main' of https://github.com/Pyroxenium/Basalt2
This commit is contained in:
6001
BasaltLS.lua
6001
BasaltLS.lua
File diff suppressed because it is too large
Load Diff
610
config.lua
610
config.lua
@@ -1,413 +1,413 @@
|
||||
return {
|
||||
["metadata"] = {
|
||||
["generated"] = "Sat Apr 19 04:19:26 2025",
|
||||
["version"] = "2.0",
|
||||
},
|
||||
["categories"] = {
|
||||
["libraries"] = {
|
||||
["description"] = "Libraries",
|
||||
["files"] = {
|
||||
["colorHex"] = {
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "libraries/colorHex.lua",
|
||||
["description"] = "",
|
||||
["default"] = true,
|
||||
["size"] = 132,
|
||||
},
|
||||
["utils"] = {
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "libraries/utils.lua",
|
||||
["description"] = "",
|
||||
["default"] = true,
|
||||
["size"] = 2661,
|
||||
},
|
||||
["expect"] = {
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "libraries/expect.lua",
|
||||
["description"] = "",
|
||||
["default"] = true,
|
||||
["size"] = 846,
|
||||
},
|
||||
},
|
||||
},
|
||||
["plugins"] = {
|
||||
["description"] = "Plugins",
|
||||
["files"] = {
|
||||
["state"] = {
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["path"] = "plugins/state.lua",
|
||||
["size"] = 6896,
|
||||
["requires"] = {
|
||||
[1] = "Container",
|
||||
},
|
||||
},
|
||||
["xml"] = {
|
||||
["requires"] = {
|
||||
},
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["path"] = "plugins/xml.lua",
|
||||
["description"] = "",
|
||||
["default"] = true,
|
||||
["size"] = 9901,
|
||||
},
|
||||
["benchmark"] = {
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["path"] = "plugins/benchmark.lua",
|
||||
["description"] = "",
|
||||
["default"] = true,
|
||||
["size"] = 12581,
|
||||
},
|
||||
["theme"] = {
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "plugins/theme.lua",
|
||||
["description"] = "",
|
||||
["default"] = true,
|
||||
["size"] = 7166,
|
||||
},
|
||||
["debug"] = {
|
||||
["requires"] = {
|
||||
},
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["path"] = "plugins/debug.lua",
|
||||
["description"] = "",
|
||||
["default"] = true,
|
||||
["size"] = 6250,
|
||||
},
|
||||
["reactive"] = {
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "plugins/reactive.lua",
|
||||
["description"] = "",
|
||||
["default"] = true,
|
||||
["size"] = 7193,
|
||||
},
|
||||
["canvas"] = {
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "plugins/canvas.lua",
|
||||
["description"] = "",
|
||||
["default"] = true,
|
||||
["size"] = 7873,
|
||||
},
|
||||
["state"] = {
|
||||
["requires"] = {
|
||||
[1] = "Container",
|
||||
},
|
||||
["path"] = "plugins/state.lua",
|
||||
["description"] = "",
|
||||
["default"] = true,
|
||||
["size"] = 6896,
|
||||
},
|
||||
["animation"] = {
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["path"] = "plugins/animation.lua",
|
||||
["size"] = 14731,
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "plugins/animation.lua",
|
||||
["description"] = "",
|
||||
},
|
||||
["canvas"] = {
|
||||
["default"] = true,
|
||||
["size"] = 14731,
|
||||
["description"] = "",
|
||||
["path"] = "plugins/canvas.lua",
|
||||
["size"] = 7873,
|
||||
["requires"] = {
|
||||
},
|
||||
},
|
||||
["theme"] = {
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["path"] = "plugins/theme.lua",
|
||||
["size"] = 7166,
|
||||
["requires"] = {
|
||||
},
|
||||
},
|
||||
["reactive"] = {
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["path"] = "plugins/reactive.lua",
|
||||
["size"] = 7193,
|
||||
["requires"] = {
|
||||
},
|
||||
},
|
||||
["benchmark"] = {
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["path"] = "plugins/benchmark.lua",
|
||||
["size"] = 12581,
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
},
|
||||
},
|
||||
["description"] = "Plugins",
|
||||
},
|
||||
["elements"] = {
|
||||
["description"] = "UI Elements",
|
||||
["files"] = {
|
||||
["Flexbox"] = {
|
||||
["requires"] = {
|
||||
[1] = "Container",
|
||||
},
|
||||
["path"] = "elements/Flexbox.lua",
|
||||
["description"] = "A flexbox container that arranges its children in a flexible layout.",
|
||||
["default"] = true,
|
||||
["size"] = 12215,
|
||||
},
|
||||
["Input"] = {
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["path"] = "elements/Input.lua",
|
||||
["description"] = "A text input field with various features",
|
||||
["default"] = true,
|
||||
["size"] = 8876,
|
||||
},
|
||||
["Menu"] = {
|
||||
["requires"] = {
|
||||
[1] = "List",
|
||||
},
|
||||
["path"] = "elements/Menu.lua",
|
||||
["description"] = "A horizontal menu bar with selectable items.",
|
||||
["default"] = true,
|
||||
["size"] = 4679,
|
||||
},
|
||||
["Scrollbar"] = {
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["path"] = "elements/Scrollbar.lua",
|
||||
["description"] = "",
|
||||
["default"] = true,
|
||||
["size"] = 9191,
|
||||
},
|
||||
["Slider"] = {
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["path"] = "elements/Slider.lua",
|
||||
["size"] = 4700,
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["path"] = "elements/Slider.lua",
|
||||
["description"] = "",
|
||||
["default"] = true,
|
||||
["size"] = 4700,
|
||||
},
|
||||
["LineChart"] = {
|
||||
["BarChart"] = {
|
||||
["default"] = false,
|
||||
["description"] = "",
|
||||
["path"] = "elements/BarChart.lua",
|
||||
["size"] = 3190,
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "elements/LineChart.lua",
|
||||
["description"] = "",
|
||||
["default"] = false,
|
||||
["size"] = 3227,
|
||||
},
|
||||
["TextBox"] = {
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["path"] = "elements/TextBox.lua",
|
||||
["default"] = false,
|
||||
["description"] = "A multi-line text editor component with cursor support and text manipulation features",
|
||||
["default"] = false,
|
||||
["path"] = "elements/TextBox.lua",
|
||||
["size"] = 10929,
|
||||
},
|
||||
["Table"] = {
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["path"] = "elements/Table.lua",
|
||||
["description"] = "",
|
||||
},
|
||||
["Scrollbar"] = {
|
||||
["default"] = true,
|
||||
["size"] = 8680,
|
||||
},
|
||||
["ProgressBar"] = {
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["path"] = "elements/ProgressBar.lua",
|
||||
["description"] = "",
|
||||
["default"] = true,
|
||||
["size"] = 3397,
|
||||
},
|
||||
["Display"] = {
|
||||
["path"] = "elements/Scrollbar.lua",
|
||||
["size"] = 9191,
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["path"] = "elements/Display.lua",
|
||||
["description"] = "The Display is a special element which uses the cc window API which you can use.",
|
||||
["default"] = false,
|
||||
["size"] = 4243,
|
||||
},
|
||||
["BaseFrame"] = {
|
||||
["Frame"] = {
|
||||
["default"] = true,
|
||||
["description"] = "A frame element that serves as a grouping container for other elements.",
|
||||
["path"] = "elements/Frame.lua",
|
||||
["size"] = 4458,
|
||||
["requires"] = {
|
||||
[1] = "Container",
|
||||
},
|
||||
["path"] = "elements/BaseFrame.lua",
|
||||
["description"] = "This is the base frame class. It is the root element of all elements and the only element without a parent.",
|
||||
},
|
||||
["Button"] = {
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["path"] = "elements/Button.lua",
|
||||
["size"] = 1656,
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
},
|
||||
["BigFont"] = {
|
||||
["default"] = false,
|
||||
["description"] = "",
|
||||
["path"] = "elements/BigFont.lua",
|
||||
["size"] = 20951,
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
},
|
||||
["BaseFrame"] = {
|
||||
["default"] = true,
|
||||
["description"] = "This is the base frame class. It is the root element of all elements and the only element without a parent.",
|
||||
["path"] = "elements/BaseFrame.lua",
|
||||
["size"] = 8466,
|
||||
["requires"] = {
|
||||
[1] = "Container",
|
||||
},
|
||||
},
|
||||
["Display"] = {
|
||||
["default"] = false,
|
||||
["description"] = "The Display is a special element which uses the cc window API which you can use.",
|
||||
["path"] = "elements/Display.lua",
|
||||
["size"] = 4243,
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
},
|
||||
["Flexbox"] = {
|
||||
["default"] = true,
|
||||
["description"] = "A flexbox container that arranges its children in a flexible layout.",
|
||||
["path"] = "elements/Flexbox.lua",
|
||||
["size"] = 12215,
|
||||
["requires"] = {
|
||||
[1] = "Container",
|
||||
},
|
||||
},
|
||||
["Dropdown"] = {
|
||||
["default"] = false,
|
||||
["description"] = "A dropdown menu that shows a list of selectable items",
|
||||
["path"] = "elements/Dropdown.lua",
|
||||
["size"] = 6359,
|
||||
["requires"] = {
|
||||
[1] = "List",
|
||||
},
|
||||
["path"] = "elements/Dropdown.lua",
|
||||
["description"] = "A dropdown menu that shows a list of selectable items",
|
||||
},
|
||||
["LineChart"] = {
|
||||
["default"] = false,
|
||||
["size"] = 6359,
|
||||
["description"] = "",
|
||||
["path"] = "elements/LineChart.lua",
|
||||
["size"] = 3227,
|
||||
["requires"] = {
|
||||
},
|
||||
},
|
||||
["BaseElement"] = {
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "elements/BaseElement.lua",
|
||||
["default"] = true,
|
||||
["description"] = "The base class for all UI elements in Basalt.",
|
||||
["default"] = true,
|
||||
["size"] = 9415,
|
||||
},
|
||||
["Graph"] = {
|
||||
["path"] = "elements/BaseElement.lua",
|
||||
["size"] = 9544,
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "elements/Graph.lua",
|
||||
["description"] = "A point based graph element",
|
||||
["default"] = false,
|
||||
["size"] = 6990,
|
||||
},
|
||||
["Tree"] = {
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["path"] = "elements/Tree.lua",
|
||||
["description"] = "",
|
||||
["default"] = true,
|
||||
["size"] = 7941,
|
||||
},
|
||||
["Program"] = {
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["path"] = "elements/Program.lua",
|
||||
["description"] = "",
|
||||
["default"] = true,
|
||||
["size"] = 7733,
|
||||
},
|
||||
["Image"] = {
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["path"] = "elements/Image.lua",
|
||||
["description"] = "An element that displays an image in bimg format",
|
||||
["default"] = false,
|
||||
["size"] = 15125,
|
||||
},
|
||||
["Switch"] = {
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["path"] = "elements/Switch.lua",
|
||||
["description"] = "",
|
||||
["default"] = true,
|
||||
["size"] = 1378,
|
||||
},
|
||||
["Checkbox"] = {
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["path"] = "elements/Checkbox.lua",
|
||||
["description"] = "",
|
||||
["default"] = true,
|
||||
["size"] = 2928,
|
||||
},
|
||||
["Button"] = {
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["path"] = "elements/Button.lua",
|
||||
["description"] = "",
|
||||
},
|
||||
["ProgressBar"] = {
|
||||
["default"] = true,
|
||||
["size"] = 1656,
|
||||
["description"] = "",
|
||||
["path"] = "elements/ProgressBar.lua",
|
||||
["size"] = 3397,
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
},
|
||||
["Switch"] = {
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["path"] = "elements/Switch.lua",
|
||||
["size"] = 1378,
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
},
|
||||
["Tree"] = {
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["path"] = "elements/Tree.lua",
|
||||
["size"] = 7941,
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
},
|
||||
["Menu"] = {
|
||||
["default"] = true,
|
||||
["description"] = "A horizontal menu bar with selectable items.",
|
||||
["path"] = "elements/Menu.lua",
|
||||
["size"] = 4679,
|
||||
["requires"] = {
|
||||
[1] = "List",
|
||||
},
|
||||
},
|
||||
["Table"] = {
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["path"] = "elements/Table.lua",
|
||||
["size"] = 8680,
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
},
|
||||
["List"] = {
|
||||
["default"] = true,
|
||||
["description"] = "A scrollable list of selectable items",
|
||||
["path"] = "elements/List.lua",
|
||||
["size"] = 8702,
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
},
|
||||
["Image"] = {
|
||||
["default"] = false,
|
||||
["description"] = "An element that displays an image in bimg format",
|
||||
["path"] = "elements/Image.lua",
|
||||
["size"] = 15125,
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
},
|
||||
["Label"] = {
|
||||
["default"] = true,
|
||||
["description"] = "A simple text display element that automatically resizes its width based on the text content.",
|
||||
["path"] = "elements/Label.lua",
|
||||
["size"] = 3092,
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
},
|
||||
["Container"] = {
|
||||
["default"] = true,
|
||||
["description"] = "The container class. It is a visual element that can contain other elements. It is the base class for all containers",
|
||||
["path"] = "elements/Container.lua",
|
||||
["size"] = 25104,
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
},
|
||||
["VisualElement"] = {
|
||||
["default"] = true,
|
||||
["description"] = "The Visual Element class which is the base class for all visual UI elements",
|
||||
["path"] = "elements/VisualElement.lua",
|
||||
["size"] = 17775,
|
||||
["requires"] = {
|
||||
[1] = "BaseElement",
|
||||
},
|
||||
["path"] = "elements/VisualElement.lua",
|
||||
["description"] = "The Visual Element class which is the base class for all visual UI elements",
|
||||
["default"] = true,
|
||||
["size"] = 17775,
|
||||
},
|
||||
["Container"] = {
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["path"] = "elements/Container.lua",
|
||||
["description"] = "The container class. It is a visual element that can contain other elements. It is the base class for all containers",
|
||||
["Program"] = {
|
||||
["default"] = true,
|
||||
["size"] = 24818,
|
||||
},
|
||||
["BigFont"] = {
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["path"] = "elements/BigFont.lua",
|
||||
["description"] = "",
|
||||
["default"] = false,
|
||||
["size"] = 20951,
|
||||
},
|
||||
["Label"] = {
|
||||
["path"] = "elements/Program.lua",
|
||||
["size"] = 7733,
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["path"] = "elements/Label.lua",
|
||||
["description"] = "A simple text display element that automatically resizes its width based on the text content.",
|
||||
["default"] = true,
|
||||
["size"] = 3092,
|
||||
},
|
||||
["Frame"] = {
|
||||
["requires"] = {
|
||||
[1] = "Container",
|
||||
},
|
||||
["path"] = "elements/Frame.lua",
|
||||
["description"] = "A frame element that serves as a grouping container for other elements.",
|
||||
["Input"] = {
|
||||
["default"] = true,
|
||||
["size"] = 4458,
|
||||
},
|
||||
["List"] = {
|
||||
["description"] = "A text input field with various features",
|
||||
["path"] = "elements/Input.lua",
|
||||
["size"] = 8876,
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["path"] = "elements/List.lua",
|
||||
["description"] = "A scrollable list of selectable items",
|
||||
["default"] = true,
|
||||
["size"] = 8702,
|
||||
},
|
||||
["BarChart"] = {
|
||||
["Graph"] = {
|
||||
["default"] = false,
|
||||
["description"] = "A point based graph element",
|
||||
["path"] = "elements/Graph.lua",
|
||||
["size"] = 6990,
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "elements/BarChart.lua",
|
||||
["description"] = "",
|
||||
["default"] = false,
|
||||
["size"] = 3190,
|
||||
},
|
||||
},
|
||||
["description"] = "UI Elements",
|
||||
},
|
||||
["core"] = {
|
||||
["description"] = "Core Files",
|
||||
["files"] = {
|
||||
["errorManager"] = {
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "errorManager.lua",
|
||||
["description"] = "",
|
||||
["default"] = true,
|
||||
["size"] = 3789,
|
||||
},
|
||||
["log"] = {
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "log.lua",
|
||||
["description"] = "",
|
||||
["default"] = true,
|
||||
["size"] = 3142,
|
||||
},
|
||||
["propertySystem"] = {
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "propertySystem.lua",
|
||||
["description"] = "",
|
||||
["default"] = true,
|
||||
["size"] = 15523,
|
||||
},
|
||||
["elementManager"] = {
|
||||
["requires"] = {
|
||||
},
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["path"] = "elementManager.lua",
|
||||
["description"] = "",
|
||||
["default"] = true,
|
||||
["size"] = 6297,
|
||||
},
|
||||
["init"] = {
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "init.lua",
|
||||
["description"] = "",
|
||||
["default"] = true,
|
||||
["size"] = 583,
|
||||
},
|
||||
["render"] = {
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "render.lua",
|
||||
["description"] = "",
|
||||
["default"] = true,
|
||||
["size"] = 12422,
|
||||
},
|
||||
["main"] = {
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["path"] = "main.lua",
|
||||
["size"] = 10456,
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "main.lua",
|
||||
["description"] = "",
|
||||
},
|
||||
["propertySystem"] = {
|
||||
["default"] = true,
|
||||
["size"] = 10456,
|
||||
["description"] = "",
|
||||
["path"] = "propertySystem.lua",
|
||||
["size"] = 15524,
|
||||
["requires"] = {
|
||||
},
|
||||
},
|
||||
["errorManager"] = {
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["path"] = "errorManager.lua",
|
||||
["size"] = 3789,
|
||||
["requires"] = {
|
||||
},
|
||||
},
|
||||
["log"] = {
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["path"] = "log.lua",
|
||||
["size"] = 3142,
|
||||
["requires"] = {
|
||||
},
|
||||
},
|
||||
["init"] = {
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["path"] = "init.lua",
|
||||
["size"] = 583,
|
||||
["requires"] = {
|
||||
},
|
||||
},
|
||||
["render"] = {
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["path"] = "render.lua",
|
||||
["size"] = 12422,
|
||||
["requires"] = {
|
||||
},
|
||||
},
|
||||
},
|
||||
["description"] = "Core Files",
|
||||
},
|
||||
["libraries"] = {
|
||||
["files"] = {
|
||||
["expect"] = {
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["path"] = "libraries/expect.lua",
|
||||
["size"] = 846,
|
||||
["requires"] = {
|
||||
},
|
||||
},
|
||||
["colorHex"] = {
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["path"] = "libraries/colorHex.lua",
|
||||
["size"] = 132,
|
||||
["requires"] = {
|
||||
},
|
||||
},
|
||||
["utils"] = {
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["path"] = "libraries/utils.lua",
|
||||
["size"] = 2661,
|
||||
["requires"] = {
|
||||
},
|
||||
},
|
||||
},
|
||||
["description"] = "Libraries",
|
||||
},
|
||||
},
|
||||
["metadata"] = {
|
||||
["generated"] = "Thu Apr 17 06:22:33 2025",
|
||||
["version"] = "2.0",
|
||||
},
|
||||
}
|
||||
@@ -520,7 +520,8 @@ local bd=_d.basalt.create(bc,ad,true,_d)return bd end end end;function db.new()l
|
||||
bc.class=db;return bc end
|
||||
function db:init(bc,cc)
|
||||
ab.init(self,bc,cc)self.set("type","Container")end
|
||||
function db:isChildVisible(bc)if(bc.get("visible")==false)then return false end
|
||||
function db:isChildVisible(bc)if(bc.get("visible")==false)then return false end;if
|
||||
(bc._destroyed)then return false end
|
||||
local cc,dc=self.get("width"),self.get("height")local _d,ad=self.get("offsetX"),self.get("offsetY")
|
||||
local bd,cd=bc.get("x"),bc.get("y")local dd,__a=bc.get("width"),bc.get("height")local a_a;local b_a;if
|
||||
(bc.get("ignoreOffset"))then a_a=bd;b_a=cd else a_a=bd-_d;b_a=cd-ad end;return
|
||||
@@ -565,7 +566,7 @@ function db:unregisterChildEvent(bc,cc)
|
||||
if self._values.childrenEvents[cc]then
|
||||
for dc,_d in
|
||||
ipairs(self._values.childrenEvents[cc])do
|
||||
if _d==bc then
|
||||
if _d.get("id")==bc.get("id")then
|
||||
table.remove(self._values.childrenEvents[cc],dc)self._values.eventListenerCount[cc]=
|
||||
self._values.eventListenerCount[cc]-1
|
||||
if
|
||||
@@ -574,8 +575,11 @@ self._values.childrenEvents[cc]=nil;self._values.eventListenerCount[cc]=nil;if s
|
||||
self.parent:unregisterChildEvent(self,cc)end end;self.set("childrenEventsSorted",false)
|
||||
self:updateRender()break end end end;return self end
|
||||
function db:removeChild(bc)
|
||||
for cc,dc in ipairs(self._values.children)do if dc==bc then
|
||||
table.remove(self._values.children,cc)bc.parent=nil;break end end;self:removeChildrenEvents(bc)self:updateRender()
|
||||
for cc,dc in ipairs(self._values.children)do
|
||||
if
|
||||
dc.get("id")==bc.get("id")then
|
||||
self.basalt.LOGGER.debug("Removing child: "..bc:getType())table.remove(self._values.children,cc)
|
||||
bc.parent=nil;break end end;self:removeChildrenEvents(bc)self:updateRender()
|
||||
self.set("childrenSorted",false)return self end
|
||||
function db:getChild(bc)
|
||||
if type(bc)=="string"then local cc=cb(bc,"/")
|
||||
@@ -673,7 +677,9 @@ self:sortChildrenEvents(bc)end end;for bc,cc in ipairs(self.get("visibleChildren
|
||||
_b.error("CIRCULAR REFERENCE DETECTED!")return end;cc:render()
|
||||
cc:postRender()end end
|
||||
function db:destroy()
|
||||
for bc,cc in ipairs(self._values.children)do cc:destroy()end;ab.destroy(self)return self end;return db end
|
||||
if not self:isType("BaseFrame")then
|
||||
self.set("childrenSorted",false)ab.destroy(self)return self else _b.header="Basalt Error"
|
||||
_b.error("Cannot destroy a BaseFrame.")end end;return db end
|
||||
project["elements/Image.lua"] = function(...) local ba=require("elementManager")
|
||||
local ca=ba.getElement("VisualElement")local da=require("libraries/colorHex")
|
||||
local _b=setmetatable({},ca)_b.__index=_b
|
||||
@@ -1260,65 +1266,67 @@ ca.dispatchEvent(self,cb,...)end;function ab:render()
|
||||
if(self._renderUpdate)then if self._render~=nil then ca.render(self)
|
||||
self._render:render()self._renderUpdate=false end end end
|
||||
return ab end
|
||||
project["elements/BaseElement.lua"] = function(...) local d=require("propertySystem")
|
||||
local _a=require("libraries/utils").uuid;local aa=setmetatable({},d)aa.__index=aa
|
||||
aa.defineProperty(aa,"type",{default={"BaseElement"},type="string",setter=function(ba,ca)if
|
||||
type(ca)=="string"then table.insert(ba._values.type,1,ca)return
|
||||
ba._values.type end;return ca end,getter=function(ba,ca,da)if
|
||||
da~=nil and da<1 then return ba._values.type end;return ba._values.type[
|
||||
da or 1]end})
|
||||
aa.defineProperty(aa,"id",{default="",type="string",readonly=true})
|
||||
aa.defineProperty(aa,"name",{default="",type="string"})
|
||||
aa.defineProperty(aa,"eventCallbacks",{default={},type="table"})
|
||||
function aa.defineEvent(ba,ca,da)
|
||||
if not rawget(ba,'_eventConfigs')then ba._eventConfigs={}end;ba._eventConfigs[ca]={requires=da and da or ca}end
|
||||
function aa.registerEventCallback(ba,ca,...)
|
||||
local da=ca:match("^on")and ca or"on"..ca;local _b={...}local ab=_b[1]
|
||||
ba[da]=function(bb,...)
|
||||
for cb,db in ipairs(_b)do if not bb._registeredEvents[db]then
|
||||
bb:listenEvent(db,true)end end;bb:registerCallback(ab,...)return bb end end;function aa.new()local ba=setmetatable({},aa):__init()
|
||||
ba.class=aa;return ba end
|
||||
function aa:init(ba,ca)
|
||||
if self._initialized then return self end;self._initialized=true;self._props=ba;self._values.id=_a()
|
||||
self.basalt=ca;self._registeredEvents={}local da=getmetatable(self).__index
|
||||
local _b={}da=self.class
|
||||
while da do
|
||||
if type(da)=="table"and da._eventConfigs then for ab,bb in
|
||||
pairs(da._eventConfigs)do if not _b[ab]then _b[ab]=bb end end end
|
||||
da=getmetatable(da)and getmetatable(da).__index end
|
||||
for ab,bb in pairs(_b)do self._registeredEvents[bb.requires]=true end;if self._callbacks then
|
||||
for ab,bb in pairs(self._callbacks)do self[bb]=function(cb,...)
|
||||
cb:registerCallback(ab,...)return cb end end end
|
||||
project["elements/BaseElement.lua"] = function(...) local _a=require("propertySystem")
|
||||
local aa=require("libraries/utils").uuid;local ba=require("errorManager")local ca=setmetatable({},_a)
|
||||
ca.__index=ca
|
||||
ca.defineProperty(ca,"type",{default={"BaseElement"},type="string",setter=function(da,_b)if type(_b)=="string"then
|
||||
table.insert(da._values.type,1,_b)return da._values.type end;return _b end,getter=function(da,_b,ab)if
|
||||
ab~=nil and ab<1 then return da._values.type end;return da._values.type[
|
||||
ab or 1]end})
|
||||
ca.defineProperty(ca,"id",{default="",type="string",readonly=true})
|
||||
ca.defineProperty(ca,"name",{default="",type="string"})
|
||||
ca.defineProperty(ca,"eventCallbacks",{default={},type="table"})
|
||||
function ca.defineEvent(da,_b,ab)
|
||||
if not rawget(da,'_eventConfigs')then da._eventConfigs={}end;da._eventConfigs[_b]={requires=ab and ab or _b}end
|
||||
function ca.registerEventCallback(da,_b,...)
|
||||
local ab=_b:match("^on")and _b or"on".._b;local bb={...}local cb=bb[1]
|
||||
da[ab]=function(db,...)
|
||||
for _c,ac in ipairs(bb)do if not db._registeredEvents[ac]then
|
||||
db:listenEvent(ac,true)end end;db:registerCallback(cb,...)return db end end;function ca.new()local da=setmetatable({},ca):__init()
|
||||
da.class=ca;return da end
|
||||
function ca:init(da,_b)
|
||||
if self._initialized then return self end;self._initialized=true;self._props=da;self._values.id=aa()
|
||||
self.basalt=_b;self._registeredEvents={}local ab=getmetatable(self).__index
|
||||
local bb={}ab=self.class
|
||||
while ab do
|
||||
if type(ab)=="table"and ab._eventConfigs then for cb,db in
|
||||
pairs(ab._eventConfigs)do if not bb[cb]then bb[cb]=db end end end
|
||||
ab=getmetatable(ab)and getmetatable(ab).__index end
|
||||
for cb,db in pairs(bb)do self._registeredEvents[db.requires]=true end;if self._callbacks then
|
||||
for cb,db in pairs(self._callbacks)do self[db]=function(_c,...)
|
||||
_c:registerCallback(cb,...)return _c end end end
|
||||
return self end
|
||||
function aa:postInit()if self._postInitialized then return self end
|
||||
function ca:postInit()if self._postInitialized then return self end
|
||||
self._postInitialized=true;if(self._props)then
|
||||
for ba,ca in pairs(self._props)do self.set(ba,ca)end end;self._props=nil;return self end;function aa:isType(ba)
|
||||
for ca,da in ipairs(self._values.type)do if da==ba then return true end end;return false end
|
||||
function aa:listenEvent(ba,ca)ca=
|
||||
ca~=false
|
||||
for da,_b in pairs(self._props)do self.set(da,_b)end end;self._props=nil;return self end;function ca:isType(da)
|
||||
for _b,ab in ipairs(self._values.type)do if ab==da then return true end end;return false end
|
||||
function ca:listenEvent(da,_b)_b=
|
||||
_b~=false
|
||||
if
|
||||
ca~= (self._registeredEvents[ba]or false)then
|
||||
if ca then self._registeredEvents[ba]=true;if self.parent then
|
||||
self.parent:registerChildEvent(self,ba)end else self._registeredEvents[ba]=nil
|
||||
_b~= (self._registeredEvents[da]or false)then
|
||||
if _b then self._registeredEvents[da]=true;if self.parent then
|
||||
self.parent:registerChildEvent(self,da)end else self._registeredEvents[da]=nil
|
||||
if
|
||||
self.parent then self.parent:unregisterChildEvent(self,ba)end end end;return self end
|
||||
function aa:registerCallback(ba,ca)if not self._registeredEvents[ba]then
|
||||
self:listenEvent(ba,true)end
|
||||
self.parent then self.parent:unregisterChildEvent(self,da)end end end;return self end
|
||||
function ca:registerCallback(da,_b)if not self._registeredEvents[da]then
|
||||
self:listenEvent(da,true)end
|
||||
if
|
||||
not self._values.eventCallbacks[ba]then self._values.eventCallbacks[ba]={}end
|
||||
table.insert(self._values.eventCallbacks[ba],ca)return self end
|
||||
function aa:fireEvent(ba,...)
|
||||
if self.get("eventCallbacks")[ba]then for ca,da in
|
||||
ipairs(self.get("eventCallbacks")[ba])do local _b=da(self,...)return _b end end;return self end;function aa:dispatchEvent(ba,...)if self[ba]then return self[ba](self,...)end;return
|
||||
self:handleEvent(ba,...)end;function aa:handleEvent(ba,...)return
|
||||
not self._values.eventCallbacks[da]then self._values.eventCallbacks[da]={}end
|
||||
table.insert(self._values.eventCallbacks[da],_b)return self end
|
||||
function ca:fireEvent(da,...)
|
||||
if self.get("eventCallbacks")[da]then for _b,ab in
|
||||
ipairs(self.get("eventCallbacks")[da])do local bb=ab(self,...)return bb end end;return self end;function ca:dispatchEvent(da,...)if self[da]then return self[da](self,...)end;return
|
||||
self:handleEvent(da,...)end;function ca:handleEvent(da,...)return
|
||||
false end
|
||||
function aa:onChange(ba,ca)self:observe(ba,ca)return self end;function aa:getBaseFrame()
|
||||
if self.parent then return self.parent:getBaseFrame()end;return self end;function aa:destroy()for ba in
|
||||
pairs(self._registeredEvents)do self:listenEvent(ba,false)end
|
||||
function ca:onChange(da,_b)self:observe(da,_b)return self end;function ca:getBaseFrame()
|
||||
if self.parent then return self.parent:getBaseFrame()end;return self end
|
||||
function ca:destroy()
|
||||
self._destroyed=true;self:removeAllObservers()self:setFocused(false)for da in
|
||||
pairs(self._registeredEvents)do self:listenEvent(da,false)end
|
||||
if
|
||||
(self.parent)then self.parent:removeChild(self)end end;function aa:updateRender()
|
||||
if
|
||||
(self.parent)then self.parent:updateRender()else self._renderUpdate=true end;return self end;return aa end
|
||||
(self.parent)then self.parent:removeChild(self)end end
|
||||
function ca:updateRender()if(self.parent)then self.parent:updateRender()else
|
||||
self._renderUpdate=true end;return self end;return ca end
|
||||
project["elements/Graph.lua"] = function(...) local _a=require("elementManager")
|
||||
local aa=_a.getElement("VisualElement")local ba=require("libraries/colorHex")
|
||||
local ca=setmetatable({},aa)ca.__index=ca
|
||||
|
||||
Reference in New Issue
Block a user