@luminocity/lemonate-engine 26.3.3 → 26.3.4

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.
@@ -41307,7 +41307,7 @@
41307
41307
  }
41308
41308
  }
41309
41309
 
41310
- var engine$1 = "26.3.3";
41310
+ var engine$1 = "26.3.4";
41311
41311
  var bullet = "3.26";
41312
41312
  var lua = "5.4.3";
41313
41313
  var packageVersionInfo = {
@@ -130937,7 +130937,7 @@
130937
130937
 
130938
130938
  var lua_api_events = "\nlocal _internal = require('engine/_internal');\nlocal msgpack = require('engine/msgpack');\nlocal handle = require('engine/handle');\nlocal unpack = msgpack.unpack\n\n--- @module events\nlocal events = {}\nlocal listeners = {}\nlocal listenerIndex = 1\n\n---Start listening to events of a certain type. This method will take an event type and a function to call if the\n---event is triggered.\n---@param eventtype string Type of the event. See possible types of events below\n---@param func function function to call\nfunction events.on(eventtype, func)\n if type(func) == 'function' then\n local id = listenerIndex\n local listener = { id=id, func=func, eventtype=eventtype, once=false }\n listeners[id] = listener\n listenerIndex = listenerIndex + 1\n _internal.sendMessage('events.on', { eventtype=eventtype, id=id })\n else\n error(\"func parameter needs to be a function\")\n end\nend\n\n---Listen to the next event of a certain type. After the event is triggered once, the event listener will automatically\n---deactivate again. This method will take an event type and a function to call if the event is triggered.\n---@param eventtype string Type of the event. See possible types of events below\n---@param func function function to call\nfunction events.once(eventtype, func)\n if type(func) == 'function' then\n local id = listenerIndex\n local listener = { id=id, func=func, eventtype=eventtype, once=true }\n listeners[id] = listener\n listenerIndex = listenerIndex + 1\n _internal.sendMessage('events.once', { eventtype=eventtype, id=id })\n else\n error(\"func parameter needs to be a function\")\n end\nend\n\n---Stop listening to events of a certain type. Clears all events of the given type for this script entity.\n---@param eventtype string Type of the event\nfunction events.off(eventtype)\n local keys_to_remove = {}\n for id, listener in pairs(listeners) do\n if listener.eventtype == eventtype then\n table.insert(keys_to_remove, id)\n end\n end\n\n for _, id in ipairs(keys_to_remove) do\n listeners[id] = nil\n end\n\n _internal.sendMessage('events.off', { eventtype=eventtype })\nend\n\nfunction events.emitExternal(eventtype, value)\n _internal.sendMessage('events.emitExternal', { eventtype=eventtype, value=value })\nend\n\nfunction events._translate(e)\n e = unpack(e)\n\n --- Translate handles to an actual object\n if type(e.event.handle) == 'table' then\n local object = handle.createObject(e.event.handle)\n if object == nil then\n error(\"events._translate(): Cannot translate handle to object, because it is invalid!\")\n end\n e.event.object = object\n e.event.handle = nil\n end\n\n return e;\nend\n\nfunction events._processIncoming(e)\n\n --- Translate handles to an actual object\n if type(e.event.handle) == 'table' then\n local object = handle.createObject(e.event.handle)\n if object == nil then\n error(\"events._processIncoming(): Cannot translate handle to object, because it is invalid!\")\n end\n e.event.object = handle.createObject(e.event.handle)\n e.event.handle = nil\n end\n\n local listener = listeners[e.listenerId]\n if listener then\n listener.func(e.event)\n end\nend\n\nreturn events\n";
130939
130939
 
130940
- var lua_api_handle = "\nlocal handle = {}\n\nlocal objectCache = {}\n\nfunction handle.createObject(h)\n if h == nil then\n return nil\n end\n if h and h._isHandle then\n if objectCache[h.id] then\n return objectCache[h.id]\n end\n local path = 'engine/' .. h.basetype .. 's/' .. h.type\n local Type = require(path)\n if not Type then\n print(\"handle.createObject(): Type not found!\", path)\n return nil\n end\n if type(Type.new) == 'function' then\n local obj = Type.new(h.id, h.nodeId)\n objectCache[h.id] = obj\n return obj\n else\n print(\"handle.createObject(): Type found but fromHandle function is missing!\", path)\n printDump(Type)\n return nil\n end\n else\n print(debug.traceback())\n print(\"handle.createObject(): Not a valid handle!\", h)\n return nil\n end\nend\n\nfunction handle.invalidate(id)\n if id and objectCache[id] then\n objectCache[id] = nil\n end\nend\n\nreturn handle\n";
130940
+ var lua_api_handle = "\nlocal handle = {}\n\n--local objectCache = {}\n\nfunction handle.createObject(h)\n if h == nil then\n return nil\n end\n if h and h._isHandle then\n --if objectCache[h.id] then\n -- return objectCache[h.id]\n --end\n local path = 'engine/' .. h.basetype .. 's/' .. h.type\n local Type = require(path)\n if not Type then\n print(\"handle.createObject(): Type not found!\", path)\n return nil\n end\n if type(Type.new) == 'function' then\n local obj = Type.new(h.id, h.nodeId)\n --objectCache[h.id] = obj\n return obj\n else\n print(\"handle.createObject(): Type found but fromHandle function is missing!\", path)\n printDump(Type)\n return nil\n end\n else\n print(debug.traceback())\n print(\"handle.createObject(): Not a valid handle!\", h)\n return nil\n end\nend\n\nfunction handle.invalidate(id)\n --if id and objectCache[id] then\n -- objectCache[id] = nil\n --end\nend\n\nreturn handle\n";
130941
130941
 
130942
130942
  var lua_api_imgui = "\nlocal _internal = require('engine/_internal');\n\n--- @module ImGui\nlocal ImGui = {}\n\n--- Enumeration of the available backend flags.\n--- @enum BackendFlags\n--- @field None number No flag set.\n--- @field HasGamepad number Backend platform supports gamepad and currently has one connected.\n--- @field HasMouseCursors number Backend platform supports honoring GetMouseCursor() value to change the OS cursor shape.\n--- @field HasSetMousePos number Backend platform supports io.WantSetMousePos requests to reposition the OS mouse position (only used if ImGuiConfigFlags_NavEnableSetMousePos is set).\n--- @field RendererHasVtxOffset number Backend renderer supports ImDrawCmd::VtxOffset. This enables output of large meshes (64K+ vertices) while still using 16-bit indices.\nImGui.BackendFlags = {\n None = 0,\n HasGamepad = 1 << 0,\n HasMouseCursors = 1 << 1,\n HasSetMousePos = 1 << 2,\n RendererHasVtxOffset = 1 << 3\n}\n\n--- Enumeration of the available configuration flags.\n--- @enum ConfigFlags\n--- @field None number No flag set.\n--- @field NavEnableKeyboard number Enable keyboard controls.\n--- @field NavEnableGamepad number Enable gamepad controls.\n--- @field NavEnableSetMousePos number Enable mouse repositioning requests with io.WantSetMousePos.\n--- @field NavNoCaptureKeyboard number Disable keyboard capture by ImGui.\n--- @field NoMouse number Disable mouse controls.\n--- @field NoMouseCursorChange number Disable mouse cursor change requests.\n--- @field IsSRGB number Enable sRGB gamma correction.\n--- @field IsTouchScreen number Enable touch screen controls.\nImGui.ConfigFlags = {\n None = 0,\n NavEnableKeyboard = 1 << 0,\n NavEnableGamepad = 1 << 1,\n NavEnableSetMousePos = 1 << 2,\n NavNoCaptureKeyboard = 1 << 3,\n NoMouse = 1 << 4,\n NoMouseCursorChange = 1 << 5,\n IsSRGB = 1 << 20,\n IsTouchScreen = 1 << 21\n}\n\n--- Sets the global window padding for all windows.\n--- @param x number Padding for the x-axis.\n--- @param y number Padding for the y-axis.\nfunction ImGui.setGlobalWindowPadding(x, y)\n _internal.sendMessage('imgui.setGlobalWindowPadding', { x=x, y=y })\nend\n\n--- Sets the global window rounding for all windows.\n--- @param r number Rounding value.\nfunction ImGui.setGlobalWindowRounding(r)\n _internal.sendMessage('imgui.setGlobalWindowRounding', { r=r })\nend\n\n--- Sets the global frame padding for all windows.\n--- @param x float Padding for the x-axis.\n--- @param y float Padding for the y-axis.\nfunction ImGui.setGlobalFramePadding(x, y)\n _internal.sendMessage('imgui.setGlobalFramePadding', { x=x, y=y })\nend\n\n--- Sets the global frame rounding for all windows.\n--- @param r number Rounding value.\nfunction ImGui.setGlobalFrameRounding(r)\n _internal.sendMessage('imgui.setGlobalFrameRounding', { r=r })\nend\n\n--- Sets the global item spacing for all windows.\n--- @param x number Spacing for the x-axis.\n--- @param y number Spacing for the y-axis.\nfunction ImGui.setGlobalItemSpacing(x, y)\n _internal.sendMessage('imgui.setGlobalItemSpacing', { x=x, y=y })\nend\n\n--- Sets the global item inner spacing for all windows.\n--- @param x number Inner spacing for the x-axis.\n--- @param y number Inner spacing for the y-axis.\nfunction ImGui.setGlobalItemInnerSpacing(x, y)\n _internal.sendMessage('imgui.setGlobalItemInnerSpacing', { x=x, y=y })\nend\n\n--- Sets the global indent spacing for all windows.\n--- @param value number Indent spacing value.\nfunction ImGui.setGlobalIndentSpacing(value)\n _internal.sendMessage('imgui.setGlobalIndentSpacing', { value=value })\nend\n\n--- Sets the global scrollbar size for all windows.\n--- @param value number Scrollbar size value.\nfunction ImGui.setGlobalScrollbarSize(value)\n _internal.sendMessage('imgui.setGlobalScrollbarSize', { value=value })\nend\n\n--- Sets the global scrollbar rounding for all windows.\n--- @param value number The value of the scrollbar rounding.\nfunction ImGui.setGlobalScrollbarRounding(value)\n _internal.sendMessage('imgui.setGlobalScrollbarRounding', { value=value })\nend\n\n--- Sets the global minimum width/height of a grab box for slider/scrollbar for all windows.\n--- @param value number The value of the minimum grab.\nfunction ImGui.setGlobalGrabMinSize(value)\n _internal.sendMessage('imgui.setGlobalGrabMinSize', { value=value })\nend\n\n--- Sets the global radius of grabs corners rounding for all windows. Set to 0.0 to have rectangular slider grabs.\n--- @param value number The value of grabs corners rounding.\nfunction ImGui.setGlobalGrabRounding(value)\n _internal.sendMessage('imgui.setGlobalGrabRounding', { value=value })\nend\n\n--- Enumeration of the available window flags.\n--- @enum WindowFlags\n--- @field None number No flag set.\n--- @field NoTitleBar number Window doesn't have a title bar.\n--- @field NoResize number Window can't be resized.\n--- @field NoMove number Window can't be moved.\n--- @field NoScrollbar number Window has no scrollbar.\n--- @field NoScrollWithMouse number Window scrollbar doesn't respond to mouse scrolling.\n--- @field NoCollapse number Window can't be collapsed.\n--- @field AlwaysAutoResize number Window should resize to its content every frame.\n--- @field ShowBorders number Window has borders.\n--- @field NoSavedSettings number Never save settings (inodependent of ImGuiConfigFlags_NoSaveSettings).\n--- @field NoMouseInputs number Window will not receive mouse inputs.\n--- @field MenuBar number Window has a menu-bar.\n--- @field HorizontalScrollbar number Window has a horizontal scrollbar.\n--- @field NoFocusOnAppearing number Window doesn't take focus when first appearing.\n--- @field NoBringToFrontOnFocus number Window doesn't bring to front when taking focus.\n--- @field AlwaysVerticalScrollbar number Window has a vertical scrollbar.\n--- @field AlwaysHorizontalScrollbar number Window has a horizontal scrollbar.\n--- @field AlwaysUseWindowPadding number Ensure child windows without border uses style.WindowPadding (ignored by default for non-bordered child windows, because more convenient).\n--- @field NoNavInputs number No gamepad/keyboard navigation within the window.\n--- @field NoNavFocus number No focusing toward this window with gamepad/keyboard navigation (e.g. skipped by CTRL+TAB).\n--- @field UnsavedDocument number Display a dot next to the title. When used in a tab/docking context, tab is selected when clicking the X + closure is not assumed (will wait for user to stop submitting the tab). Otherwise closure is assumed when pressing the X, so if you keep submitting the tab may reappear at end of tab bar.\n--- @field NoNav number No gamepad/keyboard navigation within the window and no focusing toward this window with gamepad/keyboard navigation.\n--- @field NoDecoration number Disable title-bar, resizing borders, and scrollbar.\n--- @field NoInputs number Window is completely sealed and won't receive inputs.\nImGui.WindowFlags = {\n None = 0,\n NoTitleBar = 1 << 0,\n NoResize = 1 << 1,\n NoMove = 1 << 2,\n NoScrollbar = 1 << 3,\n NoScrollWithMouse = 1 << 4,\n NoCollapse = 1 << 5,\n AlwaysAutoResize = 1 << 6,\n ShowBorders = 1 << 7,\n NoSavedSettings = 1 << 8,\n NoMouseInputs = 1 << 9,\n MenuBar = 1 << 10,\n HorizontalScrollbar = 1 << 11,\n NoFocusOnAppearing = 1 << 12,\n NoBringToFrontOnFocus = 1 << 13,\n AlwaysVerticalScrollbar = 1 << 14,\n AlwaysHorizontalScrollbar = 1 << 15,\n AlwaysUseWindowPadding = 1 << 16,\n NoNavInputs = 1 << 18,\n NoNavFocus = 1 << 19,\n UnsavedDocument = 1 << 20,\n NoNav = 1 << 18 | 1 << 19,\n NoDecoration = 1 << 0 | 1 << 1 | 1 << 3 | 1 << 5,\n NoInputs = 1 << 9 | 1 << 18 | 1 << 19\n}\n\n--- Begins a new dialog.\n--- @param text string The title of the dialog.\n--- @param x number The x coordinate of the dialog (optional).\n--- @param y number The y coordinate of the dialog (optional).\n--- @param flags WindowFlags Configuration flags.\nfunction ImGui.beginDialog(text, x, y, flags)\n return _internal.sendMessage('imgui.beginDialog', { text=text, x=x, y=y, flags=flags })\nend\n\n--- Ends the current dialog.\n--- @function\nfunction ImGui.endDialog()\n _internal.sendMessage('imgui.endDialog')\nend\n\n--- Begins the main menu bar. See `Menubar example`_.\n--- @return boolean Return true if the main menu bar is open, otherwise false.\nfunction ImGui.beginMainMenuBar()\n return _internal.sendMessage('imgui.beginMainMenuBar')\nend\n\n--- Ends the current main menu bar.\n--- @function\nfunction ImGui.endMainMenuBar()\n _internal.sendMessage('imgui.endMainMenuBar')\nend\n\n--- Begins a new menu-bar inside current window.\n--- To be displayed correctly, the dialog parent needs to have\n--- the ImGui.WindowFlags.MenuBar flag enabled. See `Menubar example`_.\n--- @return boolean Return true if the menu bar is open, otherwise false.\nfunction ImGui.beginMenuBar()\n return _internal.sendMessage('imgui.beginMenuBar')\nend\n\n--- Ends the current menu bar.\n--- @function\nfunction ImGui.endMenuBar()\n _internal.sendMessage('imgui.endMenuBar')\nend\n\n--- Begins a new menu.\n--- @param label string the label of the menu. See `Menubar example`_.\n--- @return boolean Return true if the menu is open, otherwise false.\nfunction ImGui.beginMenu(label)\n return _internal.sendMessage('imgui.beginMenu', { label=label})\nend\n\n--- Ends the current menu.\n--- @function\nfunction ImGui.endMenu()\n _internal.sendMessage('imgui.endMenu')\nend\n\n--- Creates a new menu item.\n--- @param mainLabel string The main label of the menu item.\n--- @param secondaryLabel string The secondary label of the menu item.\n--- @return boolean Return true if the menu item is pressed, otherwise false.\nfunction ImGui.menuItem(mainLabel, secondaryLabel)\n return _internal.sendMessage('imgui.menuItem', { mainLabel=mainLabel, secondaryLabel=secondaryLabel })\nend\n\n--- Begins a child window. See `Group Child example`_ for a full example\n--- @param label string the label of the child window.\nfunction ImGui.beginChild(label)\n _internal.sendMessage('imgui.beginChild', { label=label})\nend\n\n--- Ends the current child window.\n--- @function\nfunction ImGui.endChild()\n _internal.sendMessage('imgui.endChild')\nend\n\n--- Begins a new group of items. See `Group Child example`_ for a full example\n--- @function\nfunction ImGui.beginGroup()\n _internal.sendMessage('imgui.beginGroup')\nend\n\n--- Ends the current group of items.\n--- @function\nfunction ImGui.endGroup()\n _internal.sendMessage('imgui.endGroup')\nend\n\n--- Begins a new table. See `Table example`_ for a full example.\n--- @param mode string The mode of the table.\n--- @param number number The number of the table.\n--- @return boolean Return true if the table is open, otherwise false.\nfunction ImGui.beginTable(mode, number)\n return _internal.sendMessage('imgui.beginTable', { mode=mode, number=number })\nend\n\n--- Ends the current table.\n--- @function\nfunction ImGui.endTable()\n _internal.sendMessage('imgui.endTable')\nend\n\n--- Appends into into the next row of the table.\n--- @function\nfunction ImGui.tableNextRow()\n _internal.sendMessage('imgui.tableNextRow')\nend\n\n--- Appends into into the next column of the table.\n--- @function\nfunction ImGui.tableNextColumn()\n _internal.sendMessage('imgui.tableNextColumn')\nend\n\n--- Moves to the next row in the table.\n--- @function\nfunction ImGui.tableNextRow()\n _internal.sendMessage('imgui.tableNextRow')\nend\n\n--- Moves to the next column in the table.\n--- @function\nfunction ImGui.moveToNextColumn()\n _internal.sendMessage('imgui.moveToNextColumn')\nend\n\n--- Sets a cell in the table.\n--- @param label string The label of the cell.\nfunction ImGui.tableSetCell(label)\n _internal.sendMessage('imgui.tableSetCell', { label=label })\nend\n\n--- Creates the specified number of columns in the current window.\n--- @param numberCols number The number of columns.\nfunction ImGui.createColumns(numberCols)\n _internal.sendMessage('imgui.createColumns', { numberCols=numberCols })\nend\n\n--- Enumeration of available tab bar flags.\n--- @enum TabBarFlags\n--- @field None number No flags.\n--- @field Reorderable number Allow manually dragging tabs to re-order them + New tabs are appended at the end of list.\n--- @field AutoSelectNewTabs number Automatically select new tabs when they appear.\n--- @field TabListPopupButton number Disable buttons to open the tab list popup.\n--- @field NoCloseWithMiddleMouseButton number Disable behavior of closing tabs (that are submitted with p_open != NULL) with middle mouse button.\n--- @field NoTabListScrollingButtons number Disable scrolling buttons (apply when fitting policy is ImGuiTabBarFlags_FittingPolicyScroll).\n--- @field NoTooltip number Disable tooltips when hovering a tab.\n--- @field FittingPolicyResizeDown number Resize tabs when they don't fit.\n--- @field FittingPolicyScroll number Add scroll buttons when tabs don't fit.\n--- @field FittingPolicyMask number Fitting policy mask (defaults to ImGuiTabBarFlags_FittingPolicyResizeDown | ImGuiTabBarFlags_FittingPolicyScroll).\n--- @field FittingPolicyDefault number Fitting policy when there are no tabs.\nImGui.TabBarFlags = {\n None = 0,\n Reorderable = 1,\n AutoSelectNewTabs = 2,\n TabListPopupButton = 4,\n NoCloseWithMiddleMouseButton = 8,\n NoTabListScrollingButtons = 16,\n NoTooltip = 32,\n FittingPolicyResizeDown = 64,\n FittingPolicyScroll = 128,\n FittingPolicyMask = 64 + 128,\n FittingPolicyDefault = 64\n}\n\n--- Begins a new tab bar. See `Tabbar example`_ for a full example.\n--- @param label string The label of the tab bar.\n--- @param flags TabBarFlags Configuration flags.\n--- @return boolean Return true if the tab bar is open, otherwise false.\nfunction ImGui.beginTabBar(label, flags)\n return _internal.sendMessage('imgui.beginTabBar', { label=label, flags=flags })\nend\n\n--- Ends the current tab bar.\n--- @function\nfunction ImGui.endTabBar()\n _internal.sendMessage('imgui.endTabBar')\nend\n\n--- Begins a new tab item.\n--- @param label string The label of the tab item.\n--- @param flags TabBarFlags Configuration flags.\n--- @return boolean Return true if the tab item is open, otherwise false.\nfunction ImGui.beginTabItem(label, flags)\n return _internal.sendMessage('imgui.beginTabItem', { label=label, flags=flags })\nend\n\n--- Ends the current tab item.\n--- @function\nfunction ImGui.endTabItem()\n _internal.sendMessage('imgui.endTabItem')\nend\n\n--- Begins a new tooltip.\n--- @function\nfunction ImGui.beginTooltip()\n _internal.sendMessage('imgui.beginTooltip')\nend\n\n--- Ends the current tab item.\n--- @function\nfunction ImGui.endTooltip()\n _internal.sendMessage('imgui.endTooltip')\nend\n\n--- Enumeration of available popup flags.\n--- @enum PopupFlags\n--- @field None number No flag set.\n--- @field MouseButtonLeft number Open on Left Mouse release.\n--- @field MouseButtonRight number Open on Right Mouse release.\n--- @field MouseButtonMiddle number Open on Middle Mouse release.\n--- @field MouseButtonMask number Bit mask for buttons.\n--- @field MouseButtonDefault number Open on MouseButtonRight Mouse release (default).\n--- @field NoOpenOverExistingPopup number Don't open if there's already a popup at the same level of the popup stack.\n--- @field NoOpenOverItems number Don't return true when hovering items, only when hovering empty space.\n--- @field AnyPopupId number Ignore the ImGuiID parameter and test for any popup.\n--- @field AnyPopupLevel number Search/test at any level of the popup stack.\nImGui.PopupFlags = {\n None = 0,\n MouseButtonLeft = 0, -- Open on Left Mouse release\n MouseButtonRight = 1, -- Open on Right Mouse release\n MouseButtonMiddle = 2, -- Open on Middle Mouse release\n MouseButtonMask = 31,\n MouseButtonDefault = 1,\n NoOpenOverExistingPopup = 1 << 5, -- Don't open if there's already a popup at the same level of the popup stack\n NoOpenOverItems = 1 << 6, -- Don't return true when hovering items, only when hovering empty space\n AnyPopupId = 1 << 7, -- Ignore the ImGuiID parameter and test for any popup\n AnyPopupLevel = 1 << 8, -- Search/test at any level of the popup stack\n}\n\n--- Begins a new popup window. See `Popup example`_ for a full example.\n--- @param label string The label of the pop up item.\n--- @param flags PopupFlags Configuration flags.\n--- @return boolean Return true if the popup is open, otherwise false.\nfunction ImGui.beginPopup(label, flags)\n return _internal.sendMessage('imgui.beginPopup', { label=label, flags=flags })\nend\n\n--- Ends the current popup window.\n--- @function\nfunction ImGui.endPopup()\n _internal.sendMessage('imgui.endPopup')\nend\n\n--- Opens a popup window identified by the label.\n--- @function\nfunction ImGui.openPopup(label)\n _internal.sendMessage('imgui.openPopup', { label=label })\nend\n\n--- Closes the current popup window.\n--- @function\nfunction ImGui.closeCurrentPopup()\n _internal.sendMessage('imgui.closeCurrentPopup')\nend\n\n--- Begins a new modal popup window.\n--- @param label string The label of the pop up modal item.\n--- @param flags PopupFlags Configuration flags.\n--- @return boolean Return true if the popup is open, otherwise false.\nfunction ImGui.beginPopupModal(label, flags)\n return _internal.sendMessage('imgui.beginPopupModal', { label=label, flags=flags })\nend\n\n--- Displays text to the current window.\n--- @param text string The text to be displayed.\nfunction ImGui.text(text)\n _internal.sendMessage('imgui.text', { text=text })\nend\n\n--- Displays text to the current window with a given color.\n--- @param text string the text to be displayed.\n--- @param color WidgetColor An instance of WidgetColor.\nfunction ImGui.textColored(text, color)\n _internal.sendMessage('imgui.textColored', { text=text, colorId=color.idx })\nend\n\n--- Displays wrapped text to the current window\n--- @param text string The text to be displayed.\nfunction ImGui.textWrapped(text)\n _internal.sendMessage('imgui.textWrapped', { text=text })\nend\n\n--- Enumeration for input text flags.\n--- @enum InputTextFlags\n--- @field None number No flags.\n--- @field CharsDecimal number Allow decimals and operators (0123456789.+-/).\n--- @field CharsHexadecimal number Allow decimals, operators ad letters (0123456789ABCDEFabcdef).\n--- @field CharsUppercase number Turn lowercase letters into uppercase.\n--- @field CharsNoBlank number Filter out spaces, tabs.\n--- @field AutoSelectAll number Select entire text when first taking mouse focus.\n--- @field EnterReturnsTrue number Return 'true' when Enter is pressed (as opposed to every time the value was modified).\n--- @field CallbackCompletion number Callback on pressing TAB (for completion handling).\n--- @field CallbackHistory number Callback on pressing Up/Down arrows (for history handling).\n--- @field CallbackAlways number Callback on each iteration. User code may query cursor position, modify text buffer.\n--- @field CallbackCharFilter number Callback on character inputs to replace or discard them. Modify 'EventChar' to replace or discard, or return 1 in callback to discard.\n--- @field AllowTabInput number Pressing TAB input a '\\t' character into the text field.\n--- @field CtrlEnterForNewLine number In multi-line mode, unfocus with Enter, add new line with Ctrl+Enter (default is opposite unfocus with Ctrl+Enter, add line with Enter).\n--- @field NoHorizontalScroll number Disable following the cursor horizontally.\n--- @field AlwaysOverwrite number Overwrite mode.\n--- @field ReadOnly number Read-only mode.\n--- @field Password number Password mode, display all characters as ''.\n--- @field NoUndoRedo number Disable undo/redo. Note that input text owns the text data while active, if you want to provide your own undo/redo stack you need e.g. to call ClearActiveID().\n--- @field CharsScientific number Allow scientific notation input (0123456789.+-\\*/eE).\n--- @field CallbackResize number Callback on buffer capacity changes request (beyond 'buf_size' parameter value), allowing the string to grow.\n--- @field CallbackEdit number Callback on any edit.\n--- @field EscapeClearsAll number Clears the input when Escape key is pressed.\nImGui.InputTextFlags = {\n None = 0,\n CharsDecimal = 1 << 0,\n CharsHexadecimal = 1 << 1,\n CharsUppercase = 1 << 2,\n CharsNoBlank = 1 << 3,\n AutoSelectAll = 1 << 4,\n EnterReturnsTrue = 1 << 5,\n CallbackCompletion = 1 << 6,\n CallbackHistory = 1 << 7,\n CallbackAlways = 1 << 8,\n CallbackCharFilter = 1 << 9,\n AllowTabInput = 1 << 10,\n CtrlEnterForNewLine = 1 << 11,\n NoHorizontalScroll = 1 << 12,\n AlwaysOverwrite = 1 << 13,\n ReadOnly = 1 << 14,\n Password = 1 << 15,\n NoUndoRedo = 1 << 16,\n CharsScientific = 1 << 17,\n CallbackResize = 1 << 18,\n CallbackEdit = 1 << 19,\n EscapeClearsAll = 1 << 20\n}\n\n--- Creates a text input widget.\n--- @param label string the label to add to the input widget.\n--- @param widgetString WidgetString An intance of WidgetString to interact with the inputText widget.\n--- @param flags InputTextFlags The flags to be used for the input label (optional).\n--- @usage\n--- local gui = require 'engine/imgui'\n--- widgetString = gui.WidgetString:new(32, \"\")\n--- gui.inputText(\"your name\", widgetString)\nfunction ImGui.inputText(label, widgetString, flags)\n _internal.sendMessage('imgui.inputText', { label=label, bufferId=widgetString.idx, flags=flags })\nend\n\n--- Creates a number input widget.\n--- @param label string the label to add to the input widget.\n--- @param widgetNumber WidgetNumber An intance of WidgetString to interact with the inputNumber widget.\n--- @param flags InputTextFlags The flags to be used for the input label (optional). They are the same for InputText.\n--- @usage\n--- local gui = require 'engine/imgui'\n--- widgetNumber = gui.WidgetNumber:new(42)\n--- gui.inputNumber(\"Answer to The Ultimate Question of Life\", widgetNumber)\nfunction ImGui.inputNumber(label, widgetNumber, flags)\n _internal.sendMessage('imgui.inputNumber', { label=label, bufferId=widgetNumber.idx, flags=flags })\nend\n\n--- Creates a bullet point with accompanying text.\n--- @param text string The text to display next to the bullet point.\nfunction ImGui.bulletText(text)\n _internal.sendMessage('imgui.bulletText', { text=text})\nend\n\n--- Increases the horizontal indent of the subsequent widgets by a certain amount.\nfunction ImGui.indent()\n _internal.sendMessage('imgui.indent')\nend\n\n--- Decreases the horizontal indent of the subsequent widgets by a certain amount.\nfunction ImGui.unindent()\n _internal.sendMessage('imgui.unindent')\nend\n\n--- @class WidgetString\n--- A class to internally store strings to be used in the Lumino Lua environment.\nlocal WidgetString = {\n _isWidgetString = true,\n _type = \"WidgetString\"\n}\n\n--- Creates a new WidgetString object with the given length and initial value.\n--- @param length number The length (in bytes) of the buffer where the string is stored.\n--- @param initialValue string The initial value of the string.\nfunction WidgetString:new(length, initialValue)\n local idx = _internal.sendMessage('imgui.createStringBuffer', { length = length, initialValue = initialValue })\n local obj = { idx = idx, length = length }\n self.__index = self\n Class.__setmetatable(obj, self)\n return obj\nend\n\n--- Retrieves the value stored inside an instance of WidgetString.\n--- @return string The string stored inside the instance of WidgetString.\nfunction WidgetString:getValue()\n __assertTrace(self._isWidgetString, \"self is not a WidgetString\")\n return _internal.sendMessage('imgui.getStringBufferValue', { bufferId = self.idx })\nend\n\n--- Sets a new internal value to an instance of WidgetString.\n--- @param value string The value to set the widget string to.\nfunction WidgetString:setValue(value)\n __assertTrace(self._isWidgetString, \"self is not a WidgetString\")\n return _internal.sendMessage('imgui.setStringBuffer', { value = value, bufferId = self.idx })\nend\n\n--- Concatenation operator for WidgetString. It also accepts primitive strings.\n--- @param other WidgetString|string The other WidgetString or string to concatenate with.\n--- @return string The concatenated string.\nfunction WidgetString.__concat(self, other)\n if type(self) == \"string\" then\n return self .. other:getValue()\n elseif type(other) == \"string\" then\n return self:getValue() .. other\n elseif getmetatable(self) == WidgetString and getmetatable(other) == WidgetString then\n return self:getValue() .. other:getValue()\n else\n error(\"One argument must be a WidgetString instance. The second argument must be a WidgetString instance or a string\")\n end\nend\n\n--- Equality operator for WidgetString.\n--- @param other WidgetString|string The other WidgetString or string to compare with.\n--- @return boolean True if the values are equal.\nfunction WidgetString.__eq(self, other)\n if type(other) == \"string\" then\n return self:getValue() == other\n elseif getmetatable(other) == WidgetString then\n return self:getValue() == other:getValue()\n else\n return false\n end\nend\n\n--- Hook that runs before an object is deleted by the garbage collector.\n--- It calls a function to delete the WidgetString object in JS\n--- @private\nfunction WidgetString:__gc()\n _internal.sendMessage('imgui.freeStringBuffer', { bufferId = self.idx })\nend\n\n--- Returns the string representation of the WidgetString.\n--- @return string The string value.\nfunction WidgetString:__tostring()\n return self:getValue()\nend\n\n-- Add the WidgetString class to the ImGui namespace\nImGui.WidgetString = WidgetString\n\n--- @class WidgetNumber\n--- A class to internally store numbers to be used in the Lumino Lua environment.\nlocal WidgetNumber = {\n _isWidgetNumber = true,\n _type = \"WidgetNumber\"\n}\n\n--- Creates a new WidgetNumber object with the given initial value\n--- @param initialValue number The initial value stored internally.\nfunction WidgetNumber:new(initialValue)\n -- Store the WidgetNumber object in a field of the class instance metatable\n local idx = _internal.sendMessage('imgui.createWidgetNumber', { initialValue = initialValue })\n local obj = { idx = idx}\n self.__index = self\n Class.__setmetatable(obj, self)\n -- Return the instance\n return obj\nend\n\n--- Retrieves the value stored inside an instance of WidgetNumber.\n--- @return number The value interally stored inside the widget number.\nfunction WidgetNumber:getValue()\n __assertTrace(self._isWidgetNumber, \"self is not a WidgetNumber\")\n return _internal.sendMessage('imgui.getWidgetNumber', { numberId = self.idx })\nend\n\n--- Sets a new internal value to an instance of WidgetNumber.\n--- @param value number The value to set the widget number to.\nfunction WidgetNumber:setValue(value)\n __assertTrace(self._isWidgetNumber, \"self is not a WidgetNumber\")\n return _internal.sendMessage('imgui.setWidgetNumber', { value = value, numberId = self.idx })\nend\n\n--- Sum operator for widgetNumber. It also accepts primitive number.\n--- @param other WidgetNumber The other WidgetNumber (or number) to add to.\n--- @return number The sum of the two values.\nfunction WidgetNumber.__add(self, other)\n if type(self) == \"number\" then\n return self + other:getValue()\n elseif type(other) == \"number\" then\n return self:getValue() + other\n elseif getmetatable(self) == WidgetNumber and getmetatable(other) == WidgetNumber then\n return self:getValue() + other:getValue()\n else\n error(\"One argument must be a WidgetNumber instance. \\\n The second argument must be a WidgetNumber instance or a number\")\n end\nend\n\n--- Multiplication operator for widgetNumber. It also accepts primitive number.\n--- @param other WidgetNumber The other `WidgetNumber` instance to multiply to.\n--- @return number the product of the two values.\nfunction WidgetNumber.__mul(self, other)\n assert(self._isWidgetNumber, \"self is not a WidgetNumber\")\n if type(other) == \"number\" then\n return self:getValue() * other\n elseif type(self) == \"number\" then\n return self * other:getValue()\n elseif getmetatable(other) == WidgetNumber and getmetatable(self) == WidgetNumber then\n return self:getValue() * other:getValue()\n else\n error(\"One argument must be a WidgetNumber instance. \\\n The second argument must be a WidgetNumber instance or a number\")\n end\nend\n\n--- Hook that runs before an object is deleted by the garbage collector.\n--- It calls a function to delete the WidgetNumber object in JS\n--- @private\nfunction WidgetNumber:__gc()\n _internal.sendMessage('imgui.freeWidgetNumber', { numberId = self.idx })\nend\n-- Add the WidgetNumber class to the Nk.Canvas namespace\nImGui.WidgetNumber = WidgetNumber\n\n--- @class WidgetVector3\n--- A class to internally store a 3D vector to be used in the Lumino Lua environment.\nlocal WidgetVector3 = {\n _isWidgetVector3 = true,\n _type = \"WidgetVector3\"\n}\n\n--- Creates a new WidgetVector3 object with the given initial values for x, y, z.\n--- @param x number The initial x component value.\n--- @param y number The initial y component value.\n--- @param z number The initial z component value.\n--- @return WidgetVector3 A new WidgetVector3 instance.\nfunction WidgetVector3:new(x, y, z)\n -- Store the WidgetVector3 object in a field of the class instance metatable\n local idx = _internal.sendMessage('imgui.createWidgetVector3', { x = x, y = y, z = z })\n local obj = { idx = idx, x = x, y = y, z = z }\n self.__index = self\n Class.__setmetatable(obj, self)\n -- Return the instance\n return obj\nend\n\n--- Retrieves the vector components stored inside an instance of WidgetVector3.\n--- @return number x The X component\n--- @return number y The Y component\n--- @return number z The Z component\nfunction WidgetVector3:getValue()\n assert(self._isWidgetVector3, \"self is not a WidgetVector3\")\n local values = _internal.sendMessage('imgui.getWidgetVector3', { vectorId = self.idx })\n self.x = values.x\n self.y = values.y\n self.z = values.z\n return self.x, self.y, self.z\nend\n\n--- Sets new internal values for the x, y, z components of an instance of WidgetVector3.\n--- @param x number The x component to set.\n--- @param y number The y component to set.\n--- @param z number The z component to set.\nfunction WidgetVector3:setValue(x, y, z)\n assert(self._isWidgetVector3, \"self is not a WidgetVector3\")\n self.x, self.y, self.z = x, y, z\n _internal.sendMessage('imgui.setWidgetVector3', { x = x, y = y, z = z, vectorId = self.idx })\nend\n\n--- Addition operator for WidgetVector3. It also accepts primitive number.\n--- @param other WidgetVector3 The other WidgetVector3 (or number) to add to.\n--- @return WidgetVector3 The sum of the two vectors.\nfunction WidgetVector3.__add(self, other)\n assert(self._isWidgetVector3, \"self is not a WidgetVector3\")\n if type(other) == \"number\" then\n return WidgetVector3:new(self.x + other, self.y + other, self.z + other)\n elseif getmetatable(other) == WidgetVector3 then\n return WidgetVector3:new(self.x + other.x, self.y + other.y, self.z + other.z)\n else\n error(\"One argument must be a WidgetVector3 instance. The other must be a WidgetVector3 instance or a number\")\n end\nend\n\n--- Subtraction operator for WidgetVector3. It also accepts primitive number.\n--- @param other WidgetVector3 The other WidgetVector3 (or number) to subtract from.\n--- @return WidgetVector3 The difference between the two vectors.\nfunction WidgetVector3.__sub(self, other)\n assert(self._isWidgetVector3, \"self is not a WidgetVector3\")\n if type(other) == \"number\" then\n return WidgetVector3:new(self.x - other, self.y - other, self.z - other)\n elseif getmetatable(other) == WidgetVector3 then\n return WidgetVector3:new(self.x - other.x, self.y - other.y, self.z - other.z)\n else\n error(\"One argument must be a WidgetVector3 instance. The other must be a WidgetVector3 instance or a number\")\n end\nend\n\n--- Hook that runs before an object is deleted by the garbage collector.\n--- It calls a function to delete the WidgetVector3 object in JS.\n--- @private\nfunction WidgetVector3:__gc()\n _internal.sendMessage('imgui.freeWidgetVector3', { vectorId = self.idx })\nend\n\n-- Add the WidgetVector3 class to the ImGui namespace\nImGui.WidgetVector3 = WidgetVector3\n\n--- Creates a new progress bar.\n--- @param status number Progress status (0.0f to 1.0f) to represent in the progress bar.\nfunction ImGui.progressBar(status)\n _internal.sendMessage('imgui.progressBar', { status=status })\nend\n\n--- Enumeration for slider flags\n--- @enum SliderFlags\n--- @field None number No flag set.\n--- @field AlwaysClamp number Clamp value to min/max bounds when input manually with CTRL+Click. By default CTRL+Click allows going out of bounds.\n--- @field Logarithmic number Make the widget logarithmic (linear otherwise). Consider using ImGuiSliderFlags_NoRoundToFormat with this if using a format-string with small amount of digits.\n--- @field NoRoundToFormat number Disable rounding underlying value to match precision of the display format string (e.g. %.3f values are rounded to those 3 digits).\n--- @field NoInput number Disable CTRL+Click or Enter key allowing to input text directly into the widget.\nImGui.SliderFlags = {\n None = 0,\n AlwaysClamp = 1 << 4,\n Logarithmic = 1 << 5,\n NoRoundToFormat = 1 << 6,\n NoInput = 1 << 7\n}\n\n--- Creates a new float slider.\n--- @param label string the label to add to the slider.\n--- @param number WidgetNumber The widgetNumber to use as storage.\n--- @param minValue number the minimum value for the slider.\n--- @param maxValue number the maximum value for the slider.\n--- @param format string format of the string in the slider. The default if omitted is \"%f\".\n--- @param flags SliderFlags The flags to be used for the slider (optional).\nfunction ImGui.sliderFloat(label, number, minValue, maxValue, format, flags)\n assert(number._isWidgetNumber, \"number is not a WidgetNumber\")\n _internal.sendMessage('imgui.sliderFloat', { label=label, numberId=number.idx, minValue=minValue, maxValue=maxValue, format=format, flags=flags })\nend\n\n--- Creates a new integer slider.\n--- @param label string The label to add to the slider.\n--- @param number WidgetNumber The widgetNumber to use as storage.\n--- @param minValue number The minimum value for the slider.\n--- @param maxValue number The maximum value for the slider.\n--- @param format string The format of the string in the slider. The default if omitted is \"%d\".\n--- @param flags SliderFlags The flags to be used for the slider (optional).\nfunction ImGui.sliderInt(label, number, minValue, maxValue, format, flags)\n assert(number._isWidgetNumber, \"number is not a WidgetNumber\")\n _internal.sendMessage('imgui.sliderInt', { label=label, numberId=number.idx, minValue=minValue, maxValue=maxValue, format=format, flags=flags })\nend\n\n--- Creates a set of three sliders for manipulating a vector3 object.\n--- @param label string The label to display next to the sliders.\n--- @param widgetVector3 WidgetVector3 The vector3 widget object.\n--- @param minValue number The minimum value for the slider.\n--- @param maxValue number The maximum value for the slider.\n--- @param format string The format of the string in the slider. The default if omitted is \"%f\".\n--- @param flags SliderFlags The flags to be used for the slider (optional).\nfunction ImGui.sliderVector3(label, vector, minValue, maxValue, format, flags)\n assert(vector._isWidgetVector3, \"vector is not a WidgetVector3\")\n _internal.sendMessage('imgui.sliderVector3', { label=label, vectorId=vector.idx, minValue=minValue, maxValue=maxValue, format=format, flags=flags })\nend\n\n--- Creates a new button.\n--- @param text string The text to be displayed on the button.\n--- @param width number The width of the button (optional).\n--- @param height number The height of the button (optional).\n--- @return boolean Returns true if the button was clicked, otherwise false.\nfunction ImGui.button(text, width, height)\n return _internal.sendMessage('imgui.button', { text=text, width=width, height=height })\nend\n\n--- Logs button events in the ImGui interface.\n--- @function\nfunction ImGui.logButtons()\n _internal.sendMessage('imgui.logButtons')\nend\n\n--- Logs the current ImGui interface to the clipboard. Useful for debugging.\n--- @function\nfunction ImGui.logToClipboard()\n _internal.sendMessage('imgui.logToClipboard')\nend\n\n--- Stops logging events in the ImGui interface.\n--- @function\nfunction ImGui.logFinish()\n _internal.sendMessage('imgui.logFinish')\nend\n\n--- Logs a text in the ImGui interface.\n--- @param text string the text to log\nfunction ImGui.logText(text)\n _internal.sendMessage('imgui.logText', { text=text})\nend\n\n--- Adds an horizontal separator between items.\n--- @function\nfunction ImGui.separator()\n _internal.sendMessage('imgui.separator')\nend\n\n--- Adds horizontal spacing between items.\n--- @function\nfunction ImGui.spacing()\n _internal.sendMessage('imgui.spacing')\nend\n\n--- The next item will be created on the same line.\n--- @param spacing number The spacing between items in pixels. If not given, the default spacing is used.\n--- @param offset number The X position where the next item should start in window coordiantes. If not given, the item is placed right after the previous one.\nfunction ImGui.sameLine(spacing, offset)\n _internal.sendMessage('imgui.sameLine', { offset=offset, spacing=spacing})\nend\n\n--- Enum for selectable flags\n--- @enum SelectableFlags\n--- @field None number No flag set.\n--- @field DontClosePopups number Clicking this doesn't close parent popup window.\n--- @field SpanAllColumns number Selectable frame can span all columns (text will still fit in current column).\n--- @field AllowDoubleClick number Generate press events on double clicks too.\n--- @field Disabled number Cannot be selected, display grayed out text.\n--- @field AllowItemOverlap number (WIP) Hit testing to allow subsequent widgets to overlap this one.\nImGui.SelectableFlags = {\n None = 0,\n DontClosePopups = 1 << 0,\n SpanAllColumns = 1 << 1,\n AllowDoubleClick = 1 << 2,\n Disabled = 1 << 3,\n AllowItemOverlap = 1 << 4\n}\n\n--- Creates a selectable item.\n--- @param text string Text in the selectable item.\n--- @param flags SelectableFlags Configuration flags.\nfunction ImGui.selectable(text, flags)\n _internal.sendMessage('imgui.selectable', { text=text, flags=flags })\nend\n\n--- Creates a new checkbox.\n--- @param label string The label of the checkbox.\n--- @param number WidgetNumber The widgetNumber to use as storage.\nfunction ImGui.checkbox(label, number)\n assert(number._isWidgetNumber, \"number is not a WidgetNumber\")\n _internal.sendMessage('imgui.checkbox', { label=label, numberId=number.idx })\nend\n\n--- Creates a new checkbox to enable/disable flags.\n--- @param label string The label of the checkbox.\n--- @param flags ConfigFlags Configuration flags.\nfunction ImGui.checkboxFlags(label, flags)\n _internal.sendMessage('imgui.checkboxFlags', { label=label, flags=flags })\nend\n\n--- Creates a combo box with a list of items to choose from.\n--- @param label string The label of the combo box.\n--- @param number WidgetNumber The widgetNumber to use as storage. Note that arrays in ImGUI\n--- are indexed from 0 and arrays in Lua are indexed from 1. You will need to offset the arrays.\n--- @param items array An array of strings to use as options.\nfunction ImGui.combo(label, number, items)\n -- TODO\n -- Lua starts counting arrays from 1. The number is offset by this value\n -- but it doesn't look like there's any way to directly correct it without\n -- touching imgui source code...we could do some \"hack\" like hardcoding\n -- an empty element into the array\n -- table.insert(items, 1, \"\")\n -- number.idx + 1\n _internal.sendMessage('imgui.combo', { label=label, numberId=number.idx, items=items })\nend\n\n--- Creates a collapsing header with a given label.\n--- @param label string The label of the header.\n--- @return boolean Return true if the header is open, false if it is closed.\nfunction ImGui.collapsingHeader(label)\n return _internal.sendMessage('imgui.collapsingHeader', { label=label })\nend\n\n--- Creates a tree node.\n--- @param label string The label of the tree node.\n--- @return boolean A boolean indicating whether the tree node is open.\n--- @usage\n--- local gui = require 'engine/imgui'\n--- local TreeBehaviour = Class.new(Behaviour)\n--- \n--- function TreeBehaviour:rendergui()\n--- gui.beginDialog(\"Tree Example\")\n--- \n--- if gui.treeNode(\"Click to expand\") then\n--- if gui.isItemToggledOpen() then\n--- gui.text(\"Just opened!\")\n--- end\n--- gui.text(\"Some content...\")\n--- gui.treePop()\n--- end\n--- \n--- gui.endDialog()\n--- end\n--- return TreeBehaviour\nfunction ImGui.treeNode(label)\n return _internal.sendMessage('imgui.treeNode', { label=label })\nend\n\n--- Ends the current tree node.\n--- Called after `treeNode()`, it ends a tree node and automatically\n--- pops it from the ImGui tree structure.\n--- @function\n--- @see treeNode()\nfunction ImGui.treePop()\n _internal.sendMessage('imgui.treePop')\nend\n\n--- Add a tree node to the GUI with the given label.\n--- @param label string The label to display on the tree node.\nfunction ImGui.treePush(label)\n _internal.sendMessage('imgui.treePush', { label=label })\nend\n\n--- @class WidgetColor\n--- A class to internally link numbers to be used in the Dear ImGui api from the Lumino codebase to Lua environment.\nlocal WidgetColor = {}\n\n--- Creates a new WidgetColor object with the given RGBA values. The RGBA values range from 0 to 1.\n--- @param r number The red color component channel.\n--- @param g number The green color component channel.\n--- @param b number The blue color component channel.\n--- @param a number The alpha color component channel.\n--- @return WidgetColor A new WidgetColor instance.\nfunction WidgetColor:new(r, g, b, a)\n -- Store the WidgetColor object in a field of the class instance metatable\n local idx = _internal.sendMessage('imgui.createWidgetColor', { r=r, g=g, b=b, a=a })\n local obj = { idx = idx,\n r = r,\n g = g,\n b = b,\n a = a}\n self.__index = self\n Class.__setmetatable(obj, self)\n -- Return the instance\n return obj\nend\n\n--- Retrieves the RGBA components stored inside an instance of WidgetColor. The RGBA values range from 0 to 1.\n--- @return number r Red component\n--- @return number g Green component\n--- @return number b Blue component\n--- @return number a Alpha component\nfunction WidgetColor:getValue()\n local values = _internal.sendMessage('imgui.getWidgetColor', { colorId = self.idx })\n self.r = values.r\n self.g = values.g\n self.b = values.b\n self.a = values.a\n return self.r, self.g, self.b, self.a\nend\n\n--- Sets new internal values for the r, g, b, a components of an instance of WidgetColor. The RGBA values range from 0 to 1.\n--- @param r number The r component to set.\n--- @param g number The g component to set.\n--- @param b number The b component to set.\n--- @param a number The a component to set.\nfunction WidgetColor:setValue(r, g, b, a)\n self.r, self.g, self.b, self.a = r, g, b, a\n _internal.sendMessage('imgui.setWidgetColor', { r = r, g = g, b = b, a = a, colorId = self.idx })\nend\n\n--- Hook that runs before an object is deleted by the garbage collector.\n--- It calls a function to delete the WidgetColor object in JS\n--- @private\nfunction WidgetColor:__gc()\n _internal.sendMessage('imgui.freeWidgetColor', { colorId = self.idx })\nend\n-- Add the WidgetColor class to the Nk.Canvas namespace\nImGui.WidgetColor = WidgetColor\n\n--- Enumeration of flags for the color editing widgets.\n--- @enum ColorEditFlags\n--- @field None number No flag set.\n--- @field NoAlpha number ColorEdit, ColorPicker, ColorButton: ignore Alpha component (will only read 3 components from the input pointer).\n--- @field NoPicker number ColorEdit: disable picker when clicking on color square.\n--- @field NoOptions number ColorEdit: disable toggling options menu when right-clicking on inputs/small preview.\n--- @field NoSmallPreview number ColorEdit, ColorPicker: disable color square preview next to the inputs. (e.g. to show only the inputs)\n--- @field NoInputs number ColorEdit, ColorPicker: disable inputs sliders/text widgets (e.g. to show only the small preview color square).\n--- @field NoTooltip number ColorEdit, ColorPicker, ColorButton: disable tooltip when hovering the preview.\n--- @field NoLabel number ColorEdit, ColorPicker: disable display of inline text label (the label is still forwarded to the tooltip and picker).\n--- @field NoSidePreview number ColorPicker: disable bigger color preview on right side of the picker, use small color square preview instead.\n--- @field NoDragDrop number ColorEdit: disable drag and drop target. ColorButton: disable drag and drop source.\n--- @field NoBorder number ColorButton: disable border (which is enforced by default)\n--- @field AlphaBar number ColorEdit, ColorPicker: show vertical alpha bar/gradient in picker.\n--- @field AlphaPreview number ColorEdit, ColorPicker, ColorButton: display preview as a transparent color over a checkerboard, instead of opaque.\n--- @field AlphaPreviewHalf number ColorEdit, ColorPicker, ColorButton: display half opaque / half checkerboard, instead of opaque.\n--- @field HDR number ColorEdit: Currently only disable 0.0f..1.0f limits in RGBA edition (note: you probably want to use ImGuiColorEditFlags_Float flag as well).\n--- @field DisplayRGB number ColorEdit: override display type among RGB.\n--- @field DisplayHSV number ColorEdit: override display type among HSV.\n--- @field DisplayHex number ColorEdit: override display type among Hex.\n--- @field Uint8 number Display values formatted as 0..255.\n--- @field Float number Display values formatted as 0.0f..1.0f floats instead of 0..255 integers. No round-trip of value via integers.\n--- @field PickerHueBar number Display a bar for Hue and rectangle for Sat/Value.\n--- @field PickerHueWheel number Display a wheel for Hue and triangle for Sat/Value.\n--- @field InputRGB number Input and output data in RGB format.\n--- @field InputHSV number Input and output data in HSV format.\nImGui.ColorEditFlags = {\n None = 0,\n NoAlpha = 1 << 1,\n NoPicker = 1 << 2,\n NoOptions = 1 << 3,\n NoSmallPreview = 1 << 4,\n NoInputs = 1 << 5,\n NoTooltip = 1 << 6,\n NoLabel = 1 << 7,\n NoSidePreview = 1 << 8,\n NoDragDrop = 1 << 9,\n NoBorder = 1 << 10,\n AlphaBar = 1 << 16,\n AlphaPreview = 1 << 17,\n AlphaPreviewHalf = 1 << 18,\n HDR = 1 << 19,\n DisplayRGB = 1 << 20,\n DisplayHSV = 1 << 21,\n DisplayHex = 1 << 22,\n Uint8 = 1 << 23,\n Float = 1 << 24,\n PickerHueBar = 1 << 25,\n PickerHueWheel = 1 << 26,\n InputRGB = 1 << 27,\n InputHSV = 1 << 28\n}\n\n--- Creates a color picker.\n--- @param label string The label of the color picker.\n--- @param color WidgetColor An instance of WidgetColor.\n--- @param flag ColorEditFlags User given flags to change the behaviour the behaviour of the widget.\n--- @usage\n--- local gui = Nk.ImGui\n--- gui.beginDialog(\"Color picker\")\n--- gui.colorPicker(\"Pick a color\", color1)\n--- gui.spacing()\n--- gui.colorEdit(\"Edit a color\", color2)\n--- gui.endDialog()\nfunction ImGui.colorPicker(label, color, flags)\n _internal.sendMessage('imgui.colorPicker', { label=label, colorId=color.idx, flags=flags })\nend\n\n--- Creates a color edit. Similar to ColorPicker\n--- @param label string The label of the color picker.\n--- @param color WidgetColor An instance of WidgetColor.\n--- @param flag ColorEditFlags User given flags to change the behaviour of the widget.\nfunction ImGui.colorEdit(label, color, flags)\n _internal.sendMessage('imgui.colorEdit', { label=label, colorId=color.idx, flags=flags })\nend\n\n--- Sets the position of the next window.\n--- @param x number The x-coordinate of the window position.\n--- @param y number The y-coordinate of the window position.\nfunction ImGui.setNextWindowPos(x, y)\n _internal.sendMessage('imgui.setNextWindowPos', { x=x, y=y })\nend\n\n--- Sets the size of the next window.\n--- @param x number Width of the window.\n--- @param y number Height of the window.\nfunction ImGui.setNextWindowSize(x, y)\n _internal.sendMessage('imgui.setNextWindowSize', { x=x, y=y })\nend\n\n--- Sets the content size of the ColorEditFlagsnext window.\n--- @param x number Width of the window content\n--- @param y number Height of the window content\nfunction ImGui.setNextWindowContentSize(x, y)\n _internal.sendMessage('imgui.setNextWindowContentSize', { x=x, y=y })\nend\n\n--- Sets the size constraints of the next window.\n--- @param x number Minimum width of the window.\n--- @param y number Minimum height of the window.\nfunction ImGui.setNextWindowSizeConstraints(minX, minY, maxX, maxY)\n _internal.sendMessage('imgui.setNextWindowSizeConstraints', { minX=minX, minY=minY, maxX=maxX, maxY=maxY })\nend\n\n--- Sets the collapsed state of the next window.\n--- @param collapsed boolean Whether the window should be collapsed or not.\nfunction ImGui.setNextWindowCollapsed(collapsed)\n _internal.sendMessage('imgui.setNextWindowCollapsed', { collapsed=collapsed })\nend\n\n--- Sets the focus state of the next window.\n--- @param focused boolean Whether the window should be focused or not.\nfunction ImGui.setNextWindowFocus()\n _internal.sendMessage('imgui.setNextWindowFocus')\nend\n\n--- Sets the background alpha value of the next window.\n--- @param alpha number The alpha value of the background, between 0 and 1.\nfunction ImGui.setNextWindowBgAlpha(alpha)\n _internal.sendMessage('imgui.setNextWindowBgAlpha', { alpha=alpha })\nend\n\n--- Determines if the current item is hovered by the mouse cursor. For an example, see `Item State Example`_.\n--- @return boolean True if the current item is being hovered by the mouse cursor, false otherwise.\nfunction ImGui.isItemHovered()\n return _internal.sendMessage('imgui.isItemHovered')\nend\n\n--- Determines if the current item has been clicked. For an example, see `Item State Example`_.\n--- @return boolean True if the current item has been clicked, false otherwise.\nfunction ImGui.isItemClicked()\n return _internal.sendMessage('imgui.isItemClicked')\nend\n\n--- Determines if the current item is open. For an example, see `Item State Example`_.\n--- @return boolean True if the current item is toggled open, false otherwise.\nfunction ImGui.isItemToggledOpen()\n return _internal.sendMessage('imgui.isItemToggledOpen')\nend\n\n--- Enumeration for mouse button events.\n--- @enum MouseButton\n--- @field Left number Index for the left mouse button.\n--- @field Right number Index for the right mouse button.\n--- @field Middle number Index for the middle mouse button.\n--- @field COUNT number The number of mouse buttons.\nImGui.MouseButton = {\n Left = 0,\n Right = 1,\n Middle = 2,\n COUNT = 5\n}\n\n--- Enumeration of mouse cursor types for use with SetMouseCursor().\n--- @enum MouseCursor\n--- @field None number No cursor.\n--- @field Arrow number Arrow cursor.\n--- @field TextInput number Text input I-beam cursor.\n--- @field ResizeAll number (Unused by Dear ImGui functions).\n--- @field ResizeNS number Vertical resize cursor.\n--- @field ResizeEW number Horizontal resize cursor.\n--- @field ResizeNESW number Cursor for resizing bottom-left corner of window.\n--- @field ResizeNWSE number Cursor for resizing bottom-right corner of window.\n--- @field Hand number Sets mouse cursor to hand.\n--- @field NotAllowed number Cursor for disallowed interaction (usually a crossed circle).\n--- @field COUNT number Number of cursor types.\nImGui.MouseCursor = {\n None = -1,\n Arrow = 0,\n TextInput = 1,\n ResizeAll = 2,\n ResizeNS = 3,\n ResizeEW = 4,\n ResizeNESW = 5,\n ResizeNWSE = 6,\n Hand = 7,\n NotAllowed = 8,\n COUNT = 9\n}\n\n--- Returns true if the mouse was clicked on the given event.\n--- @param event MouseButton The event for which to check for a mouse click.\nfunction ImGui.isMouseClicked(event)\n return _internal.sendMessage('imgui.isMouseClicked', { event=event })\nend\n\n--- Sets the mouse cursor to the given cursor type.\n--- @param cursor MouseCursor The cursor type to set.\nfunction ImGui.setMouseCursor(cursor)\n _internal.sendMessage('imgui.setMouseCursor', { cursor=cursor })\nend\n\n--- Hook that runs before an object is deleted by the garbage collector.\n--- Cleanup resources and shut down the user interface\n--- @private\nfunction ImGui:__gc()\n _internal.sendMessage('imgui.shutdown')\nend\n\nreturn ImGui\n";
130943
130943
 
package/dist/player.zip CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luminocity/lemonate-engine",
3
- "version": "26.3.3",
3
+ "version": "26.3.4",
4
4
  "repository": "https://codeberg.org/Luminocity/lemonate-engine",
5
5
  "homepage": "https://lemonate.io",
6
6
  "description": "The Lemonate Engine is the game engine that powers lemonate.io",