# Overview # Overview Choose a library below to view its functions, parameters, return values, errors, notes, and examples. ## Libraries | Library | Functions | | --- | ---: | | [Actors](actors.md) | 16 | | [Cache](cache.md) | 6 | | [Console](console.md) | 12 | | [Crypt](crypt.md) | 11 | | [Debug](debug.md) | 16 | | [Directory watcher](directory-watcher.md) | 1 | | [Drawing](drawing.md) | 18 | | [Environment](environment.md) | 16 | | [Filesystem](filesystem.md) | 15 | | [Filter](filter.md) | 12 | | [Hooking](hooking.md) | 15 | | [ImGui](imgui.md) | 217 | | [Input](input.md) | 13 | | [Madium signal](madium-signal.md) | 6 | | [Miscellaneous](miscellaneous.md) | 15 | | [OTH](oth.md) | 5 | | [RakNet](raknet.md) | 6 | | [Reflection](reflection.md) | 13 | | [Regex](regex.md) | 5 | | [Save instance](save-instance.md) | 3 | | [Scripts](scripts.md) | 15 | | [Signals](signals.md) | 18 | | [Table and metatable](table-and-metatable.md) | 12 | | [Time](time.md) | 15 | | [WebSocket](websocket.md) | 3 | Documented functions: **484** --- # Actors # Actors Functions for finding Actor states, running source in an Actor, and using Actor communication channels. ## Function index | Function | Summary | | --- | --- | | [`ChannelReceiver.Connect`](#channelreceiver-connect) | ChannelReceiver.Connect connects a function to the channel receiver. | | [`ChannelReceiver.Fire`](#channelreceiver-fire) | ChannelReceiver.Fire sends values through the communication channel. | | [`checkparallel`](#checkparallel) | checkparallel returns whether the current DataModel is in a parallel phase. | | [`create_comm_channel`](#create-comm-channel) | create_comm_channel creates a process-local channel shared by the main state and Actor states. | | [`get_comm_channel`](#get-comm-channel) | get_comm_channel resolves a channel ID created by create_comm_channel and returns a receiver bound to the calling state. | | [`get_current_actor`](#get-current-actor) | get_current_actor returns the Actor assigned to the current thread. | | [`getactors`](#getactors) | getactors returns every active Actor. | | [`getactorstates`](#getactorstates) | getactorstates returns every Actor Lua state. | | [`getactorthreads`](#getactorthreads) | getactorthreads returns state proxies for active Actor threads. | | [`getdeletedactors`](#getdeletedactors) | getdeletedactors returns state proxies for Actors that no longer have a live Instance. | | [`getgamestate`](#getgamestate) | getgamestate returns the main game Lua state. | | [`getluastate`](#getluastate) | getluastate returns the current state or the state associated with an Actor or script. | | [`LuaStateProxy.Execute`](#luastateproxy-execute) | LuaStateProxy.Execute runs source in the represented Lua state. | | [`LuaStateProxy.GetActors`](#luastateproxy-getactors) | LuaStateProxy.GetActors returns the Actors assigned to the state. | | [`LuaStateProxy.new`](#luastateproxy-new) | LuaStateProxy.new creates a LuaStateProxy value. | | [`run_on_actor`](#run-on-actor) | run_on_actor compiles source in the selected Actor state and forwards every value after source through varargs. | ## `ChannelReceiver.Connect` ### Description ChannelReceiver.Connect connects a function to the channel receiver. ### Syntax ```luau ChannelReceiver.Connect(callback: function) -> ScriptConnection ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `callback` | `function` | Function invoked when the event or hook runs. | ### Returns Returns `ScriptConnection`. ### Errors Raises an argument error when `callback` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Actor state availability changes as Actors start and stop. Keep the returned proxy only while its state remains valid. ### Example ```luau local receiver = get_comm_channel(1) local connection = receiver:Connect(print) -- expected: ScriptConnection ``` ## `ChannelReceiver.Fire` ### Description ChannelReceiver.Fire sends values through the communication channel. ### Syntax ```luau ChannelReceiver.Fire(...: any) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `...` | `any` | Values forwarded without changing their order or nil slots. | ### Returns This function does not return a value. ### Errors This function has no function-specific error conditions. ### Notes Actor state availability changes as Actors start and stop. Keep the returned proxy only while its state remains valid. ### Example ```luau local receiver = get_comm_channel(1) receiver:Fire("message") -- expected: the operation completes without returning a value ``` ## `checkparallel` ### Description checkparallel returns whether the current DataModel is in a parallel phase. ### Syntax ```luau checkparallel() -> boolean ``` ### Aliases `check_parallel`, `isparallel`, `is_parallel` ### Parameters This function has no parameters. ### Returns Returns true when the current DataModel is in a parallel phase, otherwise false. ### Errors This function has no function-specific error conditions. ### Notes Actor state availability changes as Actors start and stop. Keep the returned proxy only while its state remains valid. ### Example ```luau local result = checkparallel() print(result) -- expected: boolean ``` ## `create_comm_channel` ### Description create_comm_channel creates a process-local channel shared by the main state and Actor states. It returns the numeric channel ID and a ChannelReceiver for the current state. ### Syntax ```luau create_comm_channel() -> (integer, ChannelReceiver) ``` ### Aliases `createcommchannel` ### Parameters This function has no parameters. ### Returns Returns the integer channel ID followed by the ChannelReceiver for the calling state. ### Errors This function has no function-specific error conditions. ### Notes Pass the numeric ID into Actor source. ChannelReceiver objects belong to the Lua state in which they were obtained. ### Example ```luau -- On the main thread local id, channel = create_comm_channel() channel.Event:Connect(function(message) print(message) -- expected: "Hello from actor!" end) -- Inside an Actor, scheduled by run_on_actor local actor = assert(getactors()[1], "No active Actor state") run_on_actor(actor, [[ local channelId = ... local actorChannel = assert(get_comm_channel(channelId), "Unknown channel") actorChannel:Fire("Hello from actor!") ]], id) ``` ## `get_comm_channel` ### Description get_comm_channel resolves a channel ID created by create_comm_channel and returns a receiver bound to the calling state. It returns nil when the ID is unknown. ### Syntax ```luau get_comm_channel(id: integer) -> ChannelReceiver? ``` ### Aliases `getcommchannel` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `id` | `integer` | Identifier used to locate or distinguish the object. | ### Returns Returns `ChannelReceiver` when available; otherwise returns nil. ### Errors Raises an error when id is not an integer. An unknown integer ID returns nil. ### Notes Actor state availability changes as Actors start and stop. Keep the returned proxy only while its state remains valid. ### Example ```luau local id = select(1, create_comm_channel()) local channel = assert(get_comm_channel(id), "Unknown channel") channel.Event:Connect(function(message) print(message) -- expected: "ready" end) channel:Fire("ready") ``` ## `get_current_actor` ### Description get_current_actor returns the Actor assigned to the current thread. ### Syntax ```luau get_current_actor() -> Actor? ``` ### Aliases `getcurrentactor` ### Parameters This function has no parameters. ### Returns Returns `Actor` when available; otherwise returns nil. ### Errors This function has no function-specific error conditions. ### Notes Actor state availability changes as Actors start and stop. Keep the returned proxy only while its state remains valid. ### Example ```luau local result = get_current_actor() print(result) -- expected: Actor? ``` ## `getactors` ### Description getactors returns every active Actor. ### Syntax ```luau getactors() -> {Actor} ``` ### Aliases `get_actors` ### Parameters This function has no parameters. ### Returns Returns an array of `Actor` values. The array is empty when no values match. ### Errors This function has no function-specific error conditions. ### Notes Actor state availability changes as Actors start and stop. Keep the returned proxy only while its state remains valid. ### Example ```luau local result = getactors() print(result) -- expected: {Actor} ``` ## `getactorstates` ### Description getactorstates returns every Actor Lua state. ### Syntax ```luau getactorstates() -> {LuaStateProxy} ``` ### Aliases `get_actor_states` ### Parameters This function has no parameters. ### Returns Returns an array of `LuaStateProxy` values. The array is empty when no values match. ### Errors This function has no function-specific error conditions. ### Notes Actor state availability changes as Actors start and stop. Keep the returned proxy only while its state remains valid. ### Example ```luau local result = getactorstates() print(result) -- expected: {LuaStateProxy} ``` ## `getactorthreads` ### Description getactorthreads returns state proxies for active Actor threads. ### Syntax ```luau getactorthreads() -> {LuaStateProxy} ``` ### Aliases `get_actor_threads` ### Parameters This function has no parameters. ### Returns Returns an array of `LuaStateProxy` values. The array is empty when no values match. ### Errors This function has no function-specific error conditions. ### Notes Actor state availability changes as Actors start and stop. Keep the returned proxy only while its state remains valid. ### Example ```luau local result = getactorthreads() print(result) -- expected: {LuaStateProxy} ``` ## `getdeletedactors` ### Description getdeletedactors returns state proxies for Actors that no longer have a live Instance. ### Syntax ```luau getdeletedactors() -> {LuaStateProxy} ``` ### Aliases `get_deleted_actors` ### Parameters This function has no parameters. ### Returns Returns an array of `LuaStateProxy` values. The array is empty when no values match. ### Errors This function has no function-specific error conditions. ### Notes Actor state availability changes as Actors start and stop. Keep the returned proxy only while its state remains valid. ### Example ```luau local result = getdeletedactors() print(result) -- expected: {LuaStateProxy} ``` ## `getgamestate` ### Description getgamestate returns the main game Lua state. ### Syntax ```luau getgamestate() -> LuaStateProxy ``` ### Aliases `get_game_state` ### Parameters This function has no parameters. ### Returns Returns `LuaStateProxy`. ### Errors This function has no function-specific error conditions. ### Notes Actor state availability changes as Actors start and stop. Keep the returned proxy only while its state remains valid. ### Example ```luau local result = getgamestate() print(result) -- expected: LuaStateProxy ``` ## `getluastate` ### Description getluastate returns the current state or the state associated with an Actor or script. ### Syntax ```luau getluastate(owner?: Actor | LuaSourceContainer) -> LuaStateProxy? ``` ### Aliases `get_lua_state` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `owner` | `Actor | LuaSourceContainer?` | Actor or LuaSourceContainer whose Lua state should be resolved. | ### Returns Returns `LuaStateProxy` when available; otherwise returns nil. ### Errors This function has no function-specific error conditions. ### Notes Actor state availability changes as Actors start and stop. Keep the returned proxy only while its state remains valid. ### Example ```luau local result = getluastate() print(result) -- expected: LuaStateProxy? ``` ## `LuaStateProxy.Execute` ### Description LuaStateProxy.Execute runs source in the represented Lua state. ### Syntax ```luau LuaStateProxy.Execute(source: string, ...: any) -> boolean ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `source` | `string` | Luau source text compiled or scheduled by the operation. | | `...` | `any` | Values forwarded without changing their order or nil slots. | ### Returns Returns true when the operation succeeds or its condition is met; otherwise false. ### Errors Raises an argument error when `source` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Actor state availability changes as Actors start and stop. Keep the returned proxy only while its state remains valid. ### Example ```luau local state = getluastate() print(state:Execute("print('actor state')")) -- expected: boolean ``` ## `LuaStateProxy.GetActors` ### Description LuaStateProxy.GetActors returns the Actors assigned to the state. ### Syntax ```luau LuaStateProxy.GetActors() -> {Actor} ``` ### Parameters This function has no parameters. ### Returns Returns an array of `Actor` values. The array is empty when no values match. ### Errors This function has no function-specific error conditions. ### Notes Actor state availability changes as Actors start and stop. Keep the returned proxy only while its state remains valid. ### Example ```luau local state = getluastate() for _, actor in state:GetActors() do print(actor) -- expected: {Actor} end ``` ## `LuaStateProxy.new` ### Description LuaStateProxy.new creates a LuaStateProxy value. ### Syntax ```luau LuaStateProxy.new() -> LuaStateProxy ``` ### Parameters This function has no parameters. ### Returns Returns `LuaStateProxy`. ### Errors This function has no function-specific error conditions. ### Notes Actor state availability changes as Actors start and stop. Keep the returned proxy only while its state remains valid. ### Example ```luau local result = LuaStateProxy.new() print(result) -- expected: LuaStateProxy ``` ## `run_on_actor` ### Description run_on_actor compiles source in the selected Actor state and forwards every value after source through varargs. It returns true after the source is accepted for execution. ### Syntax ```luau run_on_actor(actor: Actor | LuaStateProxy, source: string, ...: any) -> boolean ``` ### Aliases `runonactor` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `actor` | `Actor | LuaStateProxy` | Actor Instance or LuaStateProxy that selects the target Actor state. | | `source` | `string` | Luau source text compiled or scheduled by the operation. | | `...` | `any` | Values forwarded without changing their order or nil slots. | ### Returns Returns true when the operation succeeds or its condition is met; otherwise false. ### Errors Raises an error when actor has no usable Actor state, source is not a string, or compilation cannot be scheduled. ### Notes Values after source are available through ... inside the Actor chunk. ### Example ```luau local actor = assert(getactors()[1], "No active Actor state") local accepted = run_on_actor(actor, [[ local message = ... print(message) -- expected: "running in actor" ]], "running in actor") print(accepted) -- expected: true ``` --- # Cache # Cache Functions for comparing Instance references and managing the Instance reference cache. ## Function index | Function | Summary | | --- | --- | | [`cache.invalidate`](#cache-invalidate) | cache.invalidate removes an Instance from the userdata cache. | | [`cache.iscached`](#cache-iscached) | cache.iscached returns whether an Instance is present in the userdata cache. | | [`cache.replace`](#cache-replace) | cache.replace replaces an Instance entry in the userdata cache. | | [`cloneref`](#cloneref) | cloneref returns a new userdata reference for an Instance. | | [`compareinstances`](#compareinstances) | compareinstances returns whether two userdata values refer to the same Instance. | | [`getinstancecache`](#getinstancecache) | getinstancecache returns the engine Instance userdata cache. | ## `cache.invalidate` ### Description cache.invalidate removes an Instance from the userdata cache. ### Syntax ```luau cache.invalidate(instance: Instance) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `instance` | `Instance` | Instance used by the operation. | ### Returns This function does not return a value. ### Errors Raises an argument error when `instance` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Cache operations affect executor-side Instance userdata. They do not change the underlying engine Instance. ### Example ```luau cache.invalidate(workspace) -- expected: the operation completes without returning a value ``` ## `cache.iscached` ### Description cache.iscached returns whether an Instance is present in the userdata cache. ### Syntax ```luau cache.iscached(instance: Instance) -> boolean ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `instance` | `Instance` | Instance used by the operation. | ### Returns Returns true when an Instance is present in the userdata cache, otherwise false. ### Errors Raises an argument error when `instance` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Cache operations affect executor-side Instance userdata. They do not change the underlying engine Instance. ### Example ```luau local result = cache.iscached(workspace) print(result) -- expected: boolean ``` ## `cache.replace` ### Description cache.replace replaces an Instance entry in the userdata cache. ### Syntax ```luau cache.replace(instance: Instance, replacement: Instance) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `instance` | `Instance` | Instance used by the operation. | | `replacement` | `Instance` | Replacement Instance or replacement text. | ### Returns This function does not return a value. ### Errors Raises an argument error when `instance` or `replacement` have an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Cache operations affect executor-side Instance userdata. They do not change the underlying engine Instance. ### Example ```luau cache.replace(workspace, workspace) -- expected: the operation completes without returning a value ``` ## `cloneref` ### Description cloneref returns a new userdata reference for an Instance. ### Syntax ```luau cloneref(instance: Instance) -> Instance ``` ### Aliases `clonereference`, `clone_ref` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `instance` | `Instance` | Instance used by the operation. | ### Returns Returns `Instance`. ### Errors Raises an argument error when `instance` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Cache operations affect executor-side Instance userdata. They do not change the underlying engine Instance. ### Example ```luau local result = cloneref(workspace) print(result) -- expected: Instance ``` ## `compareinstances` ### Description compareinstances returns whether two userdata values refer to the same Instance. ### Syntax ```luau compareinstances(left: Instance, right: Instance) -> boolean ``` ### Aliases `compare_instances` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `left` | `Instance` | First Instance reference in the comparison. | | `right` | `Instance` | Second Instance reference in the comparison. | ### Returns Returns true when two userdata values refer to the same Instance, otherwise false. ### Errors Raises an argument error when `left` or `right` have an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Cache operations affect executor-side Instance userdata. They do not change the underlying engine Instance. ### Example ```luau local result = compareinstances(workspace, workspace) print(result) -- expected: boolean ``` ## `getinstancecache` ### Description getinstancecache returns the engine Instance userdata cache. ### Syntax ```luau getinstancecache() -> table ``` ### Parameters This function has no parameters. ### Returns Returns `table`. ### Errors This function has no function-specific error conditions. ### Notes Cache operations affect executor-side Instance userdata. They do not change the underlying engine Instance. ### Example ```luau local result = getinstancecache() print(result) -- expected: table ``` --- # Console # Console Functions for opening, controlling, and writing to the executor console. ## Function index | Function | Summary | | --- | --- | | [`rconsoleclear`](#rconsoleclear) | rconsoleclear clears all text from the console window. | | [`rconsoleerr`](#rconsoleerr) | rconsoleerr writes an error message to the console. | | [`rconsolehidden`](#rconsolehidden) | rconsolehidden returns whether the console window is hidden or unavailable. | | [`rconsolehide`](#rconsolehide) | rconsolehide hides the console window without destroying its contents. | | [`rconsoleinfo`](#rconsoleinfo) | rconsoleinfo writes an information message to the console. | | [`rconsoleinput`](#rconsoleinput) | rconsoleinput yields until a line of console input is available and returns it. | | [`rconsolename`](#rconsolename) | rconsolename sets the console window title. | | [`rconsoleprint`](#rconsoleprint) | rconsoleprint writes a message to the console. | | [`rconsoleshow`](#rconsoleshow) | rconsoleshow creates the console when necessary and shows its window. | | [`rconsoletoggle`](#rconsoletoggle) | rconsoletoggle toggles the console window between its shown and hidden states. | | [`rconsoletop`](#rconsoletop) | rconsoletop sets whether the console stays above other windows. | | [`rconsolewarn`](#rconsolewarn) | rconsolewarn writes a warning message to the console. | ## `rconsoleclear` ### Description rconsoleclear clears all text from the console window. ### Syntax ```luau rconsoleclear() -> () ``` ### Aliases `consoleclear`, `rconsole_clear`, `console_clear` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors This function has no function-specific error conditions. ### Notes Console functions operate on the executor console, not Roblox's Developer Console. ### Example ```luau rconsoleclear() -- expected: the operation completes without returning a value ``` ## `rconsoleerr` ### Description rconsoleerr writes an error message to the console. ### Syntax ```luau rconsoleerr(value: any) -> () ``` ### Aliases `rconsole_err` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `value` | `any` | Value read, written, displayed, or passed to the operation. | ### Returns This function does not return a value. ### Errors Raises an argument error when `value` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Console functions operate on the executor console, not Roblox's Developer Console. ### Example ```luau rconsoleerr("sample") -- expected: the operation completes without returning a value ``` ## `rconsolehidden` ### Description rconsolehidden returns whether the console window is hidden or unavailable. ### Syntax ```luau rconsolehidden() -> boolean ``` ### Aliases `rconsole_hidden` ### Parameters This function has no parameters. ### Returns Returns true when the console window is hidden or unavailable, otherwise false. ### Errors This function has no function-specific error conditions. ### Notes Console functions operate on the executor console, not Roblox's Developer Console. ### Example ```luau local result = rconsolehidden() print(result) -- expected: boolean ``` ## `rconsolehide` ### Description rconsolehide hides the console window without destroying its contents. ### Syntax ```luau rconsolehide() -> () ``` ### Aliases `rconsoledestroy`, `consoledestroy`, `rconsole_destroy`, `console_destroy`, `rconsole_hide` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors This function has no function-specific error conditions. ### Notes Console functions operate on the executor console, not Roblox's Developer Console. ### Example ```luau rconsolehide() -- expected: the operation completes without returning a value ``` ## `rconsoleinfo` ### Description rconsoleinfo writes an information message to the console. ### Syntax ```luau rconsoleinfo(value: any) -> () ``` ### Aliases `rconsole_info` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `value` | `any` | Value read, written, displayed, or passed to the operation. | ### Returns This function does not return a value. ### Errors Raises an argument error when `value` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Console functions operate on the executor console, not Roblox's Developer Console. ### Example ```luau rconsoleinfo("sample") -- expected: the operation completes without returning a value ``` ## `rconsoleinput` ### Description rconsoleinput yields until a line of console input is available and returns it. ### Syntax ```luau rconsoleinput() -> string ``` ### Aliases `consoleinput`, `console_input`, `rconsole_input` ### Parameters This function has no parameters. ### Returns Returns `string`. ### Errors This function has no function-specific error conditions. ### Notes Console functions operate on the executor console, not Roblox's Developer Console. ### Example ```luau local result = rconsoleinput() print(result) -- expected: string ``` ## `rconsolename` ### Description rconsolename sets the console window title. ### Syntax ```luau rconsolename(title: string) -> () ``` ### Aliases `rconsolesettitle`, `consolesettitle`, `rconsole_name`, `rconsole_set_title`, `console_set_title` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `title` | `string` | Console or window title. | ### Returns This function does not return a value. ### Errors Raises an argument error when `title` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Console functions operate on the executor console, not Roblox's Developer Console. ### Example ```luau rconsolename("Documentation") -- expected: the operation completes without returning a value ``` ## `rconsoleprint` ### Description rconsoleprint writes a message to the console. ### Syntax ```luau rconsoleprint(value: any) -> () ``` ### Aliases `consoleprint`, `console_print`, `rconsole_print` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `value` | `any` | Value read, written, displayed, or passed to the operation. | ### Returns This function does not return a value. ### Errors Raises an argument error when `value` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Console functions operate on the executor console, not Roblox's Developer Console. ### Example ```luau rconsoleprint("sample") -- expected: the operation completes without returning a value ``` ## `rconsoleshow` ### Description rconsoleshow creates the console when necessary and shows its window. ### Syntax ```luau rconsoleshow() -> () ``` ### Aliases `rconsolecreate`, `consolecreate`, `rconsole_create`, `console_create`, `rconsole_show` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors This function has no function-specific error conditions. ### Notes Console functions operate on the executor console, not Roblox's Developer Console. ### Example ```luau rconsoleshow() -- expected: the operation completes without returning a value ``` ## `rconsoletoggle` ### Description rconsoletoggle toggles the console window between its shown and hidden states. ### Syntax ```luau rconsoletoggle() -> () ``` ### Aliases `rconsole_toggle` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors This function has no function-specific error conditions. ### Notes Console functions operate on the executor console, not Roblox's Developer Console. ### Example ```luau rconsoletoggle() -- expected: the operation completes without returning a value ``` ## `rconsoletop` ### Description rconsoletop sets whether the console stays above other windows. ### Syntax ```luau rconsoletop(enabled: boolean) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `enabled` | `boolean` | Whether the feature or connection should be enabled. | ### Returns This function does not return a value. ### Errors Raises an argument error when `enabled` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Console functions operate on the executor console, not Roblox's Developer Console. ### Example ```luau rconsoletop(true) -- expected: the operation completes without returning a value ``` ## `rconsolewarn` ### Description rconsolewarn writes a warning message to the console. ### Syntax ```luau rconsolewarn(value: any) -> () ``` ### Aliases `rconsole_warn` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `value` | `any` | Value read, written, displayed, or passed to the operation. | ### Returns This function does not return a value. ### Errors Raises an argument error when `value` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Console functions operate on the executor console, not Roblox's Developer Console. ### Example ```luau rconsolewarn("sample") -- expected: the operation completes without returning a value ``` --- # Crypt # Crypt Encoding, compression, hashing, random-data, and authenticated-encryption functions. ## Function index | Function | Summary | | --- | --- | | [`base64decode`](#base64decode) | base64decode converts valid Base64 text back to its original bytes and returns them in a binary-safe Luau string. | | [`base64encode`](#base64encode) | base64encode converts every byte in data to Base64 text. | | [`crypt.decrypt`](#crypt-decrypt) | crypt.decrypt decodes and decrypts Base64 ciphertext with a Base64-encoded 32-byte AES key. | | [`crypt.encrypt`](#crypt-encrypt) | crypt.encrypt encrypts data with a Base64-encoded 32-byte AES key. | | [`crypt.generatebytes`](#crypt-generatebytes) | crypt.generatebytes creates length cryptographically secure random bytes and returns their Base64 representation. | | [`crypt.generatekey`](#crypt-generatekey) | crypt.generatekey creates a cryptographically secure 32-byte AES key and returns its Base64 representation. | | [`crypt.hash`](#crypt-hash) | crypt.hash hashes data with the named algorithm. | | [`crypt.hmac`](#crypt-hmac) | crypt.hmac calculates a keyed hash. | | [`crypt.random`](#crypt-random) | crypt.random returns length cryptographically secure raw bytes in a binary Luau string. | | [`lz4compress`](#lz4compress) | lz4compress compresses data with LZ4 and returns the compressed bytes. | | [`lz4decompress`](#lz4decompress) | lz4decompress expands LZ4 data to the supplied uncompressed size and returns the original bytes. | ## `base64decode` ### Description base64decode converts valid Base64 text back to its original bytes and returns them in a binary-safe Luau string. ### Syntax ```luau base64decode(data: string) -> string ``` ### Aliases `base64_decode`, `base64.decode`, `crypt.base64decode`, `crypt.base64_decode` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `data` | `string` | Input bytes. Luau strings may contain zero bytes. | ### Returns Returns `string`. ### Errors Raises an error when data is not valid Base64 text. ### Notes Treat keys, IVs, plaintext, and authentication material as sensitive data. Do not log or share them. ### Example ```luau local decoded = base64decode("SGVsbG8=") print(decoded) -- expected: "Hello" ``` ## `base64encode` ### Description base64encode converts every byte in data to Base64 text. The input may contain zero bytes because Luau strings are binary-safe. ### Syntax ```luau base64encode(data: string) -> string ``` ### Aliases `base64_encode`, `base64.encode`, `crypt.base64encode`, `crypt.base64_encode` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `data` | `string` | Input bytes. Luau strings may contain zero bytes. | ### Returns Returns `string`. ### Errors Raises an argument error when `data` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Treat keys, IVs, plaintext, and authentication material as sensitive data. Do not log or share them. ### Example ```luau local encoded = base64encode("Hello") print(encoded) -- expected: "SGVsbG8=" ``` ## `crypt.decrypt` ### Description crypt.decrypt decodes and decrypts Base64 ciphertext with a Base64-encoded 32-byte AES key. Modes that use an IV require the same Base64 IV returned by crypt.encrypt. ### Syntax ```luau crypt.decrypt(data: string, key: string, iv: string, mode?: string) -> string ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `data` | `string` | Input bytes. Luau strings may contain zero bytes. | | `key` | `string` | Encryption or authentication key. | | `iv` | `string` | Base64-encoded initialization vector required by modes that use one. | | `mode` | `string?` | AES mode name. Defaults to CBC when omitted. | ### Returns Returns `string`. ### Errors Raises an error for invalid Base64, an invalid key or IV, an unsupported AES mode, or failed decryption. ### Notes Decryption does not prove who produced the ciphertext. Use an authenticated construction when tamper detection is required. ### Example ```luau local key = crypt.generatekey() local ciphertext, iv = crypt.encrypt("secret message", key) local plaintext = crypt.decrypt(ciphertext, key, iv) print(plaintext) -- expected: "secret message" ``` ## `crypt.encrypt` ### Description crypt.encrypt encrypts data with a Base64-encoded 32-byte AES key. It returns Base64 ciphertext and the Base64 IV used for the operation; when iv is omitted, a new IV is created for modes that require one. ### Syntax ```luau crypt.encrypt(data: string, key: string, iv: string, mode?: string) -> (string, string) ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `data` | `string` | Input bytes. Luau strings may contain zero bytes. | | `key` | `string` | Encryption or authentication key. | | `iv` | `string` | Base64-encoded initialization vector required by modes that use one. | | `mode` | `string?` | AES mode name. Defaults to CBC when omitted. | ### Returns Returns the Base64 ciphertext followed by the Base64 IV. Modes without an IV return an empty second string. ### Errors Raises an error for an invalid key, IV, or AES mode, and when encryption fails. ### Notes CBC is used when mode is omitted. Save the returned IV with the ciphertext; the IV does not need to be secret. ### Example ```luau local key = crypt.generatekey() local ciphertext, iv = crypt.encrypt("secret message", key) print(type(ciphertext)) -- expected: "string" print(type(iv)) -- expected: "string" ``` ## `crypt.generatebytes` ### Description crypt.generatebytes creates length cryptographically secure random bytes and returns their Base64 representation. length must be between 0 and 512. ### Syntax ```luau crypt.generatebytes(length: integer) -> string ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `length` | `integer` | Number of bytes requested. | ### Returns Returns `string`. ### Errors Raises an error when length is outside 0 through 512 or secure random bytes cannot be obtained. ### Notes The returned text is suitable for transport or storage. Decode it before using the bytes directly. Keys should be stored securely and not shared. ### Example ```luau local encoded = crypt.generatebytes(32) local bytes = base64decode(encoded) print(#bytes) -- expected: 32 ``` ## `crypt.generatekey` ### Description crypt.generatekey creates a cryptographically secure 32-byte AES key and returns its Base64 representation. ### Syntax ```luau crypt.generatekey() -> string ``` ### Parameters This function has no parameters. ### Returns Returns `string`. ### Errors Raises an error when secure random bytes cannot be obtained. ### Notes The key is suitable for AES encryption. Store it securely and do not share or log it. ### Example ```luau local key = crypt.generatekey() local rawKey = base64decode(key) print(#rawKey) -- expected: 32 ``` ## `crypt.hash` ### Description crypt.hash hashes data with the named algorithm. ### Syntax ```luau crypt.hash(data: string, algorithm: string) -> string ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `data` | `string` | Input bytes. Luau strings may contain zero bytes. | | `algorithm` | `string` | Algorithm name. Supported names depend on the operation. | ### Returns Returns `string`. ### Errors Raises an argument error when `data` or `algorithm` have an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Treat keys, IVs, plaintext, and authentication material as sensitive data. Do not log or share them. ### Example ```luau local digest = crypt.hash("Hello", "sha256") print(type(digest)) -- expected: "string" print(#digest > 0) -- expected: true ``` ## `crypt.hmac` ### Description crypt.hmac calculates a keyed hash. ### Syntax ```luau crypt.hmac(data: string, key: string, algorithm: string) -> string ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `data` | `string` | Input bytes. Luau strings may contain zero bytes. | | `key` | `string` | Encryption or authentication key. | | `algorithm` | `string` | Algorithm name. Supported names depend on the operation. | ### Returns Returns `string`. ### Errors Raises an argument error when `data` or `key` or `algorithm` have an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Treat keys, IVs, plaintext, and authentication material as sensitive data. Do not log or share them. ### Example ```luau local mac = crypt.hmac("secret-key", "message", "sha256") print(type(mac)) -- expected: "string" print(#mac > 0) -- expected: true ``` ## `crypt.random` ### Description crypt.random returns length cryptographically secure raw bytes in a binary Luau string. length must be between 0 and 512. ### Syntax ```luau crypt.random(length: integer) -> string ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `length` | `integer` | Number of bytes requested. | ### Returns Returns `string`. ### Errors Raises an error when length is outside 0 through 512 or secure random bytes cannot be obtained. ### Notes The result is raw binary data and may not be valid UTF-8. Use crypt.generatebytes when Base64 text is required. ### Example ```luau local bytes = crypt.random(16) print(#bytes) -- expected: 16 ``` ## `lz4compress` ### Description lz4compress compresses data with LZ4 and returns the compressed bytes. The result is binary data, not Base64 text. ### Syntax ```luau lz4compress(data: string) -> string ``` ### Aliases `lz4_compress`, `lz4.compress`, `crypt.lz4compress` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `data` | `string` | Input bytes. Luau strings may contain zero bytes. | ### Returns Returns `string`. ### Errors Raises an argument error when `data` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Treat keys, IVs, plaintext, and authentication material as sensitive data. Do not log or share them. ### Example ```luau local source = string.rep("Madium", 64) local compressed = lz4compress(source) print(#compressed < #source) -- expected: true for this repeated input ``` ## `lz4decompress` ### Description lz4decompress expands LZ4 data to the supplied uncompressed size and returns the original bytes. ### Syntax ```luau lz4decompress(data: string, size: integer) -> string ``` ### Aliases `lz4_decompress`, `lz4.decompress`, `crypt.lz4decompress` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `data` | `string` | Input bytes. Luau strings may contain zero bytes. | | `size` | `integer` | Requested size, byte count, or dimensions. | ### Returns Returns `string`. ### Errors Raises an error when size is negative or data cannot be decompressed to that size. ### Notes Treat keys, IVs, plaintext, and authentication material as sensitive data. Do not log or share them. ### Example ```luau local source = string.rep("Madium", 64) local compressed = lz4compress(source) local restored = lz4decompress(compressed, #source) print(restored == source) -- expected: true ``` --- # Debug # Debug Functions for reading and changing Luau stack frames, constants, upvalues, and nested protos. ## Function index | Function | Summary | | --- | --- | | [`debug.getcallstack`](#debug-getcallstack) | debug.getcallstack gets visible call frames from the current thread or another thread. | | [`debug.getconstant`](#debug-getconstant) | debug.getconstant returns one constant from a Luau closure. | | [`debug.getconstants`](#debug-getconstants) | debug.getconstants returns the constants from a Luau closure. | | [`debug.getinfo`](#debug-getinfo) | debug.getinfo returns debug information for a function or stack level. | | [`debug.getmetatable`](#debug-getmetatable) | debug.getmetatable returns a value's metatable. | | [`debug.getproto`](#debug-getproto) | debug.getproto returns a nested proto. | | [`debug.getprotos`](#debug-getprotos) | debug.getprotos returns every nested proto. | | [`debug.getregistry`](#debug-getregistry) | debug.getregistry returns the Lua registry table. | | [`debug.getstack`](#debug-getstack) | debug.getstack returns one stack value or all values at a stack level. | | [`debug.getupvalue`](#debug-getupvalue) | debug.getupvalue returns one upvalue. | | [`debug.getupvalues`](#debug-getupvalues) | debug.getupvalues returns every upvalue. | | [`debug.setconstant`](#debug-setconstant) | debug.setconstant replaces one constant. | | [`debug.setmetatable`](#debug-setmetatable) | debug.setmetatable sets a value's metatable and returns the value. | | [`debug.setstack`](#debug-setstack) | debug.setstack replaces one stack value. | | [`debug.setupvalue`](#debug-setupvalue) | debug.setupvalue replaces one upvalue. | | [`debug.validlevel`](#debug-validlevel) | debug.validlevel returns whether a stack level exists. | ## `debug.getcallstack` ### Description debug.getcallstack gets visible call frames from the current thread or another thread. ### Syntax ```luau debug.getcallstack(thread: thread) -> table | integer ``` ### Aliases `getcallstack`, `get_callstack` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `thread` | `thread` | Luau thread inspected by the operation. | ### Returns Returns `table | integer`. ### Errors Raises an argument error when `thread` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Stack levels and numeric indices are one-based unless the entry says otherwise. A stack can change after a yield. ### Example ```luau local result = debug.getcallstack(coroutine.running()) print(result) -- expected: table | integer ``` ## `debug.getconstant` ### Description debug.getconstant returns one constant from a Luau closure. ### Syntax ```luau debug.getconstant(func_or_level: function | integer, index: integer) -> any ``` ### Aliases `getconstant`, `get_constant` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `func_or_level` | `function | integer` | Function or stack level selecting a Luau closure. | | `index` | `integer` | One-based element, constant, upvalue, proto, or stack-slot index. | ### Returns Returns `any`. ### Errors Raises an argument error when `func_or_level` or `index` have an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Stack levels and numeric indices are one-based unless the entry says otherwise. A stack can change after a yield. ### Example ```luau local function target() return "constant" end print(debug.getconstant(target, 1)) -- expected: any ``` ## `debug.getconstants` ### Description debug.getconstants returns the constants from a Luau closure. ### Syntax ```luau debug.getconstants(func_or_level: function | integer) -> {any} ``` ### Aliases `getconstants`, `get_constants` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `func_or_level` | `function | integer` | Function or stack level selecting a Luau closure. | ### Returns Returns an array of `any` values. The array is empty when no values match. ### Errors Raises an argument error when `func_or_level` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Stack levels and numeric indices are one-based unless the entry says otherwise. A stack can change after a yield. ### Example ```luau local function target() return "constant" end for index, value in debug.getconstants(target) do print(index, value) -- expected: {any} end ``` ## `debug.getinfo` ### Description debug.getinfo returns debug information for a function or stack level. ### Syntax ```luau debug.getinfo(func_or_level: function | integer) -> table ``` ### Aliases `getinfo`, `get_info` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `func_or_level` | `function | integer` | Function or stack level selecting a Luau closure. | ### Returns Returns `table`. ### Errors Raises an argument error when `func_or_level` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Stack levels and numeric indices are one-based unless the entry says otherwise. A stack can change after a yield. ### Example ```luau local info = debug.getinfo(function() end) print(info.source) -- expected: table ``` ## `debug.getmetatable` ### Description debug.getmetatable returns a value's metatable. ### Syntax ```luau debug.getmetatable(value: any) -> table? ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `value` | `any` | Value read, written, displayed, or passed to the operation. | ### Returns Returns `table` when available; otherwise returns nil. ### Errors Raises an argument error when `value` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Stack levels and numeric indices are one-based unless the entry says otherwise. A stack can change after a yield. ### Example ```luau local value = setmetatable({}, {}) print(debug.getmetatable(value)) -- expected: table? ``` ## `debug.getproto` ### Description debug.getproto returns a nested proto. ### Syntax ```luau debug.getproto(func_or_level: function | integer, index: integer, activated?: boolean) -> ProtoProxy ``` ### Aliases `getproto`, `get_proto` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `func_or_level` | `function | integer` | Function or stack level selecting a Luau closure. | | `index` | `integer` | One-based element, constant, upvalue, proto, or stack-slot index. | | `activated` | `boolean?` | Initial active state of the proto returned by debug.getproto. | ### Returns Returns `ProtoProxy`. ### Errors Raises an argument error when `func_or_level` or `index` have an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Stack levels and numeric indices are one-based unless the entry says otherwise. A stack can change after a yield. ### Example ```luau local function outer() local function inner() return 1 end return inner end print(debug.getproto(outer, 1)) -- expected: ProtoProxy ``` ## `debug.getprotos` ### Description debug.getprotos returns every nested proto. ### Syntax ```luau debug.getprotos(func_or_level: function | integer) -> {ProtoProxy} ``` ### Aliases `getprotos`, `get_protos` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `func_or_level` | `function | integer` | Function or stack level selecting a Luau closure. | ### Returns Returns an array of `ProtoProxy` values. The array is empty when no values match. ### Errors Raises an argument error when `func_or_level` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Stack levels and numeric indices are one-based unless the entry says otherwise. A stack can change after a yield. ### Example ```luau local function outer() local function inner() return 1 end return inner end for _, proto in debug.getprotos(outer) do print(proto) -- expected: {ProtoProxy} end ``` ## `debug.getregistry` ### Description debug.getregistry returns the Lua registry table. ### Syntax ```luau debug.getregistry() -> table ``` ### Parameters This function has no parameters. ### Returns Returns `table`. ### Errors This function has no function-specific error conditions. ### Notes Stack levels and numeric indices are one-based unless the entry says otherwise. A stack can change after a yield. ### Example ```luau local result = debug.getregistry() print(result) -- expected: table ``` ## `debug.getstack` ### Description debug.getstack returns one stack value or all values at a stack level. ### Syntax ```luau debug.getstack(level: integer, index?: integer) -> any | {any} ``` ### Aliases `getstack`, `get_stack` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `level` | `integer` | Stack level relative to the current call. | | `index` | `integer?` | One-based element, constant, upvalue, proto, or stack-slot index. | ### Returns Returns `any | {any}`. ### Errors Raises an argument error when `level` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Stack levels and numeric indices are one-based unless the entry says otherwise. A stack can change after a yield. ### Example ```luau local result = debug.getstack(1) print(result) -- expected: any | {any} ``` ## `debug.getupvalue` ### Description debug.getupvalue returns one upvalue. ### Syntax ```luau debug.getupvalue(func_or_level: function | integer, index: integer) -> any ``` ### Aliases `getupvalue`, `get_upvalue` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `func_or_level` | `function | integer` | Function or stack level selecting a Luau closure. | | `index` | `integer` | One-based element, constant, upvalue, proto, or stack-slot index. | ### Returns Returns `any`. ### Errors Raises an argument error when `func_or_level` or `index` have an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Stack levels and numeric indices are one-based unless the entry says otherwise. A stack can change after a yield. ### Example ```luau local value = 10 local function target() return value end print(debug.getupvalue(target, 1)) -- expected: any ``` ## `debug.getupvalues` ### Description debug.getupvalues returns every upvalue. ### Syntax ```luau debug.getupvalues(func_or_level: function | integer) -> {any} ``` ### Aliases `getupvalues`, `get_upvalues` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `func_or_level` | `function | integer` | Function or stack level selecting a Luau closure. | ### Returns Returns an array of `any` values. The array is empty when no values match. ### Errors Raises an argument error when `func_or_level` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Stack levels and numeric indices are one-based unless the entry says otherwise. A stack can change after a yield. ### Example ```luau local value = 10 local function target() return value end print(debug.getupvalues(target)) -- expected: {any} ``` ## `debug.setconstant` ### Description debug.setconstant replaces one constant. ### Syntax ```luau debug.setconstant(func_or_level: function | integer, index: integer, value: any) -> () ``` ### Aliases `setconstant`, `set_constant` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `func_or_level` | `function | integer` | Function or stack level selecting a Luau closure. | | `index` | `integer` | One-based element, constant, upvalue, proto, or stack-slot index. | | `value` | `any` | Value read, written, displayed, or passed to the operation. | ### Returns This function does not return a value. ### Errors Raises an argument error when `func_or_level` or `index` or `value` have an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Stack levels and numeric indices are one-based unless the entry says otherwise. A stack can change after a yield. ### Example ```luau local function target() return "old" end debug.setconstant(target, 1, "new") print(target()) -- expected: the operation completes without returning a value ``` ## `debug.setmetatable` ### Description debug.setmetatable sets a value's metatable and returns the value. ### Syntax ```luau debug.setmetatable(value: any, metatable: table?) -> any ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `value` | `any` | Value read, written, displayed, or passed to the operation. | | `metatable` | `table?` | Replacement metatable, or nil where removal is supported. | ### Returns Returns `any`. ### Errors Raises an argument error when `value` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Stack levels and numeric indices are one-based unless the entry says otherwise. A stack can change after a yield. ### Example ```luau local value = {} debug.setmetatable(value, { __index = { Enabled = true } }) print(value.Enabled) -- expected: any ``` ## `debug.setstack` ### Description debug.setstack replaces one stack value. ### Syntax ```luau debug.setstack(level: integer, index: integer, value: any) -> () ``` ### Aliases `setstack`, `set_stack` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `level` | `integer` | Stack level relative to the current call. | | `index` | `integer` | One-based element, constant, upvalue, proto, or stack-slot index. | | `value` | `any` | Value read, written, displayed, or passed to the operation. | ### Returns This function does not return a value. ### Errors Raises an argument error when `level` or `index` or `value` have an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Stack levels and numeric indices are one-based unless the entry says otherwise. A stack can change after a yield. ### Example ```luau local function target() local value = 1 debug.setstack(0, 1, 2) return value end print(target()) -- expected: the operation completes without returning a value ``` ## `debug.setupvalue` ### Description debug.setupvalue replaces one upvalue. ### Syntax ```luau debug.setupvalue(func_or_level: function | integer, index: integer, value: any) -> () ``` ### Aliases `setupvalue`, `set_upvalue` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `func_or_level` | `function | integer` | Function or stack level selecting a Luau closure. | | `index` | `integer` | One-based element, constant, upvalue, proto, or stack-slot index. | | `value` | `any` | Value read, written, displayed, or passed to the operation. | ### Returns This function does not return a value. ### Errors Raises an argument error when `func_or_level` or `index` or `value` have an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Stack levels and numeric indices are one-based unless the entry says otherwise. A stack can change after a yield. ### Example ```luau local value = 1 local function target() return value end debug.setupvalue(target, 1, 2) print(target()) -- expected: the operation completes without returning a value ``` ## `debug.validlevel` ### Description debug.validlevel returns whether a stack level exists. ### Syntax ```luau debug.validlevel(level: integer, thread?: thread) -> boolean ``` ### Aliases `debug.isvalidlevel`, `validlevel`, `isvalidlevel`, `valid_level`, `is_valid_level` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `level` | `integer` | Stack level relative to the current call. | | `thread` | `thread?` | Luau thread inspected by the operation. | ### Returns Returns true when a stack level exists, otherwise false. ### Errors Raises an argument error when `level` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Stack levels and numeric indices are one-based unless the entry says otherwise. A stack can change after a yield. ### Example ```luau local result = debug.validlevel(1) print(result) -- expected: boolean ``` ## `ProtoProxy` properties | Member | Type | Access | Description | | --- | --- | --- | --- | | `CodeHash` | `integer` | Read-only | Hash of the represented proto's bytecode. | --- # Directory Watcher # Directory watcher A Windows directory monitor that reports file changes through signal properties. ## Function index | Function | Summary | | --- | --- | | [`DirectoryWatcher.new`](#directorywatcher-new) | DirectoryWatcher.new starts monitoring path and returns a watcher with change, creation, deletion, rename, and overflow signals. | ## `DirectoryWatcher.new` ### Description DirectoryWatcher.new starts monitoring path and returns a watcher with change, creation, deletion, rename, and overflow signals. recursive defaults to true. ### Syntax ```luau DirectoryWatcher.new(path: string, recursive?: boolean) -> DirectoryWatcher ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `path` | `string` | Workspace-relative file or directory path. | | `recursive` | `boolean?` | Whether changes in child directories are watched. Defaults to true. | ### Returns Returns `DirectoryWatcher`. ### Errors Raises an error when path is invalid, outside the workspace, or cannot be watched by the operating system. ### Notes Watcher events are delivered asynchronously. Disconnect listeners when the watcher is no longer needed. ### Example ```luau makefolder("watcher-demo") local watcher = DirectoryWatcher.new("watcher-demo", true) watcher.OnCreated:Connect(function(path) print(path) -- expected: path ending in "created.txt" end) writefile("watcher-demo/created.txt", "created") ``` ## `DirectoryWatcher` properties and events | Member | Type | Access | Description | | --- | --- | --- | --- | | `Path` | `string` | Read-only | Watched path. | | `Recursive` | `boolean` | Read/write | Whether subdirectories are watched. | | `OnChanged` | `MadiumSignal` | Read-only | Fires when file contents change. | | `OnCreated` | `MadiumSignal` | Read-only | Fires when a file or directory is created. | | `OnDeleted` | `MadiumSignal` | Read-only | Fires when a file or directory is deleted. | | `OnRenamed` | `MadiumSignal` | Read-only | Fires when a file or directory is renamed. | | `OnOverflow` | `MadiumSignal` | Read-only | Fires when Windows reports a watcher-buffer overflow. | --- # Drawing # Drawing Retained Drawing objects and immediate drawing commands. ## Function index | Function | Summary | | --- | --- | | [`cleardrawcache`](#cleardrawcache) | cleardrawcache removes every live Drawing object. | | [`Drawing.new`](#drawing-new) | Drawing.new creates a Drawing object of the requested type. | | [`DrawingImmediate.Circle`](#drawingimmediate-circle) | DrawingImmediate.Circle draws a circle outline. | | [`DrawingImmediate.FilledCircle`](#drawingimmediate-filledcircle) | DrawingImmediate.FilledCircle draws a filled circle. | | [`DrawingImmediate.FilledQuad`](#drawingimmediate-filledquad) | DrawingImmediate.FilledQuad draws a filled four-point shape. | | [`DrawingImmediate.FilledRectangle`](#drawingimmediate-filledrectangle) | DrawingImmediate.FilledRectangle draws a filled rectangle. | | [`DrawingImmediate.FilledTriangle`](#drawingimmediate-filledtriangle) | DrawingImmediate.FilledTriangle draws a filled triangle. | | [`DrawingImmediate.GetPaint`](#drawingimmediate-getpaint) | DrawingImmediate.GetPaint returns the render signal for z_index. | | [`DrawingImmediate.Line`](#drawingimmediate-line) | DrawingImmediate.Line draws a line. | | [`DrawingImmediate.OutlinedText`](#drawingimmediate-outlinedtext) | DrawingImmediate.OutlinedText draws text with an outline. | | [`DrawingImmediate.Quad`](#drawingimmediate-quad) | DrawingImmediate.Quad draws a four-point outline. | | [`DrawingImmediate.Rectangle`](#drawingimmediate-rectangle) | DrawingImmediate.Rectangle draws a rectangle outline. | | [`DrawingImmediate.Text`](#drawingimmediate-text) | DrawingImmediate.Text draws text. | | [`DrawingImmediate.Triangle`](#drawingimmediate-triangle) | DrawingImmediate.Triangle draws a triangle outline. | | [`DrawingObject.Remove`](#drawingobject-remove) | DrawingObject.Remove removes the Drawing object. | | [`getrenderproperty`](#getrenderproperty) | getrenderproperty returns a Drawing object property. | | [`isrenderobj`](#isrenderobj) | isrenderobj returns whether a value is a Drawing object. | | [`setrenderproperty`](#setrenderproperty) | setrenderproperty sets a Drawing object property. | ## `cleardrawcache` ### Description cleardrawcache removes every live Drawing object. ### Syntax ```luau cleardrawcache() -> () ``` ### Aliases `clear_draw_cache` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors This function has no function-specific error conditions. ### Notes DrawingImmediate calls are valid only inside a callback connected to DrawingImmediate.GetPaint. ### Example ```luau cleardrawcache() -- expected: the operation completes without returning a value ``` ## `Drawing.new` ### Description Drawing.new creates a Drawing object of the requested type. ### Syntax ```luau Drawing.new(drawing_type: "Line" | "Circle" | "Square" | "Triangle" | "Text" | "Image" | "Quad") -> DrawingObject ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `drawing_type` | `"Line" | "Circle" | "Square" | "Triangle" | "Text" | "Image" | "Quad"` | Drawing primitive name passed to Drawing.new. | ### Returns Returns `DrawingObject`. ### Errors Raises an argument error when `drawing_type` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes DrawingImmediate calls are valid only inside a callback connected to DrawingImmediate.GetPaint. ### Example ```luau local result = Drawing.new("Line") print(result) -- expected: DrawingObject ``` ## `DrawingImmediate.Circle` ### Description DrawingImmediate.Circle draws a circle outline. ### Syntax ```luau DrawingImmediate.Circle(point_a: Vector2, radius: number, color: Color3, opacity: number, sides: integer, thickness: number) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `point_a` | `Vector2` | Screen-space point used by the primitive. | | `radius` | `number` | Circle radius in screen pixels. | | `color` | `Color3` | Color applied to the item. | | `opacity` | `number` | Opacity from 0 for transparent to 1 for opaque. | | `sides` | `integer` | Number of line segments used to approximate the circle. | | `thickness` | `number` | Stroke width in screen pixels. | ### Returns This function does not return a value. ### Errors Raises an error when called outside a `DrawingImmediate.GetPaint` callback or when a supplied drawing value is invalid. ### Notes DrawingImmediate calls are valid only inside a callback connected to DrawingImmediate.GetPaint. ### Example ```luau local paint = DrawingImmediate.GetPaint(0) local connection = paint:Connect(function() DrawingImmediate.Circle(Vector2.new(20, 20), 1.0, Color3.fromRGB(255, 255, 255), 1.0, 1, 1.0) -- expected: the operation completes without returning a value end) ``` ## `DrawingImmediate.FilledCircle` ### Description DrawingImmediate.FilledCircle draws a filled circle. ### Syntax ```luau DrawingImmediate.FilledCircle(point_a: Vector2, radius: number, color: Color3, sides: integer, opacity: number) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `point_a` | `Vector2` | Screen-space point used by the primitive. | | `radius` | `number` | Circle radius in screen pixels. | | `color` | `Color3` | Color applied to the item. | | `sides` | `integer` | Number of line segments used to approximate the circle. | | `opacity` | `number` | Opacity from 0 for transparent to 1 for opaque. | ### Returns This function does not return a value. ### Errors Raises an error when called outside a `DrawingImmediate.GetPaint` callback or when a supplied drawing value is invalid. ### Notes DrawingImmediate calls are valid only inside a callback connected to DrawingImmediate.GetPaint. ### Example ```luau local paint = DrawingImmediate.GetPaint(0) local connection = paint:Connect(function() DrawingImmediate.FilledCircle(Vector2.new(20, 20), 1.0, Color3.fromRGB(255, 255, 255), 1, 1.0) -- expected: the operation completes without returning a value end) ``` ## `DrawingImmediate.FilledQuad` ### Description DrawingImmediate.FilledQuad draws a filled four-point shape. ### Syntax ```luau DrawingImmediate.FilledQuad(point_a: Vector2, point_b: Vector2, point_c: Vector2, point_d: Vector2, color: Color3, opacity: number) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `point_a` | `Vector2` | Screen-space point used by the primitive. | | `point_b` | `Vector2` | Screen-space point used by the primitive. | | `point_c` | `Vector2` | Screen-space point used by the primitive. | | `point_d` | `Vector2` | Screen-space point used by the primitive. | | `color` | `Color3` | Color applied to the item. | | `opacity` | `number` | Opacity from 0 for transparent to 1 for opaque. | ### Returns This function does not return a value. ### Errors Raises an error when called outside a `DrawingImmediate.GetPaint` callback or when a supplied drawing value is invalid. ### Notes DrawingImmediate calls are valid only inside a callback connected to DrawingImmediate.GetPaint. ### Example ```luau local paint = DrawingImmediate.GetPaint(0) local connection = paint:Connect(function() DrawingImmediate.FilledQuad(Vector2.new(20, 20), Vector2.new(120, 20), Vector2.new(120, 80), Vector2.new(20, 80), Color3.fromRGB(255, 255, 255), 1.0) -- expected: the operation completes without returning a value end) ``` ## `DrawingImmediate.FilledRectangle` ### Description DrawingImmediate.FilledRectangle draws a filled rectangle. ### Syntax ```luau DrawingImmediate.FilledRectangle(point_a: Vector2, point_b: Vector2, color: Color3, opacity: number, rounding: number) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `point_a` | `Vector2` | Screen-space point used by the primitive. | | `point_b` | `Vector2` | Screen-space point used by the primitive. | | `color` | `Color3` | Color applied to the item. | | `opacity` | `number` | Opacity from 0 for transparent to 1 for opaque. | | `rounding` | `number` | Corner radius in screen pixels. | ### Returns This function does not return a value. ### Errors Raises an error when called outside a `DrawingImmediate.GetPaint` callback or when a supplied drawing value is invalid. ### Notes DrawingImmediate calls are valid only inside a callback connected to DrawingImmediate.GetPaint. ### Example ```luau local paint = DrawingImmediate.GetPaint(0) local connection = paint:Connect(function() DrawingImmediate.FilledRectangle(Vector2.new(20, 20), Vector2.new(120, 20), Color3.fromRGB(255, 255, 255), 1.0, 1.0) -- expected: the operation completes without returning a value end) ``` ## `DrawingImmediate.FilledTriangle` ### Description DrawingImmediate.FilledTriangle draws a filled triangle. ### Syntax ```luau DrawingImmediate.FilledTriangle(point_a: Vector2, point_b: Vector2, point_c: Vector2, color: Color3, opacity: number) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `point_a` | `Vector2` | Screen-space point used by the primitive. | | `point_b` | `Vector2` | Screen-space point used by the primitive. | | `point_c` | `Vector2` | Screen-space point used by the primitive. | | `color` | `Color3` | Color applied to the item. | | `opacity` | `number` | Opacity from 0 for transparent to 1 for opaque. | ### Returns This function does not return a value. ### Errors Raises an error when called outside a `DrawingImmediate.GetPaint` callback or when a supplied drawing value is invalid. ### Notes DrawingImmediate calls are valid only inside a callback connected to DrawingImmediate.GetPaint. ### Example ```luau local paint = DrawingImmediate.GetPaint(0) local connection = paint:Connect(function() DrawingImmediate.FilledTriangle(Vector2.new(20, 20), Vector2.new(120, 20), Vector2.new(120, 80), Color3.fromRGB(255, 255, 255), 1.0) -- expected: the operation completes without returning a value end) ``` ## `DrawingImmediate.GetPaint` ### Description DrawingImmediate.GetPaint returns the render signal for z_index. DrawingImmediate commands are accepted only while one of these callbacks is running. ### Syntax ```luau DrawingImmediate.GetPaint(z_index: integer) -> MadiumSignal ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `z_index` | `integer` | Paint order. Lower values run before higher values. | ### Returns Returns `MadiumSignal`. ### Errors Raises an error when called outside a `DrawingImmediate.GetPaint` callback or when a supplied drawing value is invalid. ### Notes DrawingImmediate calls are valid only inside a callback connected to DrawingImmediate.GetPaint. ### Example ```luau local result = DrawingImmediate.GetPaint(1) print(result) -- expected: MadiumSignal ``` ## `DrawingImmediate.Line` ### Description DrawingImmediate.Line draws a line. ### Syntax ```luau DrawingImmediate.Line(point_a: Vector2, point_b: Vector2, color: Color3, opacity: number, thickness: number) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `point_a` | `Vector2` | Screen-space point used by the primitive. | | `point_b` | `Vector2` | Screen-space point used by the primitive. | | `color` | `Color3` | Color applied to the item. | | `opacity` | `number` | Opacity from 0 for transparent to 1 for opaque. | | `thickness` | `number` | Stroke width in screen pixels. | ### Returns This function does not return a value. ### Errors Raises an error when called outside a `DrawingImmediate.GetPaint` callback or when a supplied drawing value is invalid. ### Notes DrawingImmediate calls are valid only inside a callback connected to DrawingImmediate.GetPaint. ### Example ```luau local paint = DrawingImmediate.GetPaint(0) local connection = paint:Connect(function() DrawingImmediate.Line(Vector2.new(20, 20), Vector2.new(120, 20), Color3.fromRGB(255, 255, 255), 1.0, 1.0) -- expected: the operation completes without returning a value end) ``` ## `DrawingImmediate.OutlinedText` ### Description DrawingImmediate.OutlinedText draws text with an outline. ### Syntax ```luau DrawingImmediate.OutlinedText(point_a: Vector2, font: integer, font_size: number, color: Color3, opacity: number, outline_color: Color3, outline_opacity: number, text: string, centered: boolean) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `point_a` | `Vector2` | Screen-space point used by the primitive. | | `font` | `integer` | Drawing font identifier. | | `font_size` | `number` | Font height in screen pixels. | | `color` | `Color3` | Color applied to the item. | | `opacity` | `number` | Opacity from 0 for transparent to 1 for opaque. | | `outline_color` | `Color3` | Color used for the text outline. | | `outline_opacity` | `number` | Outline opacity from 0 for transparent to 1 for opaque. | | `text` | `string` | Text displayed or copied by the operation. | | `centered` | `boolean` | Whether the text position is treated as its horizontal center. | ### Returns This function does not return a value. ### Errors Raises an error when called outside a `DrawingImmediate.GetPaint` callback or when a supplied drawing value is invalid. ### Notes DrawingImmediate calls are valid only inside a callback connected to DrawingImmediate.GetPaint. ### Example ```luau local paint = DrawingImmediate.GetPaint(0) local connection = paint:Connect(function() DrawingImmediate.OutlinedText(Vector2.new(20, 20), 1, 14, Color3.fromRGB(255, 255, 255), 1.0, Color3.fromRGB(255, 255, 255), 1.0, "sample", true) -- expected: the operation completes without returning a value end) ``` ## `DrawingImmediate.Quad` ### Description DrawingImmediate.Quad draws a four-point outline. ### Syntax ```luau DrawingImmediate.Quad(point_a: Vector2, point_b: Vector2, point_c: Vector2, point_d: Vector2, color: Color3, opacity: number, thickness: number) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `point_a` | `Vector2` | Screen-space point used by the primitive. | | `point_b` | `Vector2` | Screen-space point used by the primitive. | | `point_c` | `Vector2` | Screen-space point used by the primitive. | | `point_d` | `Vector2` | Screen-space point used by the primitive. | | `color` | `Color3` | Color applied to the item. | | `opacity` | `number` | Opacity from 0 for transparent to 1 for opaque. | | `thickness` | `number` | Stroke width in screen pixels. | ### Returns This function does not return a value. ### Errors Raises an error when called outside a `DrawingImmediate.GetPaint` callback or when a supplied drawing value is invalid. ### Notes DrawingImmediate calls are valid only inside a callback connected to DrawingImmediate.GetPaint. ### Example ```luau local paint = DrawingImmediate.GetPaint(0) local connection = paint:Connect(function() DrawingImmediate.Quad(Vector2.new(20, 20), Vector2.new(120, 20), Vector2.new(120, 80), Vector2.new(20, 80), Color3.fromRGB(255, 255, 255), 1.0, 1.0) -- expected: the operation completes without returning a value end) ``` ## `DrawingImmediate.Rectangle` ### Description DrawingImmediate.Rectangle draws a rectangle outline. ### Syntax ```luau DrawingImmediate.Rectangle(point_a: Vector2, point_b: Vector2, color: Color3, opacity: number, rounding: number, thickness: number) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `point_a` | `Vector2` | Screen-space point used by the primitive. | | `point_b` | `Vector2` | Screen-space point used by the primitive. | | `color` | `Color3` | Color applied to the item. | | `opacity` | `number` | Opacity from 0 for transparent to 1 for opaque. | | `rounding` | `number` | Corner radius in screen pixels. | | `thickness` | `number` | Stroke width in screen pixels. | ### Returns This function does not return a value. ### Errors Raises an error when called outside a `DrawingImmediate.GetPaint` callback or when a supplied drawing value is invalid. ### Notes DrawingImmediate calls are valid only inside a callback connected to DrawingImmediate.GetPaint. ### Example ```luau local paint = DrawingImmediate.GetPaint(0) local connection = paint:Connect(function() DrawingImmediate.Rectangle(Vector2.new(20, 20), Vector2.new(120, 20), Color3.fromRGB(255, 255, 255), 1.0, 1.0, 1.0) -- expected: the operation completes without returning a value end) ``` ## `DrawingImmediate.Text` ### Description DrawingImmediate.Text draws text. ### Syntax ```luau DrawingImmediate.Text(point_a: Vector2, font: integer, font_size: number, color: Color3, opacity: number, text: string, centered: boolean) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `point_a` | `Vector2` | Screen-space point used by the primitive. | | `font` | `integer` | Drawing font identifier. | | `font_size` | `number` | Font height in screen pixels. | | `color` | `Color3` | Color applied to the item. | | `opacity` | `number` | Opacity from 0 for transparent to 1 for opaque. | | `text` | `string` | Text displayed or copied by the operation. | | `centered` | `boolean` | Whether the text position is treated as its horizontal center. | ### Returns This function does not return a value. ### Errors Raises an error when called outside a `DrawingImmediate.GetPaint` callback or when a supplied drawing value is invalid. ### Notes DrawingImmediate calls are valid only inside a callback connected to DrawingImmediate.GetPaint. ### Example ```luau local paint = DrawingImmediate.GetPaint(0) local connection = paint:Connect(function() DrawingImmediate.Text(Vector2.new(20, 20), 1, 14, Color3.fromRGB(255, 255, 255), 1.0, "sample", true) -- expected: the operation completes without returning a value end) ``` ## `DrawingImmediate.Triangle` ### Description DrawingImmediate.Triangle draws a triangle outline. ### Syntax ```luau DrawingImmediate.Triangle(point_a: Vector2, point_b: Vector2, point_c: Vector2, color: Color3, opacity: number, thickness: number) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `point_a` | `Vector2` | Screen-space point used by the primitive. | | `point_b` | `Vector2` | Screen-space point used by the primitive. | | `point_c` | `Vector2` | Screen-space point used by the primitive. | | `color` | `Color3` | Color applied to the item. | | `opacity` | `number` | Opacity from 0 for transparent to 1 for opaque. | | `thickness` | `number` | Stroke width in screen pixels. | ### Returns This function does not return a value. ### Errors Raises an error when called outside a `DrawingImmediate.GetPaint` callback or when a supplied drawing value is invalid. ### Notes DrawingImmediate calls are valid only inside a callback connected to DrawingImmediate.GetPaint. ### Example ```luau local paint = DrawingImmediate.GetPaint(0) local connection = paint:Connect(function() DrawingImmediate.Triangle(Vector2.new(20, 20), Vector2.new(120, 20), Vector2.new(120, 80), Color3.fromRGB(255, 255, 255), 1.0, 1.0) -- expected: the operation completes without returning a value end) ``` ## `DrawingObject.Remove` ### Description DrawingObject.Remove removes the Drawing object. ### Syntax ```luau DrawingObject.Remove() -> () ``` ### Aliases `DrawingObject.Destroy` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors This function has no function-specific error conditions. ### Notes DrawingImmediate calls are valid only inside a callback connected to DrawingImmediate.GetPaint. ### Example ```luau local object = Drawing.new("Line") object:Remove() -- expected: the operation completes without returning a value ``` ## `getrenderproperty` ### Description getrenderproperty returns a Drawing object property. ### Syntax ```luau getrenderproperty(object: DrawingObject, property: string) -> any ``` ### Aliases `get_render_property` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `object` | `DrawingObject` | Object whose state or member is accessed. | | `property` | `string` | Case-sensitive property or callback name. | ### Returns Returns `any`. ### Errors Raises an argument error when `object` or `property` have an unsupported type or value. Errors from the underlying operation are propagated. ### Notes DrawingImmediate calls are valid only inside a callback connected to DrawingImmediate.GetPaint. ### Example ```luau local result = getrenderproperty(Drawing.new("Line"), "sample") print(result) -- expected: any ``` ## `isrenderobj` ### Description isrenderobj returns whether a value is a Drawing object. ### Syntax ```luau isrenderobj(value: any) -> boolean ``` ### Aliases `isrenderobject`, `is_render_obj` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `value` | `any` | Value read, written, displayed, or passed to the operation. | ### Returns Returns true when a value is a Drawing object, otherwise false. ### Errors Raises an argument error when `value` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes DrawingImmediate calls are valid only inside a callback connected to DrawingImmediate.GetPaint. ### Example ```luau local result = isrenderobj("sample") print(result) -- expected: boolean ``` ## `setrenderproperty` ### Description setrenderproperty sets a Drawing object property. ### Syntax ```luau setrenderproperty(object: DrawingObject, property: string, value: any) -> () ``` ### Aliases `set_render_property` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `object` | `DrawingObject` | Object whose state or member is accessed. | | `property` | `string` | Case-sensitive property or callback name. | | `value` | `any` | Value read, written, displayed, or passed to the operation. | ### Returns This function does not return a value. ### Errors Raises an argument error when `object` or `property` or `value` have an unsupported type or value. Errors from the underlying operation are propagated. ### Notes DrawingImmediate calls are valid only inside a callback connected to DrawingImmediate.GetPaint. ### Example ```luau setrenderproperty(Drawing.new("Line"), "sample", "sample") -- expected: the operation completes without returning a value ``` --- # Environment # Environment Functions that inspect the current Luau environment, garbage collector, Instances, and scheduler lists. ## Function index | Function | Summary | | --- | --- | | [`filtergc`](#filtergc) | filtergc filters garbage-collected functions or tables. | | [`fireclickdetector`](#fireclickdetector) | fireclickdetector fires a ClickDetector event. | | [`fireproximityprompt`](#fireproximityprompt) | fireproximityprompt fires a ProximityPrompt. | | [`firetouchinterest`](#firetouchinterest) | firetouchinterest reports a touch begin or end between two parts. | | [`getallthreads`](#getallthreads) | getallthreads returns every live Luau thread. | | [`getgc`](#getgc) | getgc returns live collectable values. | | [`getgenv`](#getgenv) | getgenv returns the executor global environment. | | [`getinstances`](#getinstances) | getinstances returns every cached Instance. | | [`getloadedmodules`](#getloadedmodules) | getloadedmodules returns loaded ModuleScripts. | | [`getmodules`](#getmodules) | getmodules returns cached ModuleScripts. | | [`getnilinstances`](#getnilinstances) | getnilinstances returns Instances without a parent. | | [`getreg`](#getreg) | getreg returns the Lua registry table. | | [`getrendersteppedlist`](#getrendersteppedlist) | getrendersteppedlist returns the render-step callback map. | | [`getrenv`](#getrenv) | getrenv returns the game global environment. | | [`getscripts`](#getscripts) | getscripts returns cached scripts. | | [`gettenv`](#gettenv) | gettenv returns a thread's global environment. | ## `filtergc` ### Description filtergc filters garbage-collected functions or tables. ### Syntax ```luau filtergc(kind: "function" | "table", options: table, return_one?: boolean) -> any | {any}? ``` ### Aliases `filter_gc` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `kind` | `"function" | "table"` | Environment entry type to return: function or table. | | `options` | `table` | Options table controlling the operation. | | `return_one` | `boolean?` | When true, returns the first matching value instead of an array. | ### Returns Returns `any | {any}` when available; otherwise returns nil. ### Errors Raises an argument error when `kind` or `options` have an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Returned tables are snapshots unless the entry states that the table is live. ### Example ```luau local result = filtergc(function(...) print(...) end, {}) print(result) -- expected: any | {any}? ``` ## `fireclickdetector` ### Description fireclickdetector fires a ClickDetector event. ### Syntax ```luau fireclickdetector(detector: ClickDetector, distance?: number, event?: string) -> () ``` ### Aliases `fire_click_detector` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `detector` | `ClickDetector` | ClickDetector to invoke. | | `distance` | `number?` | Activation distance passed to the detector. | | `event` | `string?` | Mouse event name selected for the detector. | ### Returns This function does not return a value. ### Errors Raises an argument error when `detector` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Returned tables are snapshots unless the entry states that the table is live. ### Example ```luau fireclickdetector(workspace:FindFirstChildWhichIsA("ClickDetector", true)) -- expected: the operation completes without returning a value ``` ## `fireproximityprompt` ### Description fireproximityprompt fires a ProximityPrompt. ### Syntax ```luau fireproximityprompt(prompt: ProximityPrompt) -> () ``` ### Aliases `fire_proximity_prompt` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `prompt` | `ProximityPrompt` | ProximityPrompt to invoke. | ### Returns This function does not return a value. ### Errors Raises an argument error when `prompt` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Returned tables are snapshots unless the entry states that the table is live. ### Example ```luau fireproximityprompt(workspace:FindFirstChildWhichIsA("ProximityPrompt", true)) -- expected: the operation completes without returning a value ``` ## `firetouchinterest` ### Description firetouchinterest reports a touch begin or end between two parts. ### Syntax ```luau firetouchinterest(part_a: BasePart, part_b: BasePart, touch_type: integer) -> () ``` ### Aliases `fire_touch_interest` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `part_a` | `BasePart` | First BasePart in the touch pair. | | `part_b` | `BasePart` | Second BasePart in the touch pair. | | `touch_type` | `integer` | Touch state: 0 begins contact and 1 ends contact. | ### Returns This function does not return a value. ### Errors Raises an argument error when `part_a` or `part_b` or `touch_type` have an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Returned tables are snapshots unless the entry states that the table is live. ### Example ```luau firetouchinterest(workspace:FindFirstChildWhichIsA("BasePart", true), workspace:FindFirstChildWhichIsA("BasePart", true), 1) -- expected: the operation completes without returning a value ``` ## `getallthreads` ### Description getallthreads returns every live Luau thread. ### Syntax ```luau getallthreads() -> {thread} ``` ### Aliases `get_all_threads` ### Parameters This function has no parameters. ### Returns Returns an array of `thread` values. The array is empty when no values match. ### Errors This function has no function-specific error conditions. ### Notes Returned tables are snapshots unless the entry states that the table is live. ### Example ```luau local result = getallthreads() print(result) -- expected: {thread} ``` ## `getgc` ### Description getgc returns live collectable values. ### Syntax ```luau getgc(include_tables?: boolean) -> {any} ``` ### Aliases `get_gc` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `include_tables` | `boolean?` | Whether table values are included in the returned environment copy. | ### Returns Returns an array of `any` values. The array is empty when no values match. ### Errors This function has no function-specific error conditions. ### Notes Returned tables are snapshots unless the entry states that the table is live. ### Example ```luau local result = getgc() print(result) -- expected: {any} ``` ## `getgenv` ### Description getgenv returns the executor global environment. ### Syntax ```luau getgenv() -> table ``` ### Aliases `get_genv` ### Parameters This function has no parameters. ### Returns Returns `table`. ### Errors This function has no function-specific error conditions. ### Notes Returned tables are snapshots unless the entry states that the table is live. ### Example ```luau local result = getgenv() print(result) -- expected: table ``` ## `getinstances` ### Description getinstances returns every cached Instance. ### Syntax ```luau getinstances() -> {Instance} ``` ### Aliases `get_instances` ### Parameters This function has no parameters. ### Returns Returns an array of `Instance` values. The array is empty when no values match. ### Errors This function has no function-specific error conditions. ### Notes Returned tables are snapshots unless the entry states that the table is live. ### Example ```luau local result = getinstances() print(result) -- expected: {Instance} ``` ## `getloadedmodules` ### Description getloadedmodules returns loaded ModuleScripts. ### Syntax ```luau getloadedmodules() -> {ModuleScript} ``` ### Aliases `get_loaded_modules` ### Parameters This function has no parameters. ### Returns Returns an array of `ModuleScript` values. The array is empty when no values match. ### Errors This function has no function-specific error conditions. ### Notes Returned tables are snapshots unless the entry states that the table is live. ### Example ```luau local result = getloadedmodules() print(result) -- expected: {ModuleScript} ``` ## `getmodules` ### Description getmodules returns cached ModuleScripts. ### Syntax ```luau getmodules() -> {ModuleScript} ``` ### Parameters This function has no parameters. ### Returns Returns an array of `ModuleScript` values. The array is empty when no values match. ### Errors This function has no function-specific error conditions. ### Notes Returned tables are snapshots unless the entry states that the table is live. ### Example ```luau local result = getmodules() print(result) -- expected: {ModuleScript} ``` ## `getnilinstances` ### Description getnilinstances returns Instances without a parent. ### Syntax ```luau getnilinstances() -> {Instance} ``` ### Aliases `get_nil_instances` ### Parameters This function has no parameters. ### Returns Returns an array of `Instance` values. The array is empty when no values match. ### Errors This function has no function-specific error conditions. ### Notes Returned tables are snapshots unless the entry states that the table is live. ### Example ```luau local result = getnilinstances() print(result) -- expected: {Instance} ``` ## `getreg` ### Description getreg returns the Lua registry table. ### Syntax ```luau getreg() -> table ``` ### Aliases `get_reg`, `getregistry`, `get_registry` ### Parameters This function has no parameters. ### Returns Returns `table`. ### Errors This function has no function-specific error conditions. ### Notes Returned tables are snapshots unless the entry states that the table is live. ### Example ```luau local result = getreg() print(result) -- expected: table ``` ## `getrendersteppedlist` ### Description getrendersteppedlist returns the render-step callback map. ### Syntax ```luau getrendersteppedlist() -> table ``` ### Aliases `get_render_stepped_list` ### Parameters This function has no parameters. ### Returns Returns `table`. ### Errors This function has no function-specific error conditions. ### Notes Returned tables are snapshots unless the entry states that the table is live. ### Example ```luau local result = getrendersteppedlist() print(result) -- expected: table ``` ## `getrenv` ### Description getrenv returns the game global environment. ### Syntax ```luau getrenv() -> table ``` ### Aliases `get_renv` ### Parameters This function has no parameters. ### Returns Returns `table`. ### Errors This function has no function-specific error conditions. ### Notes Returned tables are snapshots unless the entry states that the table is live. ### Example ```luau local result = getrenv() print(result) -- expected: table ``` ## `getscripts` ### Description getscripts returns cached scripts. ### Syntax ```luau getscripts() -> {LuaSourceContainer} ``` ### Aliases `get_scripts` ### Parameters This function has no parameters. ### Returns Returns an array of `LuaSourceContainer` values. The array is empty when no values match. ### Errors This function has no function-specific error conditions. ### Notes Returned tables are snapshots unless the entry states that the table is live. ### Example ```luau local result = getscripts() print(result) -- expected: {LuaSourceContainer} ``` ## `gettenv` ### Description gettenv returns a thread's global environment. ### Syntax ```luau gettenv(thread: thread) -> table ``` ### Aliases `get_tenv` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `thread` | `thread` | Luau thread inspected by the operation. | ### Returns Returns `table`. ### Errors Raises an argument error when `thread` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Returned tables are snapshots unless the entry states that the table is live. ### Example ```luau local result = gettenv(coroutine.running()) print(result) -- expected: table ``` --- # Filesystem # Filesystem Functions that read, write, list, and remove files inside the executor workspace. ## Function index | Function | Summary | | --- | --- | | [`appendfile`](#appendfile) | appendfile appends to a file in the workspace folder. | | [`appendfileasync`](#appendfileasync) | appendfileasync appends to a file in the workspace folder asynchronously. | | [`delfile`](#delfile) | delfile deletes a file. | | [`delfolder`](#delfolder) | delfolder deletes a folder. | | [`getcustomasset`](#getcustomasset) | getcustomasset returns a content string referring to an asset in the workspace folder. | | [`isfile`](#isfile) | isfile returns true if the path refers to a file. | | [`isfolder`](#isfolder) | isfolder returns true if the path refers to a folder. | | [`listfiles`](#listfiles) | listfiles returns an array of file names belonging to the given folder. | | [`loadfile`](#loadfile) | loadfile loads a file from the workspace folder as a chunk, equivalent to loadstring( readfile( path ) ). | | [`loadfileasync`](#loadfileasync) | loadfileasync loads a file from the workspace folder as a chunk asynchronously. | | [`makefolder`](#makefolder) | makefolder recursively creates directories. | | [`readfile`](#readfile) | readfile reads a file from the workspace folder. | | [`readfileasync`](#readfileasync) | readfileasync reads a file from the workspace folder asynchronously. | | [`writefile`](#writefile) | writefile writes to a file in the workspace folder. | | [`writefileasync`](#writefileasync) | writefileasync writes to a file in the workspace folder asynchronously. | ## `appendfile` ### Description appendfile appends to a file in the workspace folder. ### Syntax ```luau appendfile(path: string, contents: string) -> () ``` ### Aliases `append_file` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `path` | `string` | Workspace-relative file or directory path. | | `contents` | `string` | Bytes written or appended to the file. | ### Returns This function does not return a value. ### Errors Raises an argument error when `path` or `contents` have an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Paths are resolved inside the executor workspace. Parent traversal and paths outside that workspace are rejected. ### Example ```luau writefile("docs/append.txt", "first line\n") appendfile("docs/append.txt", "second line\n") print(readfile("docs/append.txt")) -- expected: both lines ``` ## `appendfileasync` ### Description appendfileasync appends to a file in the workspace folder asynchronously. ### Syntax ```luau appendfileasync(path: string, contents: string) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `path` | `string` | Workspace-relative file or directory path. | | `contents` | `string` | Bytes written or appended to the file. | ### Returns This function does not return a value. ### Errors Raises an argument error when `path` or `contents` have an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Paths are resolved inside the executor workspace. Parent traversal and paths outside that workspace are rejected. ### Example ```luau writefile("docs/append-async.txt", "first line\n") appendfileasync("docs/append-async.txt", "second line\n") print(readfile("docs/append-async.txt")) -- expected: both lines ``` ## `delfile` ### Description delfile deletes a file. ### Syntax ```luau delfile(path: string) -> () ``` ### Aliases `deletefile`, `del_file` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `path` | `string` | Workspace-relative file or directory path. | ### Returns This function does not return a value. ### Errors Raises an argument error when `path` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Paths are resolved inside the executor workspace. Parent traversal and paths outside that workspace are rejected. ### Example ```luau writefile("docs/remove-me.txt", "temporary") delfile("docs/remove-me.txt") print(isfile("docs/remove-me.txt")) -- expected: false ``` ## `delfolder` ### Description delfolder deletes a folder. ### Syntax ```luau delfolder(path: string) -> () ``` ### Aliases `deletefolder`, `del_folder` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `path` | `string` | Workspace-relative file or directory path. | ### Returns This function does not return a value. ### Errors Raises an argument error when `path` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Paths are resolved inside the executor workspace. Parent traversal and paths outside that workspace are rejected. ### Example ```luau makefolder("docs/remove-me") delfolder("docs/remove-me") print(isfolder("docs/remove-me")) -- expected: false ``` ## `getcustomasset` ### Description getcustomasset returns a content string referring to an asset in the workspace folder. ### Syntax ```luau getcustomasset(path: string) -> string ``` ### Aliases `getsynasset`, `get_custom_asset` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `path` | `string` | Workspace-relative file or directory path. | ### Returns Returns `string`. ### Errors Raises an argument error when `path` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Paths are resolved inside the executor workspace. Parent traversal and paths outside that workspace are rejected. ### Example ```luau writefile("docs/icon.txt", "asset data") local asset = getcustomasset("docs/icon.txt") print(type(asset)) -- expected: "string" ``` ## `isfile` ### Description isfile returns true if the path refers to a file. ### Syntax ```luau isfile(path: string) -> boolean ``` ### Aliases `is_file` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `path` | `string` | Workspace-relative file or directory path. | ### Returns Returns true when the operation succeeds or its condition is met; otherwise false. ### Errors Raises an argument error when `path` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Paths are resolved inside the executor workspace. Parent traversal and paths outside that workspace are rejected. ### Example ```luau writefile("docs/file-check.txt", "present") local exists = isfile("docs/file-check.txt") print(exists) -- expected: true ``` ## `isfolder` ### Description isfolder returns true if the path refers to a folder. ### Syntax ```luau isfolder(path: string) -> boolean ``` ### Aliases `is_folder` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `path` | `string` | Workspace-relative file or directory path. | ### Returns Returns true when the operation succeeds or its condition is met; otherwise false. ### Errors Raises an argument error when `path` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Paths are resolved inside the executor workspace. Parent traversal and paths outside that workspace are rejected. ### Example ```luau makefolder("docs/folder-check") local exists = isfolder("docs/folder-check") print(exists) -- expected: true ``` ## `listfiles` ### Description listfiles returns an array of file names belonging to the given folder. ### Syntax ```luau listfiles(path?: string) -> {string} ``` ### Aliases `list_files` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `path` | `string?` | Workspace-relative file or directory path. | ### Returns Returns an array of `string` values. The array is empty when no values match. ### Errors This function has no function-specific error conditions. ### Notes Paths are resolved inside the executor workspace. Parent traversal and paths outside that workspace are rejected. ### Example ```luau makefolder("docs/list") writefile("docs/list/first.txt", "first") writefile("docs/list/second.txt", "second") local files = listfiles("docs/list") print(#files) -- expected: 2 ``` ## `loadfile` ### Description loadfile loads a file from the workspace folder as a chunk, equivalent to loadstring( readfile( path ) ). ### Syntax ```luau loadfile(path: string) -> function ``` ### Aliases `load_file` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `path` | `string` | Workspace-relative file or directory path. | ### Returns Returns `function`. ### Errors Raises an argument error when `path` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Paths are resolved inside the executor workspace. Parent traversal and paths outside that workspace are rejected. ### Example ```luau writefile("docs/chunk.luau", "return 21 * 2") local chunk = loadfile("docs/chunk.luau") print(chunk()) -- expected: 42 ``` ## `loadfileasync` ### Description loadfileasync loads a file from the workspace folder as a chunk asynchronously. ### Syntax ```luau loadfileasync(path: string) -> (function?, string?) ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `path` | `string` | Workspace-relative file or directory path. | ### Returns Returns the compiled function and nil on success. Compilation or loading failure returns nil followed by an error string. ### Errors Raises an argument error when `path` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Paths are resolved inside the executor workspace. Parent traversal and paths outside that workspace are rejected. ### Example ```luau writefile("docs/chunk-async.luau", "return 21 * 2") local chunk, loadError = loadfileasync("docs/chunk-async.luau") assert(chunk, loadError) print(chunk()) -- expected: 42 ``` ## `makefolder` ### Description makefolder recursively creates directories. Returns true on success. ### Syntax ```luau makefolder(path: string) -> boolean ``` ### Aliases `make_folder` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `path` | `string` | Workspace-relative file or directory path. | ### Returns Returns true when the operation succeeds or its condition is met; otherwise false. ### Errors Raises an argument error when `path` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Paths are resolved inside the executor workspace. Parent traversal and paths outside that workspace are rejected. ### Example ```luau local created = makefolder("docs/new-folder") print(created) -- expected: true print(isfolder("docs/new-folder")) -- expected: true ``` ## `readfile` ### Description readfile reads a file from the workspace folder. ### Syntax ```luau readfile(path: string) -> string ``` ### Aliases `read_file` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `path` | `string` | Workspace-relative file or directory path. | ### Returns Returns `string`. ### Errors Raises an argument error when `path` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Paths are resolved inside the executor workspace. Parent traversal and paths outside that workspace are rejected. ### Example ```luau writefile("docs/read.txt", "stored text") local contents = readfile("docs/read.txt") print(contents) -- expected: "stored text" ``` ## `readfileasync` ### Description readfileasync reads a file from the workspace folder asynchronously. ### Syntax ```luau readfileasync(path: string) -> string ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `path` | `string` | Workspace-relative file or directory path. | ### Returns Returns `string`. ### Errors Raises an argument error when `path` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Paths are resolved inside the executor workspace. Parent traversal and paths outside that workspace are rejected. ### Example ```luau writefile("docs/read-async.txt", "stored text") local contents = readfileasync("docs/read-async.txt") print(contents) -- expected: "stored text" ``` ## `writefile` ### Description writefile writes to a file in the workspace folder. ### Syntax ```luau writefile(path: string, contents: string) -> () ``` ### Aliases `write_file` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `path` | `string` | Workspace-relative file or directory path. | | `contents` | `string` | Bytes written or appended to the file. | ### Returns This function does not return a value. ### Errors Raises an argument error when `path` or `contents` have an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Paths are resolved inside the executor workspace. Parent traversal and paths outside that workspace are rejected. ### Example ```luau writefile("docs/write.txt", "stored text") local contents = readfile("docs/write.txt") print(contents) -- expected: "stored text" ``` ## `writefileasync` ### Description writefileasync writes to a file in the workspace folder asynchronously. ### Syntax ```luau writefileasync(path: string, contents: string) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `path` | `string` | Workspace-relative file or directory path. | | `contents` | `string` | Bytes written or appended to the file. | ### Returns This function does not return a value. ### Errors Raises an argument error when `path` or `contents` have an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Paths are resolved inside the executor workspace. Parent traversal and paths outside that workspace are rejected. ### Example ```luau writefileasync("docs/write-async.txt", "stored text") local contents = readfile("docs/write-async.txt") print(contents) -- expected: "stored text" ``` --- # Filter # Filter Filter objects used by hook functions to choose which calls reach a hook. ## Function index | Function | Summary | | --- | --- | | [`AllFilter.new`](#allfilter-new) | AllFilter.new creates a filter that matches when every child filter matches. | | [`AnyFilter.new`](#anyfilter-new) | AnyFilter.new creates a filter that matches when any child filter matches. | | [`ArgCountFilter.new`](#argcountfilter-new) | ArgCountFilter.new creates a filter that checks the argument count. | | [`ArgumentFilter.new`](#argumentfilter-new) | ArgumentFilter.new creates a filter that compares one argument with a stored value. | | [`CallerFilter.new`](#callerfilter-new) | CallerFilter.new creates a filter that checks whether the caller is an executor closure. | | [`getfilter`](#getfilter) | getfilter creates a function that routes matching calls to one function and all other calls to another. | | [`InstanceNameFilter.new`](#instancenamefilter-new) | InstanceNameFilter.new creates a filter that checks an Instance name. | | [`InstanceTypeFilter.new`](#instancetypefilter-new) | InstanceTypeFilter.new creates a filter that checks an Instance class name. | | [`NamecallFilter.new`](#namecallfilter-new) | NamecallFilter.new creates a filter that checks the active namecall method. | | [`NotFilter.new`](#notfilter-new) | NotFilter.new creates a filter that reverses another filter. | | [`TypeFilter.new`](#typefilter-new) | TypeFilter.new creates a filter that checks an argument's Luau type. | | [`UserdataTypeFilter.new`](#userdatatypefilter-new) | UserdataTypeFilter.new creates a filter that checks a userdata type. | ## `AllFilter.new` ### Description AllFilter.new creates a filter that matches when every child filter matches. ### Syntax ```luau AllFilter.new(filters?: {FilterBase}) -> AllFilter ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `filters` | `{FilterBase}?` | Array of FilterBase values combined by this filter. | ### Returns Returns `AllFilter`. ### Errors This function has no function-specific error conditions. ### Notes Filters are evaluated when the wrapped function runs. A filter does not call either branch during construction. ### Example ```luau local filter = AllFilter.new() print(filter) -- expected: AllFilter ``` ## `AnyFilter.new` ### Description AnyFilter.new creates a filter that matches when any child filter matches. ### Syntax ```luau AnyFilter.new(filters?: {FilterBase}) -> AnyFilter ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `filters` | `{FilterBase}?` | Array of FilterBase values combined by this filter. | ### Returns Returns `AnyFilter`. ### Errors This function has no function-specific error conditions. ### Notes Filters are evaluated when the wrapped function runs. A filter does not call either branch during construction. ### Example ```luau local filter = AnyFilter.new() print(filter) -- expected: AnyFilter ``` ## `ArgCountFilter.new` ### Description ArgCountFilter.new creates a filter that checks the argument count. ### Syntax ```luau ArgCountFilter.new(argument_count: integer) -> ArgCountFilter ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `argument_count` | `integer` | Exact number of arguments required for a match. | ### Returns Returns `ArgCountFilter`. ### Errors Raises an argument error when `argument_count` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Filters are evaluated when the wrapped function runs. A filter does not call either branch during construction. ### Example ```luau local filter = ArgCountFilter.new(1) print(filter) -- expected: ArgCountFilter ``` ## `ArgumentFilter.new` ### Description ArgumentFilter.new creates a filter that compares one argument with a stored value. ### Syntax ```luau ArgumentFilter.new(argument_index: integer, argument: any) -> ArgumentFilter ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `argument_index` | `integer` | One-based argument position inspected by the filter. | | `argument` | `any` | Value that the selected argument must equal. | ### Returns Returns `ArgumentFilter`. ### Errors Raises an argument error when `argument_index` or `argument` have an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Filters are evaluated when the wrapped function runs. A filter does not call either branch during construction. ### Example ```luau local filter = ArgumentFilter.new(1, "sample") print(filter) -- expected: ArgumentFilter ``` ## `CallerFilter.new` ### Description CallerFilter.new creates a filter that checks whether the caller is an executor closure. ### Syntax ```luau CallerFilter.new(invert: boolean) -> CallerFilter ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `invert` | `boolean` | When true, reverses the caller check. | ### Returns Returns `CallerFilter`. ### Errors Raises an argument error when `invert` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Filters are evaluated when the wrapped function runs. A filter does not call either branch during construction. ### Example ```luau local filter = CallerFilter.new(true) print(filter) -- expected: CallerFilter ``` ## `getfilter` ### Description getfilter creates a function that routes matching calls to one function and all other calls to another. ### Syntax ```luau getfilter(filter: FilterBase, original: function, filtered: function) -> function ``` ### Aliases `get_filter` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `filter` | `FilterBase` | FilterBase value that decides which calls reach the replacement. | | `original` | `function` | Function called when the filter does not match. | | `filtered` | `function` | Function invoked when the filter matches. | ### Returns Returns `function`. ### Errors Raises an argument error when `filter` or `original` or `filtered` have an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Filters are evaluated when the wrapped function runs. A filter does not call either branch during construction. ### Example ```luau local routed = getfilter( TypeFilter.new(1, "string"), function(value) return "original: " .. tostring(value) end, function(value) return "filtered: " .. value end ) print(routed("hello")) -- expected: "filtered: hello" print(routed(10)) -- expected: "original: 10" ``` ## `InstanceNameFilter.new` ### Description InstanceNameFilter.new creates a filter that checks an Instance name. ### Syntax ```luau InstanceNameFilter.new(argument_index: integer, instance_name: string) -> InstanceNameFilter ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `argument_index` | `integer` | One-based argument position inspected by the filter. | | `instance_name` | `string` | Exact Instance.Name value required for a match. | ### Returns Returns `InstanceNameFilter`. ### Errors Raises an argument error when `argument_index` or `instance_name` have an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Filters are evaluated when the wrapped function runs. A filter does not call either branch during construction. ### Example ```luau local filter = InstanceNameFilter.new(1, "sample") print(filter) -- expected: InstanceNameFilter ``` ## `InstanceTypeFilter.new` ### Description InstanceTypeFilter.new creates a filter that checks an Instance class name. ### Syntax ```luau InstanceTypeFilter.new(argument_index: integer, instance_type: string) -> InstanceTypeFilter ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `argument_index` | `integer` | One-based argument position inspected by the filter. | | `instance_type` | `string` | Class name accepted by Instance:IsA. | ### Returns Returns `InstanceTypeFilter`. ### Errors Raises an argument error when `argument_index` or `instance_type` have an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Filters are evaluated when the wrapped function runs. A filter does not call either branch during construction. ### Example ```luau local filter = InstanceTypeFilter.new(1, "sample") print(filter) -- expected: InstanceTypeFilter ``` ## `NamecallFilter.new` ### Description NamecallFilter.new creates a filter that checks the active namecall method. ### Syntax ```luau NamecallFilter.new(namecall_method: string) -> NamecallFilter ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `namecall_method` | `string` | Namecall method that must be active for a match. | ### Returns Returns `NamecallFilter`. ### Errors Raises an argument error when `namecall_method` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Filters are evaluated when the wrapped function runs. A filter does not call either branch during construction. ### Example ```luau local filter = NamecallFilter.new("sample") print(filter) -- expected: NamecallFilter ``` ## `NotFilter.new` ### Description NotFilter.new creates a filter that reverses another filter. ### Syntax ```luau NotFilter.new(target: FilterBase) -> NotFilter ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `target` | `FilterBase` | Filter or function targeted by the operation. | ### Returns Returns `NotFilter`. ### Errors Raises an argument error when `target` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Filters are evaluated when the wrapped function runs. A filter does not call either branch during construction. ### Example ```luau local filter = NotFilter.new(TypeFilter.new(1, "string")) print(filter) -- expected: NotFilter ``` ## `TypeFilter.new` ### Description TypeFilter.new creates a filter that checks an argument's Luau type. ### Syntax ```luau TypeFilter.new(argument_index: integer, argument_type: string) -> TypeFilter ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `argument_index` | `integer` | One-based argument position inspected by the filter. | | `argument_type` | `string` | Luau type name required at the selected argument position. | ### Returns Returns `TypeFilter`. ### Errors Raises an argument error when `argument_index` or `argument_type` have an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Filters are evaluated when the wrapped function runs. A filter does not call either branch during construction. ### Example ```luau local filter = TypeFilter.new(1, "string") print(filter) -- expected: TypeFilter ``` ## `UserdataTypeFilter.new` ### Description UserdataTypeFilter.new creates a filter that checks a userdata type. ### Syntax ```luau UserdataTypeFilter.new(argument_index: integer, userdata_type: userdata) -> UserdataTypeFilter ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `argument_index` | `integer` | One-based argument position inspected by the filter. | | `userdata_type` | `userdata` | Userdata type required for a match. | ### Returns Returns `UserdataTypeFilter`. ### Errors Raises an argument error when `argument_index` or `userdata_type` have an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Filters are evaluated when the wrapped function runs. A filter does not call either branch during construction. ### Example ```luau local filter = UserdataTypeFilter.new(1, newproxy(true)) print(filter) -- expected: UserdataTypeFilter ``` --- # Hooking # Hooking Functions for cloning, hooking, restoring, and identifying Luau and C closures. ## Function index | Function | Summary | | --- | --- | | [`clonefunction`](#clonefunction) | clonefunction returns a copy of a function. | | [`getfunctionhash`](#getfunctionhash) | getfunctionhash returns a stable hash for a function. | | [`hookfunction`](#hookfunction) | hookfunction hooks a function in place and returns a copy of its original behavior. | | [`hookmetamethod`](#hookmetamethod) | hookmetamethod replaces a userdata metamethod in place and returns a callable copy of the original. | | [`hookproto`](#hookproto) | hookproto hooks the proto referenced by a ProtoProxy. | | [`isexecutorclosure`](#isexecutorclosure) | isexecutorclosure returns whether a function belongs to the executor. | | [`isfunctionhooked`](#isfunctionhooked) | isfunctionhooked returns whether a function has an active hook. | | [`isnewcclosure`](#isnewcclosure) | isnewcclosure returns whether a function was created by newcclosure. | | [`isprotohooked`](#isprotohooked) | isprotohooked returns whether a ProtoProxy currently has an active hook. | | [`newcclosure`](#newcclosure) | newcclosure wraps a function in a C closure. | | [`newlclosure`](#newlclosure) | newlclosure wraps a function in a Luau closure. | | [`restorefunction`](#restorefunction) | restorefunction restores a hooked function. | | [`restoreproto`](#restoreproto) | restoreproto restores a proto hooked by hookproto. | | [`setstackhidden`](#setstackhidden) | setstackhidden sets whether a stack frame is hidden from debug inspection. | | [`trampoline_call`](#trampoline-call) | trampoline_call invokes func under a protected call with optional synthetic caller frames and thread context. | ## `clonefunction` ### Description clonefunction returns a copy of a function. ### Syntax ```luau clonefunction(func: function) -> function ``` ### Aliases `clone_function` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `func` | `function` | Function inspected or called by the operation. | ### Returns Returns `function`. ### Errors Raises an argument error when `func` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Hooks stay installed until restorefunction, restoreproto, or the matching unhook operation restores the target. ### Example ```luau local result = clonefunction(function(...) print(...) end) print(result) -- expected: function ``` ## `getfunctionhash` ### Description getfunctionhash returns a stable hash for a function. ### Syntax ```luau getfunctionhash(func: function) -> string ``` ### Aliases `get_function_hash` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `func` | `function` | Function inspected or called by the operation. | ### Returns Returns `string`. ### Errors Raises an argument error when `func` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Hooks stay installed until restorefunction, restoreproto, or the matching unhook operation restores the target. ### Example ```luau local result = getfunctionhash(function(...) print(...) end) print(result) -- expected: string ``` ## `hookfunction` ### Description hookfunction hooks a function in place and returns a copy of its original behavior. ### Syntax ```luau hookfunction(to_hook: function, hook: function, filter?: FilterBase) -> function ``` ### Aliases `hookfunc`, `replaceclosure`, `hook_function`, `hook_func`, `replace_closure` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `to_hook` | `function` | Function modified in place. | | `hook` | `function` | Replacement function called for matching invocations. | | `filter` | `FilterBase?` | FilterBase value that decides which calls reach the replacement. | ### Returns Returns `function`. ### Errors Raises an argument error when `to_hook` or `hook` have an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Hooks stay installed until restorefunction, restoreproto, or the matching unhook operation restores the target. ### Example ```luau local function add(left, right) return left + right end local original original = hookfunction(add, function(left, right) return original(left, right) * 2 end) print(add(2, 3)) -- expected: 10 restorefunction(add) ``` ## `hookmetamethod` ### Description hookmetamethod replaces a userdata metamethod in place and returns a callable copy of the original. arg_guard makes malformed direct calls bypass hook, while filter decides which valid calls reach hook. ### Syntax ```luau hookmetamethod(object: userdata, method: string, hook: function, arg_guard: boolean? = true, filter?: FilterBase) -> function ``` ### Aliases `hook_meta_method` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `object` | `userdata` | Object whose state or member is accessed. | | `method` | `string` | Metamethod name, such as __index or __namecall. | | `hook` | `function` | Replacement function called for matching invocations. | | `arg_guard` | `boolean? = true` | When true, bypasses the hook for arguments that do not match the metamethod's expected shape. | | `filter` | `FilterBase?` | FilterBase value that decides which calls reach the replacement. | ### Returns Returns `function`. ### Errors Raises an error when object has no metatable, method is absent or is not a function, arg_guard is not boolean, or filter is not a FilterBase. ### Notes Filtering is applied after argument validation. Set arg_guard to false only when the hook intentionally handles malformed direct calls. ### Example ```luau local original original = hookmetamethod(game, "__namecall", function(self, ...) if getnamecallmethod() == "GetService" then print("GetService intercepted") -- expected: printed once below end return original(self, ...) end) game:GetService("Players") restorefunction(getrawmetatable(game).__namecall) ``` ## `hookproto` ### Description hookproto hooks the proto referenced by a ProtoProxy. ### Syntax ```luau hookproto(proto: ProtoProxy, hook: (...any) -> ...any) -> () ``` ### Aliases `hook_proto` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `proto` | `ProtoProxy` | ProtoProxy returned by debug.getproto or debug.getprotos. | | `hook` | `(...any) -> ...any` | Replacement function called for matching invocations. | ### Returns This function does not return a value. ### Errors Raises an argument error when `proto` or `hook` have an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Hooks stay installed until restorefunction, restoreproto, or the matching unhook operation restores the target. ### Example ```luau local function makeGreeter() local function greet(name) return "Hello, " .. name end return greet end local proto = debug.getproto(makeGreeter, 1) hookproto(proto, function(name) return "Hooked: " .. name end) print(makeGreeter()("Docs")) -- expected: "Hooked: Docs" restoreproto(proto) ``` ## `isexecutorclosure` ### Description isexecutorclosure returns whether a function belongs to the executor. ### Syntax ```luau isexecutorclosure(func: function) -> boolean ``` ### Aliases `isexecutorfunction`, `isourclosure`, `checkclosure`, `is_executor_closure`, `is_our_closure`, `check_closure` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `func` | `function` | Function inspected or called by the operation. | ### Returns Returns true when a function belongs to the executor, otherwise false. ### Errors Raises an argument error when `func` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Hooks stay installed until restorefunction, restoreproto, or the matching unhook operation restores the target. ### Example ```luau local result = isexecutorclosure(function(...) print(...) end) print(result) -- expected: boolean ``` ## `isfunctionhooked` ### Description isfunctionhooked returns whether a function has an active hook. ### Syntax ```luau isfunctionhooked(func: function) -> boolean ``` ### Aliases `isfunchooked`, `is_function_hooked` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `func` | `function` | Function inspected or called by the operation. | ### Returns Returns true when a function has an active hook, otherwise false. ### Errors Raises an argument error when `func` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Hooks stay installed until restorefunction, restoreproto, or the matching unhook operation restores the target. ### Example ```luau local result = isfunctionhooked(function(...) print(...) end) print(result) -- expected: boolean ``` ## `isnewcclosure` ### Description isnewcclosure returns whether a function was created by newcclosure. ### Syntax ```luau isnewcclosure(func: function) -> boolean ``` ### Aliases `iscustomcclosure` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `func` | `function` | Function inspected or called by the operation. | ### Returns Returns true when a function was created by newcclosure, otherwise false. ### Errors Raises an argument error when `func` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Hooks stay installed until restorefunction, restoreproto, or the matching unhook operation restores the target. ### Example ```luau local result = isnewcclosure(function(...) print(...) end) print(result) -- expected: boolean ``` ## `isprotohooked` ### Description isprotohooked returns whether a ProtoProxy currently has an active hook. ### Syntax ```luau isprotohooked(proto: ProtoProxy) -> boolean ``` ### Aliases `is_proto_hooked` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `proto` | `ProtoProxy` | ProtoProxy returned by debug.getproto or debug.getprotos. | ### Returns Returns true when a ProtoProxy currently has an active hook, otherwise false. ### Errors Raises an argument error when `proto` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Hooks stay installed until restorefunction, restoreproto, or the matching unhook operation restores the target. ### Example ```luau local function container() local function nested() return 1 end return nested end local proto = debug.getproto(container, 1) print(isprotohooked(proto)) -- expected: false hookproto(proto, function() return 2 end) print(isprotohooked(proto)) -- expected: true restoreproto(proto) ``` ## `newcclosure` ### Description newcclosure wraps a function in a C closure. ### Syntax ```luau newcclosure(func: function, namecall?: string) -> function ``` ### Aliases `new_c_closure` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `func` | `function` | Function inspected or called by the operation. | | `namecall` | `string?` | Namecall atom exposed while the wrapper calls its target. | ### Returns Returns `function`. ### Errors Raises an argument error when `func` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Hooks stay installed until restorefunction, restoreproto, or the matching unhook operation restores the target. ### Example ```luau local result = newcclosure(function(...) print(...) end) print(result) -- expected: function ``` ## `newlclosure` ### Description newlclosure wraps a function in a Luau closure. ### Syntax ```luau newlclosure(func: function, namecall?: string) -> function ``` ### Aliases `new_l_closure` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `func` | `function` | Function inspected or called by the operation. | | `namecall` | `string?` | Namecall atom exposed while the wrapper calls its target. | ### Returns Returns `function`. ### Errors Raises an argument error when `func` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Hooks stay installed until restorefunction, restoreproto, or the matching unhook operation restores the target. ### Example ```luau local result = newlclosure(function(...) print(...) end) print(result) -- expected: function ``` ## `restorefunction` ### Description restorefunction restores a hooked function. ### Syntax ```luau restorefunction(func: function) -> () ``` ### Aliases `restoreclosure`, `restorefunc`, `restore_function` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `func` | `function` | Function inspected or called by the operation. | ### Returns This function does not return a value. ### Errors Raises an argument error when `func` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Hooks stay installed until restorefunction, restoreproto, or the matching unhook operation restores the target. ### Example ```luau restorefunction(function(...) print(...) -- expected: the operation completes without returning a value end) ``` ## `restoreproto` ### Description restoreproto restores a proto hooked by hookproto. ### Syntax ```luau restoreproto(proto: ProtoProxy) -> () ``` ### Aliases `restore_proto` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `proto` | `ProtoProxy` | ProtoProxy returned by debug.getproto or debug.getprotos. | ### Returns This function does not return a value. ### Errors Raises an argument error when `proto` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Hooks stay installed until restorefunction, restoreproto, or the matching unhook operation restores the target. ### Example ```luau local function container() local function nested() return "original" end return nested end local proto = debug.getproto(container, 1) hookproto(proto, function() return "hooked" end) restoreproto(proto) print(container()()) -- expected: "original" ``` ## `setstackhidden` ### Description setstackhidden sets whether a stack frame is hidden from debug inspection. ### Syntax ```luau setstackhidden(func_or_level: function | integer, hidden?: boolean) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `func_or_level` | `function | integer` | Function or stack level selecting a Luau closure. | | `hidden` | `boolean?` | Whether the selected frame or function should be hidden. | ### Returns This function does not return a value. ### Errors Raises an argument error when `func_or_level` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Hooks stay installed until restorefunction, restoreproto, or the matching unhook operation restores the target. ### Example ```luau local target = function() end setstackhidden(target, true) -- expected: the operation completes without returning a value ``` ## `trampoline_call` ### Description trampoline_call invokes func under a protected call with optional synthetic caller frames and thread context. It returns true followed by the function results, or false followed by the original error value. ### Syntax ```luau trampoline_call(func: (...any) -> ...any, callstack: {TrampolineCallFrame}, thread_options: TrampolineThreadOptions, ...: any) -> (boolean, ...any) ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `func` | `(...any) -> ...any` | Function inspected or called by the operation. | | `callstack` | `{TrampolineCallFrame}` | Dense array of caller frames exposed while the target runs. | | `thread_options` | `TrampolineThreadOptions` | Script, identity, environment, or parent-thread overrides for trampoline_call. | | `...` | `any` | Values forwarded without changing their order or nil slots. | ### Returns Returns true followed by every result from func. If func raises an error, returns false followed by the original error value. ### Errors Raises an argument error when `func` or `callstack` or `thread_options` have an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Hooks stay installed until restorefunction, restoreproto, or the matching unhook operation restores the target. ### Example ```luau local ok, result = trampoline_call(function(value) return value * 2 end, {}, {}, 21) assert(ok) print(result) -- expected: (boolean, ...any) ``` --- # ImGui Constants # ImGui constants These global integer constants are registered with the ImGui functions. Combine compatible flags with `bit32.bor`. ```luau local flags = bit32.bor(ImGuiWindowFlags_NoResize, ImGuiWindowFlags_NoCollapse) ``` ## ImGuiBackendFlags - `ImGuiBackendFlags_HasGamepad` - `ImGuiBackendFlags_HasMouseCursors` - `ImGuiBackendFlags_HasMouseHoveredViewport` - `ImGuiBackendFlags_HasSetMousePos` - `ImGuiBackendFlags_None` - `ImGuiBackendFlags_PlatformHasViewports` - `ImGuiBackendFlags_RendererHasViewports` - `ImGuiBackendFlags_RendererHasVtxOffset` ## ImGuiButtonFlags - `ImGuiButtonFlags_EnableNav` - `ImGuiButtonFlags_MouseButtonLeft` - `ImGuiButtonFlags_MouseButtonMask_` - `ImGuiButtonFlags_MouseButtonMiddle` - `ImGuiButtonFlags_MouseButtonRight` - `ImGuiButtonFlags_None` ## ImGuiChildFlags - `ImGuiChildFlags_AlwaysAutoResize` - `ImGuiChildFlags_AlwaysUseWindowPadding` - `ImGuiChildFlags_AutoResizeX` - `ImGuiChildFlags_AutoResizeY` - `ImGuiChildFlags_Border` - `ImGuiChildFlags_Borders` - `ImGuiChildFlags_FrameStyle` - `ImGuiChildFlags_NavFlattened` - `ImGuiChildFlags_None` - `ImGuiChildFlags_ResizeX` - `ImGuiChildFlags_ResizeY` ## ImGuiCol - `ImGuiCol_Border` - `ImGuiCol_BorderShadow` - `ImGuiCol_Button` - `ImGuiCol_ButtonActive` - `ImGuiCol_ButtonHovered` - `ImGuiCol_COUNT` - `ImGuiCol_CheckMark` - `ImGuiCol_ChildBg` - `ImGuiCol_DockingEmptyBg` - `ImGuiCol_DockingPreview` - `ImGuiCol_DragDropTarget` - `ImGuiCol_FrameBg` - `ImGuiCol_FrameBgActive` - `ImGuiCol_FrameBgHovered` - `ImGuiCol_Header` - `ImGuiCol_HeaderActive` - `ImGuiCol_HeaderHovered` - `ImGuiCol_MenuBarBg` - `ImGuiCol_ModalWindowDimBg` - `ImGuiCol_NavCursor` - `ImGuiCol_NavHighlight` - `ImGuiCol_NavWindowingDimBg` - `ImGuiCol_NavWindowingHighlight` - `ImGuiCol_PlotHistogram` - `ImGuiCol_PlotHistogramHovered` - `ImGuiCol_PlotLines` - `ImGuiCol_PlotLinesHovered` - `ImGuiCol_PopupBg` - `ImGuiCol_ResizeGrip` - `ImGuiCol_ResizeGripActive` - `ImGuiCol_ResizeGripHovered` - `ImGuiCol_ScrollbarBg` - `ImGuiCol_ScrollbarGrab` - `ImGuiCol_ScrollbarGrabActive` - `ImGuiCol_ScrollbarGrabHovered` - `ImGuiCol_Separator` - `ImGuiCol_SeparatorActive` - `ImGuiCol_SeparatorHovered` - `ImGuiCol_SliderGrab` - `ImGuiCol_SliderGrabActive` - `ImGuiCol_Tab` - `ImGuiCol_TabActive` - `ImGuiCol_TabDimmed` - `ImGuiCol_TabDimmedSelected` - `ImGuiCol_TabDimmedSelectedOverline` - `ImGuiCol_TabHovered` - `ImGuiCol_TabSelected` - `ImGuiCol_TabSelectedOverline` - `ImGuiCol_TabUnfocused` - `ImGuiCol_TabUnfocusedActive` - `ImGuiCol_TableBorderLight` - `ImGuiCol_TableBorderStrong` - `ImGuiCol_TableHeaderBg` - `ImGuiCol_TableRowBg` - `ImGuiCol_TableRowBgAlt` - `ImGuiCol_Text` - `ImGuiCol_TextDisabled` - `ImGuiCol_TextLink` - `ImGuiCol_TextSelectedBg` - `ImGuiCol_TitleBg` - `ImGuiCol_TitleBgActive` - `ImGuiCol_TitleBgCollapsed` - `ImGuiCol_WindowBg` ## ImGuiColorEditFlags - `ImGuiColorEditFlags_AlphaBar` - `ImGuiColorEditFlags_AlphaMask_` - `ImGuiColorEditFlags_AlphaNoBg` - `ImGuiColorEditFlags_AlphaOpaque` - `ImGuiColorEditFlags_AlphaPreview` - `ImGuiColorEditFlags_AlphaPreviewHalf` - `ImGuiColorEditFlags_DataTypeMask_` - `ImGuiColorEditFlags_DefaultOptions_` - `ImGuiColorEditFlags_DisplayHSV` - `ImGuiColorEditFlags_DisplayHex` - `ImGuiColorEditFlags_DisplayMask_` - `ImGuiColorEditFlags_DisplayRGB` - `ImGuiColorEditFlags_Float` - `ImGuiColorEditFlags_HDR` - `ImGuiColorEditFlags_InputHSV` - `ImGuiColorEditFlags_InputMask_` - `ImGuiColorEditFlags_InputRGB` - `ImGuiColorEditFlags_NoAlpha` - `ImGuiColorEditFlags_NoBorder` - `ImGuiColorEditFlags_NoDragDrop` - `ImGuiColorEditFlags_NoInputs` - `ImGuiColorEditFlags_NoLabel` - `ImGuiColorEditFlags_NoOptions` - `ImGuiColorEditFlags_NoPicker` - `ImGuiColorEditFlags_NoSidePreview` - `ImGuiColorEditFlags_NoSmallPreview` - `ImGuiColorEditFlags_NoTooltip` - `ImGuiColorEditFlags_None` - `ImGuiColorEditFlags_PickerHueBar` - `ImGuiColorEditFlags_PickerHueWheel` - `ImGuiColorEditFlags_PickerMask_` - `ImGuiColorEditFlags_Uint8` ## ImGuiComboFlags - `ImGuiComboFlags_HeightLarge` - `ImGuiComboFlags_HeightLargest` - `ImGuiComboFlags_HeightMask_` - `ImGuiComboFlags_HeightRegular` - `ImGuiComboFlags_HeightSmall` - `ImGuiComboFlags_NoArrowButton` - `ImGuiComboFlags_NoPreview` - `ImGuiComboFlags_None` - `ImGuiComboFlags_PopupAlignLeft` - `ImGuiComboFlags_WidthFitPreview` ## ImGuiCond - `ImGuiCond_Always` - `ImGuiCond_Appearing` - `ImGuiCond_FirstUseEver` - `ImGuiCond_None` - `ImGuiCond_Once` ## ImGuiConfigFlags - `ImGuiConfigFlags_DockingEnable` - `ImGuiConfigFlags_DpiEnableScaleFonts` - `ImGuiConfigFlags_DpiEnableScaleViewports` - `ImGuiConfigFlags_IsSRGB` - `ImGuiConfigFlags_IsTouchScreen` - `ImGuiConfigFlags_NavEnableGamepad` - `ImGuiConfigFlags_NavEnableKeyboard` - `ImGuiConfigFlags_NavEnableSetMousePos` - `ImGuiConfigFlags_NavNoCaptureKeyboard` - `ImGuiConfigFlags_NoKeyboard` - `ImGuiConfigFlags_NoMouse` - `ImGuiConfigFlags_NoMouseCursorChange` - `ImGuiConfigFlags_None` - `ImGuiConfigFlags_ViewportsEnable` ## ImGuiDir - `ImGuiDir_Down` - `ImGuiDir_Left` - `ImGuiDir_None` - `ImGuiDir_Right` - `ImGuiDir_Up` ## ImGuiDockNodeFlags - `ImGuiDockNodeFlags_AutoHideTabBar` - `ImGuiDockNodeFlags_KeepAliveOnly` - `ImGuiDockNodeFlags_NoDockingInCentralNode` - `ImGuiDockNodeFlags_NoDockingOverCentralNode` - `ImGuiDockNodeFlags_NoDockingSplit` - `ImGuiDockNodeFlags_NoResize` - `ImGuiDockNodeFlags_NoSplit` - `ImGuiDockNodeFlags_NoUndocking` - `ImGuiDockNodeFlags_None` - `ImGuiDockNodeFlags_PassthruCentralNode` ## ImGuiDragDropFlags - `ImGuiDragDropFlags_AcceptBeforeDelivery` - `ImGuiDragDropFlags_AcceptNoDrawDefaultRect` - `ImGuiDragDropFlags_AcceptNoPreviewTooltip` - `ImGuiDragDropFlags_AcceptPeekOnly` - `ImGuiDragDropFlags_None` - `ImGuiDragDropFlags_PayloadAutoExpire` - `ImGuiDragDropFlags_PayloadNoCrossContext` - `ImGuiDragDropFlags_PayloadNoCrossProcess` - `ImGuiDragDropFlags_SourceAllowNullID` - `ImGuiDragDropFlags_SourceAutoExpirePayload` - `ImGuiDragDropFlags_SourceExtern` - `ImGuiDragDropFlags_SourceNoDisableHover` - `ImGuiDragDropFlags_SourceNoHoldToOpenOthers` - `ImGuiDragDropFlags_SourceNoPreviewTooltip` ## ImGuiFocusedFlags - `ImGuiFocusedFlags_AnyWindow` - `ImGuiFocusedFlags_ChildWindows` - `ImGuiFocusedFlags_DockHierarchy` - `ImGuiFocusedFlags_NoPopupHierarchy` - `ImGuiFocusedFlags_None` - `ImGuiFocusedFlags_RootAndChildWindows` - `ImGuiFocusedFlags_RootWindow` ## ImGuiHoveredFlags - `ImGuiHoveredFlags_AllowWhenBlockedByActiveItem` - `ImGuiHoveredFlags_AllowWhenBlockedByModal` - `ImGuiHoveredFlags_AllowWhenBlockedByPopup` - `ImGuiHoveredFlags_AllowWhenDisabled` - `ImGuiHoveredFlags_AllowWhenOverlapped` - `ImGuiHoveredFlags_AllowWhenOverlappedByItem` - `ImGuiHoveredFlags_AllowWhenOverlappedByWindow` - `ImGuiHoveredFlags_AnyWindow` - `ImGuiHoveredFlags_ChildWindows` - `ImGuiHoveredFlags_DelayNone` - `ImGuiHoveredFlags_DelayNormal` - `ImGuiHoveredFlags_DelayShort` - `ImGuiHoveredFlags_DockHierarchy` - `ImGuiHoveredFlags_ForTooltip` - `ImGuiHoveredFlags_NoNavOverride` - `ImGuiHoveredFlags_NoPopupHierarchy` - `ImGuiHoveredFlags_NoSharedDelay` - `ImGuiHoveredFlags_None` - `ImGuiHoveredFlags_RectOnly` - `ImGuiHoveredFlags_RootAndChildWindows` - `ImGuiHoveredFlags_RootWindow` - `ImGuiHoveredFlags_Stationary` ## ImGuiInputFlags - `ImGuiInputFlags_None` - `ImGuiInputFlags_Repeat` - `ImGuiInputFlags_RouteActive` - `ImGuiInputFlags_RouteAlways` - `ImGuiInputFlags_RouteFocused` - `ImGuiInputFlags_RouteFromRootWindow` - `ImGuiInputFlags_RouteGlobal` - `ImGuiInputFlags_RouteOverActive` - `ImGuiInputFlags_RouteOverFocused` - `ImGuiInputFlags_RouteUnlessBgFocused` - `ImGuiInputFlags_Tooltip` ## ImGuiInputTextFlags - `ImGuiInputTextFlags_AllowTabInput` - `ImGuiInputTextFlags_AlwaysOverwrite` - `ImGuiInputTextFlags_AutoSelectAll` - `ImGuiInputTextFlags_CallbackAlways` - `ImGuiInputTextFlags_CallbackCharFilter` - `ImGuiInputTextFlags_CallbackCompletion` - `ImGuiInputTextFlags_CallbackEdit` - `ImGuiInputTextFlags_CallbackHistory` - `ImGuiInputTextFlags_CallbackResize` - `ImGuiInputTextFlags_CharsDecimal` - `ImGuiInputTextFlags_CharsHexadecimal` - `ImGuiInputTextFlags_CharsNoBlank` - `ImGuiInputTextFlags_CharsScientific` - `ImGuiInputTextFlags_CharsUppercase` - `ImGuiInputTextFlags_CtrlEnterForNewLine` - `ImGuiInputTextFlags_DisplayEmptyRefVal` - `ImGuiInputTextFlags_ElideLeft` - `ImGuiInputTextFlags_EnterReturnsTrue` - `ImGuiInputTextFlags_EscapeClearsAll` - `ImGuiInputTextFlags_NoHorizontalScroll` - `ImGuiInputTextFlags_NoUndoRedo` - `ImGuiInputTextFlags_None` - `ImGuiInputTextFlags_ParseEmptyRefVal` - `ImGuiInputTextFlags_Password` - `ImGuiInputTextFlags_ReadOnly` ## ImGuiItemFlags - `ImGuiItemFlags_AllowDuplicateId` - `ImGuiItemFlags_AutoClosePopups` - `ImGuiItemFlags_ButtonRepeat` - `ImGuiItemFlags_NoNav` - `ImGuiItemFlags_NoNavDefaultFocus` - `ImGuiItemFlags_NoTabStop` - `ImGuiItemFlags_None` ## ImGuiKey - `ImGuiKey_0` - `ImGuiKey_A` - `ImGuiKey_Apostrophe` - `ImGuiKey_AppBack` - `ImGuiKey_AppForward` - `ImGuiKey_Backslash` - `ImGuiKey_Backspace` - `ImGuiKey_COUNT` - `ImGuiKey_CapsLock` - `ImGuiKey_Comma` - `ImGuiKey_Delete` - `ImGuiKey_DownArrow` - `ImGuiKey_End` - `ImGuiKey_Enter` - `ImGuiKey_Equal` - `ImGuiKey_Escape` - `ImGuiKey_F1` - `ImGuiKey_F13` - `ImGuiKey_F19` - `ImGuiKey_F7` - `ImGuiKey_GamepadBack` - `ImGuiKey_GamepadDpadDown` - `ImGuiKey_GamepadDpadLeft` - `ImGuiKey_GamepadDpadRight` - `ImGuiKey_GamepadDpadUp` - `ImGuiKey_GamepadFaceDown` - `ImGuiKey_GamepadFaceLeft` - `ImGuiKey_GamepadFaceRight` - `ImGuiKey_GamepadFaceUp` - `ImGuiKey_GamepadL1` - `ImGuiKey_GamepadL2` - `ImGuiKey_GamepadL3` - `ImGuiKey_GamepadLStickDown` - `ImGuiKey_GamepadLStickLeft` - `ImGuiKey_GamepadLStickRight` - `ImGuiKey_GamepadLStickUp` - `ImGuiKey_GamepadR1` - `ImGuiKey_GamepadR2` - `ImGuiKey_GamepadR3` - `ImGuiKey_GamepadRStickDown` - `ImGuiKey_GamepadRStickLeft` - `ImGuiKey_GamepadRStickRight` - `ImGuiKey_GamepadRStickUp` - `ImGuiKey_GamepadStart` - `ImGuiKey_GraveAccent` - `ImGuiKey_Home` - `ImGuiKey_Insert` - `ImGuiKey_K` - `ImGuiKey_Keypad0` - `ImGuiKey_Keypad5` - `ImGuiKey_KeypadAdd` - `ImGuiKey_KeypadDecimal` - `ImGuiKey_KeypadDivide` - `ImGuiKey_KeypadEnter` - `ImGuiKey_KeypadEqual` - `ImGuiKey_KeypadMultiply` - `ImGuiKey_KeypadSubtract` - `ImGuiKey_LeftArrow` - `ImGuiKey_LeftBracket` - `ImGuiKey_LeftCtrl` - `ImGuiKey_Menu` - `ImGuiKey_Minus` - `ImGuiKey_ModCtrl` - `ImGuiKey_MouseLeft` - `ImGuiKey_NamedKey_BEGIN` - `ImGuiKey_NamedKey_COUNT` - `ImGuiKey_NamedKey_END` - `ImGuiKey_None` - `ImGuiKey_NumLock` - `ImGuiKey_Oem102` - `ImGuiKey_PageDown` - `ImGuiKey_PageUp` - `ImGuiKey_Pause` - `ImGuiKey_Period` - `ImGuiKey_PrintScreen` - `ImGuiKey_ReservedForModCtrl` - `ImGuiKey_RightArrow` - `ImGuiKey_RightBracket` - `ImGuiKey_RightCtrl` - `ImGuiKey_ScrollLock` - `ImGuiKey_Semicolon` - `ImGuiKey_Slash` - `ImGuiKey_Space` - `ImGuiKey_Tab` - `ImGuiKey_U` - `ImGuiKey_UpArrow` ## ImGuiMouseButton - `ImGuiMouseButton_COUNT` - `ImGuiMouseButton_Left` - `ImGuiMouseButton_Middle` - `ImGuiMouseButton_Right` ## ImGuiMouseCursor - `ImGuiMouseCursor_Arrow` - `ImGuiMouseCursor_Hand` - `ImGuiMouseCursor_None` - `ImGuiMouseCursor_NotAllowed` - `ImGuiMouseCursor_Progress` - `ImGuiMouseCursor_ResizeAll` - `ImGuiMouseCursor_ResizeEW` - `ImGuiMouseCursor_ResizeNESW` - `ImGuiMouseCursor_ResizeNS` - `ImGuiMouseCursor_ResizeNWSE` - `ImGuiMouseCursor_TextInput` - `ImGuiMouseCursor_Wait` ## ImGuiMultiSelectFlags - `ImGuiMultiSelectFlags_BoxSelect1d` - `ImGuiMultiSelectFlags_BoxSelect2d` - `ImGuiMultiSelectFlags_BoxSelectNoScroll` - `ImGuiMultiSelectFlags_ClearOnClickVoid` - `ImGuiMultiSelectFlags_ClearOnEscape` - `ImGuiMultiSelectFlags_NavWrapX` - `ImGuiMultiSelectFlags_NoAutoClear` - `ImGuiMultiSelectFlags_NoAutoClearOnReselect` - `ImGuiMultiSelectFlags_NoAutoSelect` - `ImGuiMultiSelectFlags_NoRangeSelect` - `ImGuiMultiSelectFlags_NoSelectAll` - `ImGuiMultiSelectFlags_None` - `ImGuiMultiSelectFlags_ScopeRect` - `ImGuiMultiSelectFlags_ScopeWindow` - `ImGuiMultiSelectFlags_SelectOnClick` - `ImGuiMultiSelectFlags_SelectOnClickRelease` - `ImGuiMultiSelectFlags_SingleSelect` ## ImGuiPopupFlags - `ImGuiPopupFlags_AnyPopup` - `ImGuiPopupFlags_AnyPopupId` - `ImGuiPopupFlags_AnyPopupLevel` - `ImGuiPopupFlags_MouseButtonDefault_` - `ImGuiPopupFlags_MouseButtonLeft` - `ImGuiPopupFlags_MouseButtonMask_` - `ImGuiPopupFlags_MouseButtonMiddle` - `ImGuiPopupFlags_MouseButtonRight` - `ImGuiPopupFlags_NoOpenOverExistingPopup` - `ImGuiPopupFlags_NoOpenOverItems` - `ImGuiPopupFlags_NoReopen` - `ImGuiPopupFlags_None` ## ImGuiSelectableFlags - `ImGuiSelectableFlags_AllowDoubleClick` - `ImGuiSelectableFlags_AllowItemOverlap` - `ImGuiSelectableFlags_AllowOverlap` - `ImGuiSelectableFlags_Disabled` - `ImGuiSelectableFlags_DontClosePopups` - `ImGuiSelectableFlags_Highlight` - `ImGuiSelectableFlags_NoAutoClosePopups` - `ImGuiSelectableFlags_None` - `ImGuiSelectableFlags_SpanAllColumns` ## ImGuiSliderFlags - `ImGuiSliderFlags_AlwaysClamp` - `ImGuiSliderFlags_ClampOnInput` - `ImGuiSliderFlags_ClampZeroRange` - `ImGuiSliderFlags_InvalidMask_` - `ImGuiSliderFlags_Logarithmic` - `ImGuiSliderFlags_NoInput` - `ImGuiSliderFlags_NoRoundToFormat` - `ImGuiSliderFlags_NoSpeedTweaks` - `ImGuiSliderFlags_None` - `ImGuiSliderFlags_WrapAround` ## ImGuiStyleVar - `ImGuiStyleVar_Alpha` - `ImGuiStyleVar_ButtonTextAlign` - `ImGuiStyleVar_CellPadding` - `ImGuiStyleVar_ChildBorderSize` - `ImGuiStyleVar_ChildRounding` - `ImGuiStyleVar_DisabledAlpha` - `ImGuiStyleVar_DockingSeparatorSize` - `ImGuiStyleVar_FrameBorderSize` - `ImGuiStyleVar_FramePadding` - `ImGuiStyleVar_FrameRounding` - `ImGuiStyleVar_GrabMinSize` - `ImGuiStyleVar_GrabRounding` - `ImGuiStyleVar_ImageBorderSize` - `ImGuiStyleVar_IndentSpacing` - `ImGuiStyleVar_ItemInnerSpacing` - `ImGuiStyleVar_ItemSpacing` - `ImGuiStyleVar_PopupBorderSize` - `ImGuiStyleVar_PopupRounding` - `ImGuiStyleVar_ScrollbarRounding` - `ImGuiStyleVar_ScrollbarSize` - `ImGuiStyleVar_SelectableTextAlign` - `ImGuiStyleVar_SeparatorTextAlign` - `ImGuiStyleVar_SeparatorTextBorderSize` - `ImGuiStyleVar_SeparatorTextPadding` - `ImGuiStyleVar_TabBarBorderSize` - `ImGuiStyleVar_TabBarOverlineSize` - `ImGuiStyleVar_TabBorderSize` - `ImGuiStyleVar_TabRounding` - `ImGuiStyleVar_TableAngledHeadersAngle` - `ImGuiStyleVar_TableAngledHeadersTextAlign` - `ImGuiStyleVar_WindowBorderSize` - `ImGuiStyleVar_WindowMinSize` - `ImGuiStyleVar_WindowPadding` - `ImGuiStyleVar_WindowRounding` - `ImGuiStyleVar_WindowTitleAlign` ## ImGuiTabBarFlags - `ImGuiTabBarFlags_AutoSelectNewTabs` - `ImGuiTabBarFlags_DrawSelectedOverline` - `ImGuiTabBarFlags_FittingPolicyDefault_` - `ImGuiTabBarFlags_FittingPolicyMask_` - `ImGuiTabBarFlags_FittingPolicyResizeDown` - `ImGuiTabBarFlags_FittingPolicyScroll` - `ImGuiTabBarFlags_NoCloseWithMiddleMouseButton` - `ImGuiTabBarFlags_NoTabListScrollingButtons` - `ImGuiTabBarFlags_NoTooltip` - `ImGuiTabBarFlags_None` - `ImGuiTabBarFlags_Reorderable` - `ImGuiTabBarFlags_TabListPopupButton` ## ImGuiTabItemFlags - `ImGuiTabItemFlags_Leading` - `ImGuiTabItemFlags_NoAssumedClosure` - `ImGuiTabItemFlags_NoCloseWithMiddleMouseButton` - `ImGuiTabItemFlags_NoPushId` - `ImGuiTabItemFlags_NoReorder` - `ImGuiTabItemFlags_NoTooltip` - `ImGuiTabItemFlags_None` - `ImGuiTabItemFlags_SetSelected` - `ImGuiTabItemFlags_Trailing` - `ImGuiTabItemFlags_UnsavedDocument` ## ImGuiTableColumnFlags - `ImGuiTableColumnFlags_AngledHeader` - `ImGuiTableColumnFlags_DefaultHide` - `ImGuiTableColumnFlags_DefaultSort` - `ImGuiTableColumnFlags_Disabled` - `ImGuiTableColumnFlags_IndentDisable` - `ImGuiTableColumnFlags_IndentEnable` - `ImGuiTableColumnFlags_IndentMask_` - `ImGuiTableColumnFlags_IsEnabled` - `ImGuiTableColumnFlags_IsHovered` - `ImGuiTableColumnFlags_IsSorted` - `ImGuiTableColumnFlags_IsVisible` - `ImGuiTableColumnFlags_NoClip` - `ImGuiTableColumnFlags_NoDirectResize_` - `ImGuiTableColumnFlags_NoHeaderLabel` - `ImGuiTableColumnFlags_NoHeaderWidth` - `ImGuiTableColumnFlags_NoHide` - `ImGuiTableColumnFlags_NoReorder` - `ImGuiTableColumnFlags_NoResize` - `ImGuiTableColumnFlags_NoSort` - `ImGuiTableColumnFlags_NoSortAscending` - `ImGuiTableColumnFlags_NoSortDescending` - `ImGuiTableColumnFlags_None` - `ImGuiTableColumnFlags_PreferSortAscending` - `ImGuiTableColumnFlags_PreferSortDescending` - `ImGuiTableColumnFlags_StatusMask_` - `ImGuiTableColumnFlags_WidthFixed` - `ImGuiTableColumnFlags_WidthMask_` - `ImGuiTableColumnFlags_WidthStretch` ## ImGuiTableFlags - `ImGuiTableFlags_Borders` - `ImGuiTableFlags_BordersH` - `ImGuiTableFlags_BordersInner` - `ImGuiTableFlags_BordersInnerH` - `ImGuiTableFlags_BordersInnerV` - `ImGuiTableFlags_BordersOuter` - `ImGuiTableFlags_BordersOuterH` - `ImGuiTableFlags_BordersOuterV` - `ImGuiTableFlags_BordersV` - `ImGuiTableFlags_ContextMenuInBody` - `ImGuiTableFlags_Hideable` - `ImGuiTableFlags_HighlightHoveredColumn` - `ImGuiTableFlags_NoBordersInBody` - `ImGuiTableFlags_NoBordersInBodyUntilResize` - `ImGuiTableFlags_NoClip` - `ImGuiTableFlags_NoHostExtendX` - `ImGuiTableFlags_NoHostExtendY` - `ImGuiTableFlags_NoKeepColumnsVisible` - `ImGuiTableFlags_NoPadInnerX` - `ImGuiTableFlags_NoPadOuterX` - `ImGuiTableFlags_NoSavedSettings` - `ImGuiTableFlags_None` - `ImGuiTableFlags_PadOuterX` - `ImGuiTableFlags_PreciseWidths` - `ImGuiTableFlags_Reorderable` - `ImGuiTableFlags_Resizable` - `ImGuiTableFlags_RowBg` - `ImGuiTableFlags_ScrollX` - `ImGuiTableFlags_ScrollY` - `ImGuiTableFlags_SizingFixedFit` - `ImGuiTableFlags_SizingFixedSame` - `ImGuiTableFlags_SizingMask_` - `ImGuiTableFlags_SizingStretchProp` - `ImGuiTableFlags_SizingStretchSame` - `ImGuiTableFlags_SortMulti` - `ImGuiTableFlags_SortTristate` - `ImGuiTableFlags_Sortable` ## ImGuiTableRowFlags - `ImGuiTableRowFlags_Headers` - `ImGuiTableRowFlags_None` ## ImGuiTreeNodeFlags - `ImGuiTreeNodeFlags_AllowItemOverlap` - `ImGuiTreeNodeFlags_AllowOverlap` - `ImGuiTreeNodeFlags_Bullet` - `ImGuiTreeNodeFlags_CollapsingHeader` - `ImGuiTreeNodeFlags_DefaultOpen` - `ImGuiTreeNodeFlags_FramePadding` - `ImGuiTreeNodeFlags_Framed` - `ImGuiTreeNodeFlags_LabelSpanAllColumns` - `ImGuiTreeNodeFlags_Leaf` - `ImGuiTreeNodeFlags_NavLeftJumpsBackHere` - `ImGuiTreeNodeFlags_NoAutoOpenOnLog` - `ImGuiTreeNodeFlags_NoTreePushOnOpen` - `ImGuiTreeNodeFlags_None` - `ImGuiTreeNodeFlags_OpenOnArrow` - `ImGuiTreeNodeFlags_OpenOnDoubleClick` - `ImGuiTreeNodeFlags_Selected` - `ImGuiTreeNodeFlags_SpanAllColumns` - `ImGuiTreeNodeFlags_SpanAvailWidth` - `ImGuiTreeNodeFlags_SpanFullWidth` - `ImGuiTreeNodeFlags_SpanLabelWidth` - `ImGuiTreeNodeFlags_SpanTextWidth` ## ImGuiViewportFlags - `ImGuiViewportFlags_CanHostOtherWindows` - `ImGuiViewportFlags_IsFocused` - `ImGuiViewportFlags_IsMinimized` - `ImGuiViewportFlags_IsPlatformMonitor` - `ImGuiViewportFlags_IsPlatformWindow` - `ImGuiViewportFlags_NoAutoMerge` - `ImGuiViewportFlags_NoDecoration` - `ImGuiViewportFlags_NoFocusOnAppearing` - `ImGuiViewportFlags_NoFocusOnClick` - `ImGuiViewportFlags_NoInputs` - `ImGuiViewportFlags_NoRendererClear` - `ImGuiViewportFlags_NoTaskBarIcon` - `ImGuiViewportFlags_None` - `ImGuiViewportFlags_OwnedByApp` - `ImGuiViewportFlags_TopMost` ## ImGuiWindowFlags - `ImGuiWindowFlags_AlwaysAutoResize` - `ImGuiWindowFlags_AlwaysHorizontalScrollbar` - `ImGuiWindowFlags_AlwaysUseWindowPadding` - `ImGuiWindowFlags_AlwaysVerticalScrollbar` - `ImGuiWindowFlags_ChildMenu` - `ImGuiWindowFlags_ChildWindow` - `ImGuiWindowFlags_DockNodeHost` - `ImGuiWindowFlags_HorizontalScrollbar` - `ImGuiWindowFlags_MenuBar` - `ImGuiWindowFlags_Modal` - `ImGuiWindowFlags_NavFlattened` - `ImGuiWindowFlags_NoBackground` - `ImGuiWindowFlags_NoBringToFrontOnFocus` - `ImGuiWindowFlags_NoCollapse` - `ImGuiWindowFlags_NoDecoration` - `ImGuiWindowFlags_NoDocking` - `ImGuiWindowFlags_NoFocusOnAppearing` - `ImGuiWindowFlags_NoInputs` - `ImGuiWindowFlags_NoMouseInputs` - `ImGuiWindowFlags_NoMove` - `ImGuiWindowFlags_NoNav` - `ImGuiWindowFlags_NoNavFocus` - `ImGuiWindowFlags_NoNavInputs` - `ImGuiWindowFlags_NoResize` - `ImGuiWindowFlags_NoSavedSettings` - `ImGuiWindowFlags_NoScrollWithMouse` - `ImGuiWindowFlags_NoScrollbar` - `ImGuiWindowFlags_NoTitleBar` - `ImGuiWindowFlags_None` - `ImGuiWindowFlags_Popup` - `ImGuiWindowFlags_Tooltip` - `ImGuiWindowFlags_UnsavedDocument` ## Other - `ImGuiDataType_Bool` - `ImGuiDataType_Double` - `ImGuiDataType_Float` - `ImGuiDataType_S16` - `ImGuiDataType_S32` - `ImGuiDataType_S64` - `ImGuiDataType_S8` - `ImGuiDataType_String` - `ImGuiDataType_U16` - `ImGuiDataType_U32` - `ImGuiDataType_U64` - `ImGuiDataType_U8` - `ImGuiMod_Alt` - `ImGuiMod_Ctrl` - `ImGuiMod_Mask_` - `ImGuiMod_None` - `ImGuiMod_Shift` - `ImGuiMod_Shortcut` - `ImGuiMod_Super` - `ImGuiMouseSource_Mouse` - `ImGuiMouseSource_Pen` - `ImGuiMouseSource_TouchScreen` - `ImGuiSelectionRequestType_None` - `ImGuiSelectionRequestType_SetAll` - `ImGuiSelectionRequestType_SetRange` - `ImGuiSortDirection_Ascending` - `ImGuiSortDirection_Descending` - `ImGuiSortDirection_None` - `ImGuiTableBgTarget_CellBg` - `ImGuiTableBgTarget_None` - `ImGuiTableBgTarget_RowBg0` - `ImGuiTableBgTarget_RowBg1` --- # ImGui # ImGui Immediate-mode UI commands. Call these commands from an `ImGui.OnRender` callback. ## Function index | Function | Summary | | --- | --- | | [`ImGui.AcceptDragDropPayload`](#imgui-acceptdragdroppayload) | ImGui.AcceptDragDropPayload accepts a drag-and-drop payload with the requested type while a drag target is active. | | [`ImGui.AlignTextToFramePadding`](#imgui-aligntexttoframepadding) | ImGui.AlignTextToFramePadding moves the current text baseline to match framed widgets on the same row. | | [`ImGui.ArrowButton`](#imgui-arrowbutton) | ImGui.ArrowButton draws an arrow button and reports whether it was clicked. | | [`ImGui.ArrowButtonEx`](#imgui-arrowbuttonex) | ImGui.ArrowButtonEx draws a directional button with an explicit size and returns true on activation. | | [`ImGui.Begin`](#imgui-begin) | ImGui.Begin starts for the current frame and reports whether its contents should be submitted. | | [`ImGui.BeginChild`](#imgui-beginchild) | ImGui.BeginChild starts child for the current frame and reports whether its contents should be submitted. | | [`ImGui.BeginCombo`](#imgui-begincombo) | ImGui.BeginCombo starts combo for the current frame and reports whether its contents should be submitted. | | [`ImGui.BeginDragDropSource`](#imgui-begindragdropsource) | ImGui.BeginDragDropSource starts drag drop source for the current frame and reports whether its contents should be submitted. | | [`ImGui.BeginDragDropTarget`](#imgui-begindragdroptarget) | ImGui.BeginDragDropTarget starts drag drop target for the current frame and reports whether its contents should be submitted. | | [`ImGui.BeginGroup`](#imgui-begingroup) | ImGui.BeginGroup starts group for the current frame and reports whether its contents should be submitted. | | [`ImGui.BeginItemTooltip`](#imgui-beginitemtooltip) | ImGui.BeginItemTooltip starts item tooltip for the current frame and reports whether its contents should be submitted. | | [`ImGui.BeginListBox`](#imgui-beginlistbox) | ImGui.BeginListBox starts list box for the current frame and reports whether its contents should be submitted. | | [`ImGui.BeginMainMenuBar`](#imgui-beginmainmenubar) | ImGui.BeginMainMenuBar starts main menu bar for the current frame and reports whether its contents should be submitted. | | [`ImGui.BeginMenu`](#imgui-beginmenu) | ImGui.BeginMenu starts menu for the current frame and reports whether its contents should be submitted. | | [`ImGui.BeginMenuBar`](#imgui-beginmenubar) | ImGui.BeginMenuBar starts menu bar for the current frame and reports whether its contents should be submitted. | | [`ImGui.BeginPopup`](#imgui-beginpopup) | ImGui.BeginPopup starts popup for the current frame and reports whether its contents should be submitted. | | [`ImGui.BeginPopupContextItem`](#imgui-beginpopupcontextitem) | ImGui.BeginPopupContextItem starts popup context item for the current frame and reports whether its contents should be submitted. | | [`ImGui.BeginPopupContextVoid`](#imgui-beginpopupcontextvoid) | ImGui.BeginPopupContextVoid starts popup context void for the current frame and reports whether its contents should be submitted. | | [`ImGui.BeginPopupContextWindow`](#imgui-beginpopupcontextwindow) | ImGui.BeginPopupContextWindow starts popup context window for the current frame and reports whether its contents should be submitted. | | [`ImGui.BeginPopupModal`](#imgui-beginpopupmodal) | ImGui.BeginPopupModal starts popup modal for the current frame and reports whether its contents should be submitted. | | [`ImGui.BeginTabBar`](#imgui-begintabbar) | ImGui.BeginTabBar starts tab bar for the current frame and reports whether its contents should be submitted. | | [`ImGui.BeginTabItem`](#imgui-begintabitem) | ImGui.BeginTabItem starts tab item for the current frame and reports whether its contents should be submitted. | | [`ImGui.BeginTable`](#imgui-begintable) | ImGui.BeginTable starts table for the current frame and reports whether its contents should be submitted. | | [`ImGui.BeginTooltip`](#imgui-begintooltip) | ImGui.BeginTooltip starts tooltip for the current frame and reports whether its contents should be submitted. | | [`ImGui.BeginTooltipEx`](#imgui-begintooltipex) | ImGui.BeginTooltipEx starts tooltip ex for the current frame and reports whether its contents should be submitted. | | [`ImGui.BeginTooltipHidden`](#imgui-begintooltiphidden) | ImGui.BeginTooltipHidden starts tooltip hidden for the current frame and reports whether its contents should be submitted. | | [`ImGui.Bullet`](#imgui-bullet) | ImGui.Bullet draws a bullet marker at the current cursor position without adding text. | | [`ImGui.BulletText`](#imgui-bullettext) | ImGui.BulletText draws text with a leading bullet. | | [`ImGui.Button`](#imgui-button) | ImGui.Button draws a button and reports whether it was clicked. | | [`ImGui.ButtonEx`](#imgui-buttonex) | ImGui.ButtonEx draws a button with the supplied label and flags and returns true on activation. | | [`ImGui.CalcTextSize`](#imgui-calctextsize) | ImGui.CalcTextSize returns the display size of the supplied text. | | [`ImGui.Checkbox`](#imgui-checkbox) | ImGui.Checkbox draws a checkbox and returns its value and change state. | | [`ImGui.CloseCurrentPopup`](#imgui-closecurrentpopup) | ImGui.CloseCurrentPopup closes the ImGui current popup. | | [`ImGui.CollapsingHeader`](#imgui-collapsingheader) | ImGui.CollapsingHeader draws a header that the user can expand or collapse. | | [`ImGui.ColorButton`](#imgui-colorbutton) | ImGui.ColorButton draws a clickable color swatch and returns true when the swatch is activated. | | [`ImGui.ColorEdit3`](#imgui-coloredit3) | ImGui.ColorEdit3 draws an RGB editor and returns its color and change state. | | [`ImGui.ColorEdit4`](#imgui-coloredit4) | ImGui.ColorEdit4 draws an RGBA editor and returns its color and change state. | | [`ImGui.ColorPicker3`](#imgui-colorpicker3) | ImGui.ColorPicker3 draws an RGB picker and returns its color and change state. | | [`ImGui.ColorPicker4`](#imgui-colorpicker4) | ImGui.ColorPicker4 draws an RGBA picker and returns its color and change state. | | [`ImGui.Combo`](#imgui-combo) | ImGui.Combo draws a combo box and returns its selected index and change state. | | [`ImGui.DockSpace`](#imgui-dockspace) | ImGui.DockSpace creates a docking node in the current window using the supplied identifier, size, and docking flags. | | [`ImGui.DragFloat`](#imgui-dragfloat) | ImGui.DragFloat draws a draggable number input and returns its value and change state. | | [`ImGui.DragInt`](#imgui-dragint) | ImGui.DragInt draws a draggable integer input and returns its value and change state. | | [`ImGui.DrawCircle`](#imgui-drawcircle) | ImGui.DrawCircle adds circle to the current window draw list. | | [`ImGui.DrawCircleFilled`](#imgui-drawcirclefilled) | ImGui.DrawCircleFilled adds circle filled to the current window draw list. | | [`ImGui.DrawLine`](#imgui-drawline) | ImGui.DrawLine adds line to the current window draw list. | | [`ImGui.DrawRect`](#imgui-drawrect) | ImGui.DrawRect adds rect to the current window draw list. | | [`ImGui.DrawRectFilled`](#imgui-drawrectfilled) | ImGui.DrawRectFilled adds rect filled to the current window draw list. | | [`ImGui.DrawText`](#imgui-drawtext) | ImGui.DrawText adds text to the current window draw list. | | [`ImGui.Dummy`](#imgui-dummy) | ImGui.Dummy adds an invisible item of the specified size. | | [`ImGui.End`](#imgui-end) | ImGui.End closes the current scope. | | [`ImGui.EndChild`](#imgui-endchild) | ImGui.EndChild closes the current child scope. | | [`ImGui.EndCombo`](#imgui-endcombo) | ImGui.EndCombo closes the current combo scope. | | [`ImGui.EndDragDropSource`](#imgui-enddragdropsource) | ImGui.EndDragDropSource closes the current drag drop source scope. | | [`ImGui.EndDragDropTarget`](#imgui-enddragdroptarget) | ImGui.EndDragDropTarget closes the current drag drop target scope. | | [`ImGui.EndGroup`](#imgui-endgroup) | ImGui.EndGroup closes the current group scope. | | [`ImGui.EndListBox`](#imgui-endlistbox) | ImGui.EndListBox closes the current list box scope. | | [`ImGui.EndMainMenuBar`](#imgui-endmainmenubar) | ImGui.EndMainMenuBar closes the current main menu bar scope. | | [`ImGui.EndMenu`](#imgui-endmenu) | ImGui.EndMenu closes the current menu scope. | | [`ImGui.EndMenuBar`](#imgui-endmenubar) | ImGui.EndMenuBar closes the current menu bar scope. | | [`ImGui.EndPopup`](#imgui-endpopup) | ImGui.EndPopup closes the current popup scope. | | [`ImGui.EndTabBar`](#imgui-endtabbar) | ImGui.EndTabBar closes the current tab bar scope. | | [`ImGui.EndTabItem`](#imgui-endtabitem) | ImGui.EndTabItem closes the current tab item scope. | | [`ImGui.EndTable`](#imgui-endtable) | ImGui.EndTable closes the current table scope. | | [`ImGui.EndTooltip`](#imgui-endtooltip) | ImGui.EndTooltip closes the current tooltip scope. | | [`ImGui.GetClipboardText`](#imgui-getclipboardtext) | ImGui.GetClipboardText returns the current clipboard text from ImGui. | | [`ImGui.GetColorU32`](#imgui-getcoloru32) | ImGui.GetColorU32 returns the current color u32 from ImGui. | | [`ImGui.GetContentRegionAvail`](#imgui-getcontentregionavail) | ImGui.GetContentRegionAvail returns the current content region avail from ImGui. | | [`ImGui.GetCursorPos`](#imgui-getcursorpos) | ImGui.GetCursorPos returns the current cursor pos from ImGui. | | [`ImGui.GetCursorPosX`](#imgui-getcursorposx) | ImGui.GetCursorPosX returns the current cursor pos x from ImGui. | | [`ImGui.GetCursorPosY`](#imgui-getcursorposy) | ImGui.GetCursorPosY returns the current cursor pos y from ImGui. | | [`ImGui.GetCursorScreenPos`](#imgui-getcursorscreenpos) | ImGui.GetCursorScreenPos returns the current cursor screen pos from ImGui. | | [`ImGui.GetCursorStartPos`](#imgui-getcursorstartpos) | ImGui.GetCursorStartPos returns the current cursor start pos from ImGui. | | [`ImGui.GetFontSize`](#imgui-getfontsize) | ImGui.GetFontSize returns the current font size from ImGui. | | [`ImGui.GetFrameCount`](#imgui-getframecount) | ImGui.GetFrameCount returns the current frame count from ImGui. | | [`ImGui.GetFrameHeight`](#imgui-getframeheight) | ImGui.GetFrameHeight returns the current frame height from ImGui. | | [`ImGui.GetFrameHeightWithSpacing`](#imgui-getframeheightwithspacing) | ImGui.GetFrameHeightWithSpacing returns the current frame height with spacing from ImGui. | | [`ImGui.GetID`](#imgui-getid) | ImGui.GetID returns the current i d from ImGui. | | [`ImGui.GetItemRectMax`](#imgui-getitemrectmax) | ImGui.GetItemRectMax returns the current item rect max from ImGui. | | [`ImGui.GetItemRectMin`](#imgui-getitemrectmin) | ImGui.GetItemRectMin returns the current item rect min from ImGui. | | [`ImGui.GetItemRectSize`](#imgui-getitemrectsize) | ImGui.GetItemRectSize returns the current item rect size from ImGui. | | [`ImGui.GetMouseCursor`](#imgui-getmousecursor) | ImGui.GetMouseCursor returns the current mouse cursor from ImGui. | | [`ImGui.GetMouseDragDelta`](#imgui-getmousedragdelta) | ImGui.GetMouseDragDelta returns the current mouse drag delta from ImGui. | | [`ImGui.GetMousePos`](#imgui-getmousepos) | ImGui.GetMousePos returns the current mouse pos from ImGui. | | [`ImGui.GetScrollMaxX`](#imgui-getscrollmaxx) | ImGui.GetScrollMaxX returns the current scroll max x from ImGui. | | [`ImGui.GetScrollMaxY`](#imgui-getscrollmaxy) | ImGui.GetScrollMaxY returns the current scroll max y from ImGui. | | [`ImGui.GetScrollX`](#imgui-getscrollx) | ImGui.GetScrollX returns the current scroll x from ImGui. | | [`ImGui.GetScrollY`](#imgui-getscrolly) | ImGui.GetScrollY returns the current scroll y from ImGui. | | [`ImGui.GetTextLineHeight`](#imgui-gettextlineheight) | ImGui.GetTextLineHeight returns the current text line height from ImGui. | | [`ImGui.GetTextLineHeightWithSpacing`](#imgui-gettextlineheightwithspacing) | ImGui.GetTextLineHeightWithSpacing returns the current text line height with spacing from ImGui. | | [`ImGui.GetWindowPos`](#imgui-getwindowpos) | ImGui.GetWindowPos returns the current window pos from ImGui. | | [`ImGui.GetWindowSize`](#imgui-getwindowsize) | ImGui.GetWindowSize returns the current window size from ImGui. | | [`ImGui.Image`](#imgui-image) | ImGui.Image draws an image. | | [`ImGui.ImageButton`](#imgui-imagebutton) | ImGui.ImageButton draws an image button and reports whether it was clicked. | | [`ImGui.Indent`](#imgui-indent) | ImGui.Indent moves the current layout cursor to the right. | | [`ImGui.InputFloat`](#imgui-inputfloat) | ImGui.InputFloat draws a number input and returns its value and change state. | | [`ImGui.InputInt`](#imgui-inputint) | ImGui.InputInt draws an integer input and returns its value and change state. | | [`ImGui.InputText`](#imgui-inputtext) | ImGui.InputText draws a text input and returns its change state and text. | | [`ImGui.InputTextMultiline`](#imgui-inputtextmultiline) | ImGui.InputTextMultiline draws a multiline text input and returns its change state and text. | | [`ImGui.InputTextWithHint`](#imgui-inputtextwithhint) | ImGui.InputTextWithHint draws a text input with hint text and returns its change state and text. | | [`ImGui.InvisibleButton`](#imgui-invisiblebutton) | ImGui.InvisibleButton creates an invisible button and reports whether it was activated. | | [`ImGui.IsAnyItemActive`](#imgui-isanyitemactive) | ImGui.IsAnyItemActive reports whether any item active for the current ImGui frame. | | [`ImGui.IsAnyItemFocused`](#imgui-isanyitemfocused) | ImGui.IsAnyItemFocused reports whether any item focused for the current ImGui frame. | | [`ImGui.IsAnyItemHovered`](#imgui-isanyitemhovered) | ImGui.IsAnyItemHovered reports whether any item hovered for the current ImGui frame. | | [`ImGui.IsItemActivated`](#imgui-isitemactivated) | ImGui.IsItemActivated reports whether item activated for the current ImGui frame. | | [`ImGui.IsItemActive`](#imgui-isitemactive) | ImGui.IsItemActive reports whether item active for the current ImGui frame. | | [`ImGui.IsItemClicked`](#imgui-isitemclicked) | ImGui.IsItemClicked reports whether item clicked for the current ImGui frame. | | [`ImGui.IsItemDeactivated`](#imgui-isitemdeactivated) | ImGui.IsItemDeactivated reports whether item deactivated for the current ImGui frame. | | [`ImGui.IsItemDeactivatedAfterEdit`](#imgui-isitemdeactivatedafteredit) | ImGui.IsItemDeactivatedAfterEdit reports whether item deactivated after edit for the current ImGui frame. | | [`ImGui.IsItemEdited`](#imgui-isitemedited) | ImGui.IsItemEdited reports whether item edited for the current ImGui frame. | | [`ImGui.IsItemFocused`](#imgui-isitemfocused) | ImGui.IsItemFocused reports whether item focused for the current ImGui frame. | | [`ImGui.IsItemHovered`](#imgui-isitemhovered) | ImGui.IsItemHovered reports whether item hovered for the current ImGui frame. | | [`ImGui.IsItemToggledOpen`](#imgui-isitemtoggledopen) | ImGui.IsItemToggledOpen reports whether item toggled open for the current ImGui frame. | | [`ImGui.IsItemVisible`](#imgui-isitemvisible) | ImGui.IsItemVisible reports whether item visible for the current ImGui frame. | | [`ImGui.IsKeyDown`](#imgui-iskeydown) | ImGui.IsKeyDown reports whether key down for the current ImGui frame. | | [`ImGui.IsKeyPressed`](#imgui-iskeypressed) | ImGui.IsKeyPressed reports whether key pressed for the current ImGui frame. | | [`ImGui.IsKeyReleased`](#imgui-iskeyreleased) | ImGui.IsKeyReleased reports whether key released for the current ImGui frame. | | [`ImGui.IsMouseClicked`](#imgui-ismouseclicked) | ImGui.IsMouseClicked reports whether mouse clicked for the current ImGui frame. | | [`ImGui.IsMouseDoubleClicked`](#imgui-ismousedoubleclicked) | ImGui.IsMouseDoubleClicked reports whether mouse double clicked for the current ImGui frame. | | [`ImGui.IsMouseDown`](#imgui-ismousedown) | ImGui.IsMouseDown reports whether mouse down for the current ImGui frame. | | [`ImGui.IsMouseDragging`](#imgui-ismousedragging) | ImGui.IsMouseDragging reports whether mouse dragging for the current ImGui frame. | | [`ImGui.IsMouseReleased`](#imgui-ismousereleased) | ImGui.IsMouseReleased reports whether mouse released for the current ImGui frame. | | [`ImGui.IsPopupOpen`](#imgui-ispopupopen) | ImGui.IsPopupOpen reports whether popup open for the current ImGui frame. | | [`ImGui.IsWindowAppearing`](#imgui-iswindowappearing) | ImGui.IsWindowAppearing reports whether window appearing for the current ImGui frame. | | [`ImGui.IsWindowCollapsed`](#imgui-iswindowcollapsed) | ImGui.IsWindowCollapsed reports whether window collapsed for the current ImGui frame. | | [`ImGui.IsWindowFocused`](#imgui-iswindowfocused) | ImGui.IsWindowFocused reports whether window focused for the current ImGui frame. | | [`ImGui.IsWindowHovered`](#imgui-iswindowhovered) | ImGui.IsWindowHovered reports whether window hovered for the current ImGui frame. | | [`ImGui.ListBox`](#imgui-listbox) | ImGui.ListBox draws a scrollable list of labels and returns the selected index together with a changed flag. | | [`ImGui.MenuItem`](#imgui-menuitem) | ImGui.MenuItem adds an item to the current menu and returns its selected state together with an activation flag. | | [`ImGui.NewLine`](#imgui-newline) | ImGui.NewLine moves the cursor to a new line. | | [`ImGui.OnRender`](#imgui-onrender) | ImGui.OnRender registers a function that records ImGui commands each render frame. | | [`ImGui.OpenPopup`](#imgui-openpopup) | ImGui.OpenPopup opens the ImGui popup. | | [`ImGui.PlotHistogram`](#imgui-plothistogram) | ImGui.PlotHistogram draws numeric samples as vertical histogram bars. | | [`ImGui.PlotLines`](#imgui-plotlines) | ImGui.PlotLines draws numeric samples as a connected line graph. | | [`ImGui.PopFont`](#imgui-popfont) | ImGui.PopFont removes the most recently pushed font from the matching ImGui stack. | | [`ImGui.PopID`](#imgui-popid) | ImGui.PopID removes the most recently pushed i d from the matching ImGui stack. | | [`ImGui.PopItemFlag`](#imgui-popitemflag) | ImGui.PopItemFlag removes the most recently pushed item flag from the matching ImGui stack. | | [`ImGui.PopItemWidth`](#imgui-popitemwidth) | ImGui.PopItemWidth removes the most recently pushed item width from the matching ImGui stack. | | [`ImGui.PopStyleColor`](#imgui-popstylecolor) | ImGui.PopStyleColor removes the most recently pushed style color from the matching ImGui stack. | | [`ImGui.PopStyleVar`](#imgui-popstylevar) | ImGui.PopStyleVar removes the most recently pushed style var from the matching ImGui stack. | | [`ImGui.PopTextWrapPos`](#imgui-poptextwrappos) | ImGui.PopTextWrapPos removes the most recently pushed text wrap pos from the matching ImGui stack. | | [`ImGui.ProgressBar`](#imgui-progressbar) | ImGui.ProgressBar draws a progress indicator for fraction, normally from 0 to 1, with optional size and overlay text. | | [`ImGui.PushFont`](#imgui-pushfont) | ImGui.PushFont pushes font onto the matching ImGui stack. | | [`ImGui.PushID`](#imgui-pushid) | ImGui.PushID pushes i d onto the matching ImGui stack. | | [`ImGui.PushItemFlag`](#imgui-pushitemflag) | ImGui.PushItemFlag pushes item flag onto the matching ImGui stack. | | [`ImGui.PushItemWidth`](#imgui-pushitemwidth) | ImGui.PushItemWidth pushes item width onto the matching ImGui stack. | | [`ImGui.PushStyleColor`](#imgui-pushstylecolor) | ImGui.PushStyleColor pushes style color onto the matching ImGui stack. | | [`ImGui.PushStyleVar`](#imgui-pushstylevar) | ImGui.PushStyleVar pushes style var onto the matching ImGui stack. | | [`ImGui.PushTextWrapPos`](#imgui-pushtextwrappos) | ImGui.PushTextWrapPos pushes text wrap pos onto the matching ImGui stack. | | [`ImGui.RadioButton`](#imgui-radiobutton) | ImGui.RadioButton draws a radio button and reports whether it was selected. | | [`ImGui.ResetMouseDragDelta`](#imgui-resetmousedragdelta) | ImGui.ResetMouseDragDelta resets the ImGui mouse drag delta. | | [`ImGui.SameLine`](#imgui-sameline) | ImGui.SameLine places the next item on the current line. | | [`ImGui.Selectable`](#imgui-selectable) | ImGui.Selectable draws a row that can be selected and returns its current state together with an activation flag. | | [`ImGui.Separator`](#imgui-separator) | ImGui.Separator draws a separator on the current layout axis. | | [`ImGui.SeparatorText`](#imgui-separatortext) | ImGui.SeparatorText draws a labeled separator. | | [`ImGui.SetClipboardText`](#imgui-setclipboardtext) | ImGui.SetClipboardText sets clipboard text in the current ImGui context. | | [`ImGui.SetCursorPos`](#imgui-setcursorpos) | ImGui.SetCursorPos sets cursor pos in the current ImGui context. | | [`ImGui.SetCursorPosX`](#imgui-setcursorposx) | ImGui.SetCursorPosX sets cursor pos x in the current ImGui context. | | [`ImGui.SetCursorPosY`](#imgui-setcursorposy) | ImGui.SetCursorPosY sets cursor pos y in the current ImGui context. | | [`ImGui.SetCursorScreenPos`](#imgui-setcursorscreenpos) | ImGui.SetCursorScreenPos sets cursor screen pos in the current ImGui context. | | [`ImGui.SetDragDropPayload`](#imgui-setdragdroppayload) | ImGui.SetDragDropPayload sets drag drop payload in the current ImGui context. | | [`ImGui.SetItemAllowOverlap`](#imgui-setitemallowoverlap) | ImGui.SetItemAllowOverlap sets item allow overlap in the current ImGui context. | | [`ImGui.SetItemDefaultFocus`](#imgui-setitemdefaultfocus) | ImGui.SetItemDefaultFocus sets item default focus in the current ImGui context. | | [`ImGui.SetItemTooltip`](#imgui-setitemtooltip) | ImGui.SetItemTooltip sets item tooltip in the current ImGui context. | | [`ImGui.SetKeyboardFocusHere`](#imgui-setkeyboardfocushere) | ImGui.SetKeyboardFocusHere sets keyboard focus here in the current ImGui context. | | [`ImGui.SetMouseCursor`](#imgui-setmousecursor) | ImGui.SetMouseCursor sets mouse cursor in the current ImGui context. | | [`ImGui.SetNextItemOpen`](#imgui-setnextitemopen) | ImGui.SetNextItemOpen sets item open for the next matching ImGui item or window. | | [`ImGui.SetNextItemShortcut`](#imgui-setnextitemshortcut) | ImGui.SetNextItemShortcut sets item shortcut for the next matching ImGui item or window. | | [`ImGui.SetNextItemWidth`](#imgui-setnextitemwidth) | ImGui.SetNextItemWidth sets item width for the next matching ImGui item or window. | | [`ImGui.SetNextWindowBgAlpha`](#imgui-setnextwindowbgalpha) | ImGui.SetNextWindowBgAlpha sets window bg alpha for the next matching ImGui item or window. | | [`ImGui.SetNextWindowCollapsed`](#imgui-setnextwindowcollapsed) | ImGui.SetNextWindowCollapsed sets window collapsed for the next matching ImGui item or window. | | [`ImGui.SetNextWindowContentSize`](#imgui-setnextwindowcontentsize) | ImGui.SetNextWindowContentSize sets window content size for the next matching ImGui item or window. | | [`ImGui.SetNextWindowFocus`](#imgui-setnextwindowfocus) | ImGui.SetNextWindowFocus sets window focus for the next matching ImGui item or window. | | [`ImGui.SetNextWindowPos`](#imgui-setnextwindowpos) | ImGui.SetNextWindowPos sets window pos for the next matching ImGui item or window. | | [`ImGui.SetNextWindowScroll`](#imgui-setnextwindowscroll) | ImGui.SetNextWindowScroll sets window scroll for the next matching ImGui item or window. | | [`ImGui.SetNextWindowSize`](#imgui-setnextwindowsize) | ImGui.SetNextWindowSize sets window size for the next matching ImGui item or window. | | [`ImGui.SetNextWindowSizeConstraints`](#imgui-setnextwindowsizeconstraints) | ImGui.SetNextWindowSizeConstraints sets window size constraints for the next matching ImGui item or window. | | [`ImGui.SetScrollHereX`](#imgui-setscrollherex) | ImGui.SetScrollHereX sets scroll here x in the current ImGui context. | | [`ImGui.SetScrollHereY`](#imgui-setscrollherey) | ImGui.SetScrollHereY sets scroll here y in the current ImGui context. | | [`ImGui.SetScrollX`](#imgui-setscrollx) | ImGui.SetScrollX sets scroll x in the current ImGui context. | | [`ImGui.SetScrollY`](#imgui-setscrolly) | ImGui.SetScrollY sets scroll y in the current ImGui context. | | [`ImGui.SetTabItemClosed`](#imgui-settabitemclosed) | ImGui.SetTabItemClosed sets tab item closed in the current ImGui context. | | [`ImGui.SetTooltip`](#imgui-settooltip) | ImGui.SetTooltip sets tooltip in the current ImGui context. | | [`ImGui.Shortcut`](#imgui-shortcut) | ImGui.Shortcut tests an ImGui key chord in the current input context and returns true when the shortcut is triggered. | | [`ImGui.SliderAngle`](#imgui-sliderangle) | ImGui.SliderAngle draws an angle slider and returns its value and change state. | | [`ImGui.SliderFloat`](#imgui-sliderfloat) | ImGui.SliderFloat draws a number slider and returns its value and change state. | | [`ImGui.SliderInt`](#imgui-sliderint) | ImGui.SliderInt draws an integer slider and returns its value and change state. | | [`ImGui.SmallButton`](#imgui-smallbutton) | ImGui.SmallButton draws a compact button and reports whether it was clicked. | | [`ImGui.Spacing`](#imgui-spacing) | ImGui.Spacing adds one item-spacing unit to the layout. | | [`ImGui.StringBuffer`](#imgui-stringbuffer) | ImGui.StringBuffer creates mutable text storage for ImGui input widgets. | | [`ImGui.StyleColorsClassic`](#imgui-stylecolorsclassic) | ImGui.StyleColorsClassic applies the ImGui colors classic preset. | | [`ImGui.StyleColorsDark`](#imgui-stylecolorsdark) | ImGui.StyleColorsDark applies the ImGui colors dark preset. | | [`ImGui.StyleColorsLight`](#imgui-stylecolorslight) | ImGui.StyleColorsLight applies the ImGui colors light preset. | | [`ImGui.TabItemButton`](#imgui-tabitembutton) | ImGui.TabItemButton places a button in the current tab bar and returns true when it is activated. | | [`ImGui.TableGetColumnCount`](#imgui-tablegetcolumncount) | ImGui.TableGetColumnCount returns the number of columns in the current table. | | [`ImGui.TableGetColumnFlags`](#imgui-tablegetcolumnflags) | ImGui.TableGetColumnFlags returns the status flags for a column in the current table. | | [`ImGui.TableGetColumnIndex`](#imgui-tablegetcolumnindex) | ImGui.TableGetColumnIndex returns the zero-based index of the current table column. | | [`ImGui.TableGetColumnName`](#imgui-tablegetcolumnname) | ImGui.TableGetColumnName returns the display name of a column in the current table. | | [`ImGui.TableGetRowIndex`](#imgui-tablegetrowindex) | ImGui.TableGetRowIndex returns the zero-based index of the current table row. | | [`ImGui.TableHeader`](#imgui-tableheader) | ImGui.TableHeader draws one header cell using the current table column settings. | | [`ImGui.TableHeadersRow`](#imgui-tableheadersrow) | ImGui.TableHeadersRow draws the complete header row for the current table. | | [`ImGui.TableNextColumn`](#imgui-tablenextcolumn) | ImGui.TableNextColumn advances to the next enabled table column and reports whether that column is visible. | | [`ImGui.TableNextRow`](#imgui-tablenextrow) | ImGui.TableNextRow starts a new table row with optional row flags and minimum height. | | [`ImGui.TableSetBgColor`](#imgui-tablesetbgcolor) | ImGui.TableSetBgColor changes a row or cell background color in the current table. | | [`ImGui.TableSetColumnEnabled`](#imgui-tablesetcolumnenabled) | ImGui.TableSetColumnEnabled changes whether a table column is enabled. | | [`ImGui.TableSetColumnIndex`](#imgui-tablesetcolumnindex) | ImGui.TableSetColumnIndex selects a zero-based table column and reports whether it is visible. | | [`ImGui.TableSetupColumn`](#imgui-tablesetupcolumn) | ImGui.TableSetupColumn defines a table column before the first row, including its label, flags, width or weight, and optional user ID. | | [`ImGui.TableSetupScrollFreeze`](#imgui-tablesetupscrollfreeze) | ImGui.TableSetupScrollFreeze keeps the requested leading columns and rows visible while the table scrolls. | | [`ImGui.Text`](#imgui-text) | ImGui.Text draws unformatted text. | | [`ImGui.TextColored`](#imgui-textcolored) | ImGui.TextColored draws text in the specified color. | | [`ImGui.TextDisabled`](#imgui-textdisabled) | ImGui.TextDisabled draws text using the disabled-text style. | | [`ImGui.TextEx`](#imgui-textex) | ImGui.TextEx draws text with optional handling for the ## identifier suffix. | | [`ImGui.TextWrapped`](#imgui-textwrapped) | ImGui.TextWrapped draws text that wraps at the current content boundary. | | [`ImGui.TreeNode`](#imgui-treenode) | ImGui.TreeNode draws an expandable tree node and returns true while its child contents should be submitted. | | [`ImGui.TreeNodeEx`](#imgui-treenodeex) | ImGui.TreeNodeEx draws an expandable tree node with optional flags and ID. | | [`ImGui.TreePop`](#imgui-treepop) | ImGui.TreePop closes the most recent open tree-node scope. | | [`ImGui.Unindent`](#imgui-unindent) | ImGui.Unindent moves the current layout cursor to the left. | ## `ImGui.AcceptDragDropPayload` ### Description ImGui.AcceptDragDropPayload accepts a drag-and-drop payload with the requested type while a drag target is active. It returns the payload data and whether delivery occurred. ### Syntax ```luau ImGui.AcceptDragDropPayload(type: string, flags?: integer) -> (string?, boolean) ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `type` | `string` | Payload or object type name. | | `flags` | `integer?` | Bitwise ImGuiDragDropFlags value controlling payload acceptance. | ### Returns Returns `(string?, boolean)`. ### Errors Raises an error when called outside `ImGui.OnRender` or when `type` has an unsupported type or value. ### Notes Call this function only while ImGui.BeginDragDropTarget is active. Payload delivery becomes true when the user completes the drop. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.Button("Drag source") if ImGui.BeginDragDropSource() then ImGui.SetDragDropPayload("DOCS", "example payload") ImGui.Text("Drag this value") ImGui.EndDragDropSource() end ImGui.Button("Drop target") if ImGui.BeginDragDropTarget() then local payload, delivered = ImGui.AcceptDragDropPayload("DOCS") if delivered then print(payload) -- expected: "example payload" end ImGui.EndDragDropTarget() end end) ``` ## `ImGui.AlignTextToFramePadding` ### Description ImGui.AlignTextToFramePadding moves the current text baseline to match framed widgets on the same row. ### Syntax ```luau ImGui.AlignTextToFramePadding() -> () ``` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.AlignTextToFramePadding() -- expected: the operation completes without returning a value end) ``` ## `ImGui.ArrowButton` ### Description ImGui.ArrowButton draws an arrow button and reports whether it was clicked. ### Syntax ```luau ImGui.ArrowButton(label: string, direction: integer) -> boolean ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `label` | `string` | Visible label and ImGui identifier for the item. | | `direction` | `integer` | ImGuiDir value selecting the arrow direction. | ### Returns Returns true when it was clicked, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or when `label` or `direction` have an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.ArrowButton("Documentation", 1) -- expected: boolean end) ``` ## `ImGui.ArrowButtonEx` ### Description ImGui.ArrowButtonEx draws a directional button with an explicit size and returns true on activation. ### Syntax ```luau ImGui.ArrowButtonEx(label: string, direction: integer, size: Vector2, flags?: integer) -> boolean ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `label` | `string` | Visible label and ImGui identifier for the item. | | `direction` | `integer` | ImGuiDir value selecting the arrow direction. | | `size` | `Vector2` | Requested size, byte count, or dimensions. | | `flags` | `integer?` | Bitwise combination of flags accepted by this command. | ### Returns Returns true when the operation succeeds or its condition is met; otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or when `label` or `direction` or `size` have an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.ArrowButtonEx("Documentation", 1, Vector2.new(120, 24)) -- expected: boolean end) ``` ## `ImGui.Begin` ### Description ImGui.Begin starts for the current frame and reports whether its contents should be submitted. ### Syntax ```luau ImGui.Begin(title: string, open?: boolean, flags?: integer) -> (boolean, boolean) ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `title` | `string` | Console or window title. | | `open` | `boolean?` | Current open state supplied to the widget. | | `flags` | `integer?` | Bitwise combination of flags accepted by this command. | ### Returns Returns `(boolean, boolean)`. ### Errors Raises an error when called outside `ImGui.OnRender` or when `title` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() local visible = ImGui.Begin("Documentation") if visible then ImGui.Text("Window contents") end ImGui.End() end) -- expected: the scope is balanced each frame ``` ## `ImGui.BeginChild` ### Description ImGui.BeginChild starts child for the current frame and reports whether its contents should be submitted. ### Syntax ```luau ImGui.BeginChild(id: string, size?: Vector2, child_flags?: integer, window_flags?: integer) -> boolean ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `id` | `string` | Identifier used to locate or distinguish the object. | | `size` | `Vector2?` | Requested size, byte count, or dimensions. | | `child_flags` | `integer?` | Bitwise ImGuiChildFlags value applied to the child window. | | `window_flags` | `integer?` | Bitwise ImGuiWindowFlags value applied to the window. | ### Returns Returns true when its contents should be submitted, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or when `id` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.BeginChild("docs-child", Vector2.new(200, 100)) ImGui.Text("Child contents") ImGui.EndChild() end) -- expected: the scope is balanced each frame ``` ## `ImGui.BeginCombo` ### Description ImGui.BeginCombo starts combo for the current frame and reports whether its contents should be submitted. ### Syntax ```luau ImGui.BeginCombo(label: string, preview: string, flags?: integer) -> boolean ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `label` | `string` | Visible label and ImGui identifier for the item. | | `preview` | `string` | Text displayed in the closed combo box. | | `flags` | `integer?` | Bitwise combination of flags accepted by this command. | ### Returns Returns true when its contents should be submitted, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or when `label` or `preview` have an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.BeginCombo("Mode", "Default") then ImGui.Selectable("Default", true) ImGui.EndCombo() end end) -- expected: the scope is balanced each frame ``` ## `ImGui.BeginDragDropSource` ### Description ImGui.BeginDragDropSource starts drag drop source for the current frame and reports whether its contents should be submitted. ### Syntax ```luau ImGui.BeginDragDropSource(flags?: integer) -> boolean ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `flags` | `integer?` | Bitwise combination of flags accepted by this command. | ### Returns Returns true when its contents should be submitted, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.BeginDragDropSource() then ImGui.SetDragDropPayload("DOCS", "payload") ImGui.Text("Dragging payload") ImGui.EndDragDropSource() end end) -- expected: the scope is balanced each frame ``` ## `ImGui.BeginDragDropTarget` ### Description ImGui.BeginDragDropTarget starts drag drop target for the current frame and reports whether its contents should be submitted. ### Syntax ```luau ImGui.BeginDragDropTarget() -> boolean ``` ### Parameters This function has no parameters. ### Returns Returns true when its contents should be submitted, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.BeginDragDropTarget() then ImGui.AcceptDragDropPayload("DOCS") ImGui.EndDragDropTarget() end end) -- expected: the scope is balanced each frame ``` ## `ImGui.BeginGroup` ### Description ImGui.BeginGroup starts group for the current frame and reports whether its contents should be submitted. ### Syntax ```luau ImGui.BeginGroup() -> () ``` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.BeginGroup() ImGui.Text("Grouped text") ImGui.EndGroup() end) -- expected: the scope is balanced each frame ``` ## `ImGui.BeginItemTooltip` ### Description ImGui.BeginItemTooltip starts item tooltip for the current frame and reports whether its contents should be submitted. ### Syntax ```luau ImGui.BeginItemTooltip() -> boolean ``` ### Parameters This function has no parameters. ### Returns Returns true when its contents should be submitted, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.BeginItemTooltip() then ImGui.Text("Item details") ImGui.EndTooltip() end end) -- expected: the scope is balanced each frame ``` ## `ImGui.BeginListBox` ### Description ImGui.BeginListBox starts list box for the current frame and reports whether its contents should be submitted. ### Syntax ```luau ImGui.BeginListBox(label: string, size?: Vector2) -> boolean ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `label` | `string` | Visible label and ImGui identifier for the item. | | `size` | `Vector2?` | Requested size, byte count, or dimensions. | ### Returns Returns true when its contents should be submitted, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or when `label` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.BeginListBox("Items") then ImGui.Selectable("First", true) ImGui.EndListBox() end end) -- expected: the scope is balanced each frame ``` ## `ImGui.BeginMainMenuBar` ### Description ImGui.BeginMainMenuBar starts main menu bar for the current frame and reports whether its contents should be submitted. ### Syntax ```luau ImGui.BeginMainMenuBar() -> boolean ``` ### Parameters This function has no parameters. ### Returns Returns true when its contents should be submitted, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.BeginMainMenuBar() then ImGui.Text("Main menu") ImGui.EndMainMenuBar() end end) -- expected: the scope is balanced each frame ``` ## `ImGui.BeginMenu` ### Description ImGui.BeginMenu starts menu for the current frame and reports whether its contents should be submitted. ### Syntax ```luau ImGui.BeginMenu(label: string, enabled?: boolean) -> boolean ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `label` | `string` | Visible label and ImGui identifier for the item. | | `enabled` | `boolean?` | Whether the feature or connection should be enabled. | ### Returns Returns true when its contents should be submitted, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or when `label` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.BeginMenu("File") then ImGui.MenuItem("Close") ImGui.EndMenu() end end) -- expected: the scope is balanced each frame ``` ## `ImGui.BeginMenuBar` ### Description ImGui.BeginMenuBar starts menu bar for the current frame and reports whether its contents should be submitted. ### Syntax ```luau ImGui.BeginMenuBar() -> boolean ``` ### Parameters This function has no parameters. ### Returns Returns true when its contents should be submitted, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.BeginMenuBar() then ImGui.Text("Menu bar") ImGui.EndMenuBar() end end) -- expected: the scope is balanced each frame ``` ## `ImGui.BeginPopup` ### Description ImGui.BeginPopup starts popup for the current frame and reports whether its contents should be submitted. ### Syntax ```luau ImGui.BeginPopup(id: string, flags?: integer) -> boolean ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `id` | `string` | Identifier used to locate or distinguish the object. | | `flags` | `integer?` | Bitwise combination of flags accepted by this command. | ### Returns Returns true when its contents should be submitted, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or when `id` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.OpenPopup("docs-popup") if ImGui.BeginPopup("docs-popup") then ImGui.Text("Popup contents") ImGui.EndPopup() end end) -- expected: the scope is balanced each frame ``` ## `ImGui.BeginPopupContextItem` ### Description ImGui.BeginPopupContextItem starts popup context item for the current frame and reports whether its contents should be submitted. ### Syntax ```luau ImGui.BeginPopupContextItem() -> boolean ``` ### Parameters This function has no parameters. ### Returns Returns true when its contents should be submitted, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.BeginPopupContextItem() then ImGui.Text("Item menu") ImGui.EndPopup() end end) -- expected: the scope is balanced each frame ``` ## `ImGui.BeginPopupContextVoid` ### Description ImGui.BeginPopupContextVoid starts popup context void for the current frame and reports whether its contents should be submitted. ### Syntax ```luau ImGui.BeginPopupContextVoid() -> boolean ``` ### Parameters This function has no parameters. ### Returns Returns true when its contents should be submitted, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.BeginPopupContextVoid() then ImGui.Text("Background menu") ImGui.EndPopup() end end) -- expected: the scope is balanced each frame ``` ## `ImGui.BeginPopupContextWindow` ### Description ImGui.BeginPopupContextWindow starts popup context window for the current frame and reports whether its contents should be submitted. ### Syntax ```luau ImGui.BeginPopupContextWindow() -> boolean ``` ### Parameters This function has no parameters. ### Returns Returns true when its contents should be submitted, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.BeginPopupContextWindow() then ImGui.Text("Window menu") ImGui.EndPopup() end end) -- expected: the scope is balanced each frame ``` ## `ImGui.BeginPopupModal` ### Description ImGui.BeginPopupModal starts popup modal for the current frame and reports whether its contents should be submitted. ### Syntax ```luau ImGui.BeginPopupModal(name: string, open?: boolean, flags?: integer) -> (boolean, boolean, boolean) ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `name` | `string` | Case-sensitive name used by the operation. | | `open` | `boolean?` | Current open state supplied to the widget. | | `flags` | `integer?` | Bitwise combination of flags accepted by this command. | ### Returns Returns `(boolean, boolean, boolean)`. ### Errors Raises an error when called outside `ImGui.OnRender` or when `name` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() local visible = ImGui.BeginPopupModal("Confirm") if visible then ImGui.Text("Confirm action") ImGui.EndPopup() end end) -- expected: the scope is balanced each frame ``` ## `ImGui.BeginTabBar` ### Description ImGui.BeginTabBar starts tab bar for the current frame and reports whether its contents should be submitted. ### Syntax ```luau ImGui.BeginTabBar(id: string, flags?: integer) -> boolean ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `id` | `string` | Identifier used to locate or distinguish the object. | | `flags` | `integer?` | Bitwise combination of flags accepted by this command. | ### Returns Returns true when its contents should be submitted, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or when `id` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.BeginTabBar("docs-tabs") then ImGui.TabItemButton("Overview") ImGui.EndTabBar() end end) -- expected: the scope is balanced each frame ``` ## `ImGui.BeginTabItem` ### Description ImGui.BeginTabItem starts tab item for the current frame and reports whether its contents should be submitted. ### Syntax ```luau ImGui.BeginTabItem(label: string, open?: boolean, flags?: integer) -> (boolean, boolean, boolean) ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `label` | `string` | Visible label and ImGui identifier for the item. | | `open` | `boolean?` | Current open state supplied to the widget. | | `flags` | `integer?` | Bitwise combination of flags accepted by this command. | ### Returns Returns `(boolean, boolean, boolean)`. ### Errors Raises an error when called outside `ImGui.OnRender` or when `label` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.BeginTabItem("Overview") then ImGui.Text("Tab contents") ImGui.EndTabItem() end end) -- expected: the scope is balanced each frame ``` ## `ImGui.BeginTable` ### Description ImGui.BeginTable starts table for the current frame and reports whether its contents should be submitted. ### Syntax ```luau ImGui.BeginTable(id: string, columns: integer, flags?: integer, size?: Vector2, inner_width?: number) -> boolean ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `id` | `string` | Identifier used to locate or distinguish the object. | | `columns` | `integer` | Number of columns created by the table. | | `flags` | `integer?` | Bitwise combination of flags accepted by this command. | | `size` | `Vector2?` | Requested size, byte count, or dimensions. | | `inner_width` | `number?` | Scrollable inner width of the table. Zero uses the available width. | ### Returns Returns true when its contents should be submitted, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or when `id` or `columns` have an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.BeginTable("docs-table", 2) then ImGui.TableNextColumn() ImGui.Text("First column") ImGui.EndTable() end end) -- expected: the scope is balanced each frame ``` ## `ImGui.BeginTooltip` ### Description ImGui.BeginTooltip starts tooltip for the current frame and reports whether its contents should be submitted. ### Syntax ```luau ImGui.BeginTooltip() -> boolean ``` ### Parameters This function has no parameters. ### Returns Returns true when its contents should be submitted, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.BeginTooltip() ImGui.Text("Tooltip text") ImGui.EndTooltip() end) -- expected: the scope is balanced each frame ``` ## `ImGui.BeginTooltipEx` ### Description ImGui.BeginTooltipEx starts tooltip ex for the current frame and reports whether its contents should be submitted. ### Syntax ```luau ImGui.BeginTooltipEx() -> boolean ``` ### Parameters This function has no parameters. ### Returns Returns true when its contents should be submitted, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.BeginTooltipEx() then ImGui.Text("Tooltip text") ImGui.EndTooltip() end end) -- expected: the scope is balanced each frame ``` ## `ImGui.BeginTooltipHidden` ### Description ImGui.BeginTooltipHidden starts tooltip hidden for the current frame and reports whether its contents should be submitted. ### Syntax ```luau ImGui.BeginTooltipHidden() -> boolean ``` ### Parameters This function has no parameters. ### Returns Returns true when its contents should be submitted, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.BeginTooltipHidden() then ImGui.Text("Hidden tooltip") ImGui.EndTooltip() end end) -- expected: the scope is balanced each frame ``` ## `ImGui.Bullet` ### Description ImGui.Bullet draws a bullet marker at the current cursor position without adding text. ### Syntax ```luau ImGui.Bullet() -> () ``` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.Bullet() -- expected: the operation completes without returning a value end) ``` ## `ImGui.BulletText` ### Description ImGui.BulletText draws text with a leading bullet. ### Syntax ```luau ImGui.BulletText(value: string) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `value` | `string` | Value read, written, displayed, or passed to the operation. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `value` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.BulletText("sample") -- expected: the operation completes without returning a value end) ``` ## `ImGui.Button` ### Description ImGui.Button draws a button and reports whether it was clicked. ### Syntax ```luau ImGui.Button(label: string, size?: Vector2) -> boolean ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `label` | `string` | Visible label and ImGui identifier for the item. | | `size` | `Vector2?` | Requested size, byte count, or dimensions. | ### Returns Returns true when it was clicked, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or when `label` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.Button("Run") then print("Run clicked") -- expected: printed after a click end end) ``` ## `ImGui.ButtonEx` ### Description ImGui.ButtonEx draws a button with the supplied label and flags and returns true on activation. ### Syntax ```luau ImGui.ButtonEx(label: string, size?: Vector2, flags?: integer) -> boolean ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `label` | `string` | Visible label and ImGui identifier for the item. | | `size` | `Vector2?` | Requested size, byte count, or dimensions. | | `flags` | `integer?` | Bitwise combination of flags accepted by this command. | ### Returns Returns true when the operation succeeds or its condition is met; otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or when `label` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.ButtonEx("Documentation") -- expected: boolean end) ``` ## `ImGui.CalcTextSize` ### Description ImGui.CalcTextSize returns the display size of the supplied text. ### Syntax ```luau ImGui.CalcTextSize(value: string, hide_hash?: boolean, wrap_width?: number) -> Vector2 ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `value` | `string` | Value read, written, displayed, or passed to the operation. | | `hide_hash` | `boolean?` | Whether text after ## is hidden instead of used as an ID suffix. | | `wrap_width` | `number?` | Width at which text wraps. Zero uses the current window width. | ### Returns Returns `Vector2`. ### Errors Raises an error when called outside `ImGui.OnRender` or when `value` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.CalcTextSize("sample") -- expected: Vector2 end) ``` ## `ImGui.Checkbox` ### Description ImGui.Checkbox draws a checkbox and returns its value and change state. ### Syntax ```luau ImGui.Checkbox(label: string, input?: boolean) -> (boolean, boolean) ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `label` | `string` | Visible label and ImGui identifier for the item. | | `input` | `boolean?` | Current value displayed by the widget. | ### Returns Returns `(boolean, boolean)`. ### Errors Raises an error when called outside `ImGui.OnRender` or when `label` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.Checkbox("Documentation") -- expected: (boolean, boolean) end) ``` ## `ImGui.CloseCurrentPopup` ### Description ImGui.CloseCurrentPopup closes the ImGui current popup. ### Syntax ```luau ImGui.CloseCurrentPopup() -> () ``` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.CloseCurrentPopup() -- expected: the operation completes without returning a value end) ``` ## `ImGui.CollapsingHeader` ### Description ImGui.CollapsingHeader draws a header that the user can expand or collapse. It returns true while the contents should be shown. ### Syntax ```luau ImGui.CollapsingHeader(label: string, flags?: integer) -> boolean ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `label` | `string` | Visible label and ImGui identifier for the item. | | `flags` | `integer?` | Bitwise combination of flags accepted by this command. | ### Returns Returns true when the operation succeeds or its condition is met; otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or when `label` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.CollapsingHeader("Documentation") -- expected: boolean end) ``` ## `ImGui.ColorButton` ### Description ImGui.ColorButton draws a clickable color swatch and returns true when the swatch is activated. ### Syntax ```luau ImGui.ColorButton(label: string, color: Color3 | integer, flags?: integer, size?: Vector2) -> boolean ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `label` | `string` | Visible label and ImGui identifier for the item. | | `color` | `Color3 | integer` | Color applied to the item. | | `flags` | `integer?` | Bitwise combination of flags accepted by this command. | | `size` | `Vector2?` | Requested size, byte count, or dimensions. | ### Returns Returns true when the operation succeeds or its condition is met; otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or when `label` or `color` have an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.ColorButton("Documentation", Color3.fromRGB(255, 255, 255)) -- expected: boolean end) ``` ## `ImGui.ColorEdit3` ### Description ImGui.ColorEdit3 draws an RGB editor and returns its color and change state. ### Syntax ```luau ImGui.ColorEdit3(label: string, input: Color3 | integer, flags?: integer) -> (Color3, boolean) ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `label` | `string` | Visible label and ImGui identifier for the item. | | `input` | `Color3 | integer` | Current value displayed by the widget. | | `flags` | `integer?` | Bitwise combination of flags accepted by this command. | ### Returns Returns `(Color3, boolean)`. ### Errors Raises an error when called outside `ImGui.OnRender` or when `label` or `input` have an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local color = Color3.fromRGB(90, 160, 255) local connection = ImGui.OnRender(function() local changed color, changed = ImGui.ColorEdit3("Tint", color) if changed then print(color) -- expected: the selected Color3 end end) ``` ## `ImGui.ColorEdit4` ### Description ImGui.ColorEdit4 draws an RGBA editor and returns its color and change state. ### Syntax ```luau ImGui.ColorEdit4(label: string, input: Color3 | integer, flags?: integer) -> (Color3, boolean, number) ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `label` | `string` | Visible label and ImGui identifier for the item. | | `input` | `Color3 | integer` | Current value displayed by the widget. | | `flags` | `integer?` | Bitwise combination of flags accepted by this command. | ### Returns Returns `(Color3, boolean, number)`. ### Errors Raises an error when called outside `ImGui.OnRender` or when `label` or `input` have an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local color = Color3.fromRGB(90, 160, 255) local alpha = 1 local connection = ImGui.OnRender(function() local changed color, changed, alpha = ImGui.ColorEdit4("Tint", color) if changed then print(color, alpha) -- expected: Color3 and opacity end end) ``` ## `ImGui.ColorPicker3` ### Description ImGui.ColorPicker3 draws an RGB picker and returns its color and change state. ### Syntax ```luau ImGui.ColorPicker3(label: string, input: Color3 | integer, flags?: integer) -> (Color3, boolean) ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `label` | `string` | Visible label and ImGui identifier for the item. | | `input` | `Color3 | integer` | Current value displayed by the widget. | | `flags` | `integer?` | Bitwise combination of flags accepted by this command. | ### Returns Returns `(Color3, boolean)`. ### Errors Raises an error when called outside `ImGui.OnRender` or when `label` or `input` have an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local color = Color3.fromRGB(90, 160, 255) local connection = ImGui.OnRender(function() local changed color, changed = ImGui.ColorPicker3("Tint", color) if changed then print(color) -- expected: the selected Color3 end end) ``` ## `ImGui.ColorPicker4` ### Description ImGui.ColorPicker4 draws an RGBA picker and returns its color and change state. ### Syntax ```luau ImGui.ColorPicker4(label: string, input: Color3 | integer, flags?: integer) -> (Color3, boolean, number) ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `label` | `string` | Visible label and ImGui identifier for the item. | | `input` | `Color3 | integer` | Current value displayed by the widget. | | `flags` | `integer?` | Bitwise combination of flags accepted by this command. | ### Returns Returns `(Color3, boolean, number)`. ### Errors Raises an error when called outside `ImGui.OnRender` or when `label` or `input` have an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local color = Color3.fromRGB(90, 160, 255) local alpha = 1 local connection = ImGui.OnRender(function() local changed color, changed, alpha = ImGui.ColorPicker4("Tint", color) if changed then print(color, alpha) -- expected: Color3 and opacity end end) ``` ## `ImGui.Combo` ### Description ImGui.Combo draws a combo box and returns its selected index and change state. ### Syntax ```luau ImGui.Combo(label: string, input: integer, items: {string}) -> (integer, boolean) ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `label` | `string` | Visible label and ImGui identifier for the item. | | `input` | `integer` | Current value displayed by the widget. | | `items` | `{string}` | Ordered labels displayed by the selector. | ### Returns Returns `(integer, boolean)`. ### Errors Raises an error when called outside `ImGui.OnRender` or when `label` or `input` or `items` have an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.Combo("Documentation", 50, {}) -- expected: (integer, boolean) end) ``` ## `ImGui.DockSpace` ### Description ImGui.DockSpace creates a docking node in the current window using the supplied identifier, size, and docking flags. ### Syntax ```luau ImGui.DockSpace(id: string, size?: Vector2, flags?: integer) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `id` | `string` | Identifier used to locate or distinguish the object. | | `size` | `Vector2?` | Requested size, byte count, or dimensions. | | `flags` | `integer?` | Bitwise combination of flags accepted by this command. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `id` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.DockSpace("sample") -- expected: the operation completes without returning a value end) ``` ## `ImGui.DragFloat` ### Description ImGui.DragFloat draws a draggable number input and returns its value and change state. ### Syntax ```luau ImGui.DragFloat(label: string, input: number, speed?: number, minimum?: number, maximum?: number, format?: string, flags?: integer) -> (number, boolean) ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `label` | `string` | Visible label and ImGui identifier for the item. | | `input` | `number` | Current value displayed by the widget. | | `speed` | `number?` | Amount added per unit of drag movement. | | `minimum` | `number?` | Lower bound. | | `maximum` | `number?` | Upper bound or maximum radius. | | `format` | `string?` | ImGui numeric format string. | | `flags` | `integer?` | Bitwise combination of flags accepted by this command. | ### Returns Returns `(number, boolean)`. ### Errors Raises an error when called outside `ImGui.OnRender` or when `label` or `input` have an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.DragFloat("Documentation", 50) -- expected: (number, boolean) end) ``` ## `ImGui.DragInt` ### Description ImGui.DragInt draws a draggable integer input and returns its value and change state. ### Syntax ```luau ImGui.DragInt(label: string, input: integer, speed?: number, minimum?: integer, maximum?: integer, format?: string, flags?: integer) -> (integer, boolean) ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `label` | `string` | Visible label and ImGui identifier for the item. | | `input` | `integer` | Current value displayed by the widget. | | `speed` | `number?` | Amount added per unit of drag movement. | | `minimum` | `integer?` | Lower bound. | | `maximum` | `integer?` | Upper bound or maximum radius. | | `format` | `string?` | ImGui numeric format string. | | `flags` | `integer?` | Bitwise combination of flags accepted by this command. | ### Returns Returns `(integer, boolean)`. ### Errors Raises an error when called outside `ImGui.OnRender` or when `label` or `input` have an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.DragInt("Documentation", 50) -- expected: (integer, boolean) end) ``` ## `ImGui.DrawCircle` ### Description ImGui.DrawCircle adds circle to the current window draw list. ### Syntax ```luau ImGui.DrawCircle(center: Vector2, radius: number, color: Color3 | integer, segments?: integer, thickness?: number) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `center` | `Vector2` | Center point in screen coordinates. | | `radius` | `number` | Circle radius in screen pixels. | | `color` | `Color3 | integer` | Color applied to the item. | | `segments` | `integer?` | Number of segments used to draw the circle. | | `thickness` | `number?` | Stroke width in screen pixels. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `center` or `radius` or `color` have an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.DrawCircle(Vector2.new(120, 24), 1.0, Color3.fromRGB(255, 255, 255)) -- expected: the operation completes without returning a value end) ``` ## `ImGui.DrawCircleFilled` ### Description ImGui.DrawCircleFilled adds circle filled to the current window draw list. ### Syntax ```luau ImGui.DrawCircleFilled(center: Vector2, radius: number, color: Color3 | integer, segments?: integer) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `center` | `Vector2` | Center point in screen coordinates. | | `radius` | `number` | Circle radius in screen pixels. | | `color` | `Color3 | integer` | Color applied to the item. | | `segments` | `integer?` | Number of segments used to draw the circle. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `center` or `radius` or `color` have an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.DrawCircleFilled(Vector2.new(120, 24), 1.0, Color3.fromRGB(255, 255, 255)) -- expected: the operation completes without returning a value end) ``` ## `ImGui.DrawLine` ### Description ImGui.DrawLine adds line to the current window draw list. ### Syntax ```luau ImGui.DrawLine(first: Vector2, second: Vector2, color: Color3 | integer, thickness?: number) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `first` | `Vector2` | First endpoint in screen coordinates. | | `second` | `Vector2` | Second endpoint in screen coordinates. | | `color` | `Color3 | integer` | Color applied to the item. | | `thickness` | `number?` | Stroke width in screen pixels. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `first` or `second` or `color` have an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.DrawLine(Vector2.new(120, 24), Vector2.new(120, 24), Color3.fromRGB(255, 255, 255)) -- expected: the operation completes without returning a value end) ``` ## `ImGui.DrawRect` ### Description ImGui.DrawRect adds rect to the current window draw list. ### Syntax ```luau ImGui.DrawRect(minimum: Vector2, maximum: Vector2, color: Color3 | integer, rounding?: number, flags?: integer, thickness?: number) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `minimum` | `Vector2` | Lower bound. | | `maximum` | `Vector2` | Upper bound or maximum radius. | | `color` | `Color3 | integer` | Color applied to the item. | | `rounding` | `number?` | Corner radius in screen pixels. | | `flags` | `integer?` | Bitwise combination of flags accepted by this command. | | `thickness` | `number?` | Stroke width in screen pixels. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `minimum` or `maximum` or `color` have an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.DrawRect(0, 100, Color3.fromRGB(255, 255, 255)) -- expected: the operation completes without returning a value end) ``` ## `ImGui.DrawRectFilled` ### Description ImGui.DrawRectFilled adds rect filled to the current window draw list. ### Syntax ```luau ImGui.DrawRectFilled(minimum: Vector2, maximum: Vector2, color: Color3 | integer, rounding?: number, flags?: integer) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `minimum` | `Vector2` | Lower bound. | | `maximum` | `Vector2` | Upper bound or maximum radius. | | `color` | `Color3 | integer` | Color applied to the item. | | `rounding` | `number?` | Corner radius in screen pixels. | | `flags` | `integer?` | Bitwise combination of flags accepted by this command. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `minimum` or `maximum` or `color` have an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.DrawRectFilled(0, 100, Color3.fromRGB(255, 255, 255)) -- expected: the operation completes without returning a value end) ``` ## `ImGui.DrawText` ### Description ImGui.DrawText adds text to the current window draw list. ### Syntax ```luau ImGui.DrawText(position: Vector2, color: Color3 | integer, value: string) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `position` | `Vector2` | Screen or layout position. | | `color` | `Color3 | integer` | Color applied to the item. | | `value` | `string` | Value read, written, displayed, or passed to the operation. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `position` or `color` or `value` have an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.DrawText(Vector2.new(20, 20), Color3.fromRGB(255, 255, 255), "sample") -- expected: the operation completes without returning a value end) ``` ## `ImGui.Dummy` ### Description ImGui.Dummy adds an invisible item of the specified size. ### Syntax ```luau ImGui.Dummy(size: Vector2) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `size` | `Vector2` | Requested size, byte count, or dimensions. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `size` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.Dummy(Vector2.new(120, 24)) -- expected: the operation completes without returning a value end) ``` ## `ImGui.End` ### Description ImGui.End closes the current scope. ### Syntax ```luau ImGui.End() -> () ``` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.Begin("Documentation") ImGui.Text("Window contents") ImGui.End() end) -- expected: the scope is balanced each frame ``` ## `ImGui.EndChild` ### Description ImGui.EndChild closes the current child scope. ### Syntax ```luau ImGui.EndChild() -> () ``` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.BeginChild("docs-child", Vector2.new(200, 100)) ImGui.Text("Child contents") ImGui.EndChild() end) -- expected: the scope is balanced each frame ``` ## `ImGui.EndCombo` ### Description ImGui.EndCombo closes the current combo scope. ### Syntax ```luau ImGui.EndCombo() -> () ``` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.BeginCombo("Mode", "Default") then ImGui.Selectable("Default", true) ImGui.EndCombo() end end) -- expected: the scope is balanced each frame ``` ## `ImGui.EndDragDropSource` ### Description ImGui.EndDragDropSource closes the current drag drop source scope. ### Syntax ```luau ImGui.EndDragDropSource() -> () ``` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.BeginDragDropSource() then ImGui.SetDragDropPayload("DOCS", "payload") ImGui.EndDragDropSource() end end) -- expected: the scope is balanced each frame ``` ## `ImGui.EndDragDropTarget` ### Description ImGui.EndDragDropTarget closes the current drag drop target scope. ### Syntax ```luau ImGui.EndDragDropTarget() -> () ``` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.BeginDragDropTarget() then ImGui.AcceptDragDropPayload("DOCS") ImGui.EndDragDropTarget() end end) -- expected: the scope is balanced each frame ``` ## `ImGui.EndGroup` ### Description ImGui.EndGroup closes the current group scope. ### Syntax ```luau ImGui.EndGroup() -> () ``` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.BeginGroup() ImGui.Text("Grouped text") ImGui.EndGroup() end) -- expected: the scope is balanced each frame ``` ## `ImGui.EndListBox` ### Description ImGui.EndListBox closes the current list box scope. ### Syntax ```luau ImGui.EndListBox() -> () ``` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.BeginListBox("Items") then ImGui.Selectable("First", true) ImGui.EndListBox() end end) -- expected: the scope is balanced each frame ``` ## `ImGui.EndMainMenuBar` ### Description ImGui.EndMainMenuBar closes the current main menu bar scope. ### Syntax ```luau ImGui.EndMainMenuBar() -> () ``` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.BeginMainMenuBar() then ImGui.EndMainMenuBar() end end) -- expected: the scope is balanced each frame ``` ## `ImGui.EndMenu` ### Description ImGui.EndMenu closes the current menu scope. ### Syntax ```luau ImGui.EndMenu() -> () ``` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.BeginMenu("File") then ImGui.MenuItem("Close") ImGui.EndMenu() end end) -- expected: the scope is balanced each frame ``` ## `ImGui.EndMenuBar` ### Description ImGui.EndMenuBar closes the current menu bar scope. ### Syntax ```luau ImGui.EndMenuBar() -> () ``` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.BeginMenuBar() then ImGui.EndMenuBar() end end) -- expected: the scope is balanced each frame ``` ## `ImGui.EndPopup` ### Description ImGui.EndPopup closes the current popup scope. ### Syntax ```luau ImGui.EndPopup() -> () ``` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.BeginPopup("docs-popup") then ImGui.Text("Popup contents") ImGui.EndPopup() end end) -- expected: the scope is balanced each frame ``` ## `ImGui.EndTabBar` ### Description ImGui.EndTabBar closes the current tab bar scope. ### Syntax ```luau ImGui.EndTabBar() -> () ``` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.BeginTabBar("docs-tabs") then ImGui.EndTabBar() end end) -- expected: the scope is balanced each frame ``` ## `ImGui.EndTabItem` ### Description ImGui.EndTabItem closes the current tab item scope. ### Syntax ```luau ImGui.EndTabItem() -> () ``` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.BeginTabItem("Details") then ImGui.Text("Tab contents") ImGui.EndTabItem() end end) -- expected: the scope is balanced each frame ``` ## `ImGui.EndTable` ### Description ImGui.EndTable closes the current table scope. ### Syntax ```luau ImGui.EndTable() -> () ``` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.BeginTable("docs-table", 2) then ImGui.TableNextColumn() ImGui.Text("First column") ImGui.EndTable() end end) -- expected: the scope is balanced each frame ``` ## `ImGui.EndTooltip` ### Description ImGui.EndTooltip closes the current tooltip scope. ### Syntax ```luau ImGui.EndTooltip() -> () ``` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.BeginTooltip() ImGui.Text("Tooltip text") ImGui.EndTooltip() end) -- expected: the scope is balanced each frame ``` ## `ImGui.GetClipboardText` ### Description ImGui.GetClipboardText returns the current clipboard text from ImGui. ### Syntax ```luau ImGui.GetClipboardText() -> string ``` ### Parameters This function has no parameters. ### Returns Returns `string`. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.GetClipboardText() -- expected: string end) ``` ## `ImGui.GetColorU32` ### Description ImGui.GetColorU32 returns the current color u32 from ImGui. ### Syntax ```luau ImGui.GetColorU32(red?: number, green?: number, blue?: number, alpha?: number) -> integer ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `red` | `number?` | Red channel from 0 to 1. | | `green` | `number?` | Green channel from 0 to 1. | | `blue` | `number?` | Blue channel from 0 to 1. | | `alpha` | `number?` | Opacity value, normally between 0 and 1. | ### Returns Returns `integer`. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.GetColorU32() -- expected: integer end) ``` ## `ImGui.GetContentRegionAvail` ### Description ImGui.GetContentRegionAvail returns the current content region avail from ImGui. ### Syntax ```luau ImGui.GetContentRegionAvail() -> Vector2 ``` ### Parameters This function has no parameters. ### Returns Returns `Vector2`. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.GetContentRegionAvail() -- expected: Vector2 end) ``` ## `ImGui.GetCursorPos` ### Description ImGui.GetCursorPos returns the current cursor pos from ImGui. ### Syntax ```luau ImGui.GetCursorPos() -> Vector2 ``` ### Parameters This function has no parameters. ### Returns Returns `Vector2`. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.GetCursorPos() -- expected: Vector2 end) ``` ## `ImGui.GetCursorPosX` ### Description ImGui.GetCursorPosX returns the current cursor pos x from ImGui. ### Syntax ```luau ImGui.GetCursorPosX() -> number ``` ### Parameters This function has no parameters. ### Returns Returns `number`. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.GetCursorPosX() -- expected: number end) ``` ## `ImGui.GetCursorPosY` ### Description ImGui.GetCursorPosY returns the current cursor pos y from ImGui. ### Syntax ```luau ImGui.GetCursorPosY() -> number ``` ### Parameters This function has no parameters. ### Returns Returns `number`. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.GetCursorPosY() -- expected: number end) ``` ## `ImGui.GetCursorScreenPos` ### Description ImGui.GetCursorScreenPos returns the current cursor screen pos from ImGui. ### Syntax ```luau ImGui.GetCursorScreenPos() -> Vector2 ``` ### Parameters This function has no parameters. ### Returns Returns `Vector2`. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.GetCursorScreenPos() -- expected: Vector2 end) ``` ## `ImGui.GetCursorStartPos` ### Description ImGui.GetCursorStartPos returns the current cursor start pos from ImGui. ### Syntax ```luau ImGui.GetCursorStartPos() -> Vector2 ``` ### Parameters This function has no parameters. ### Returns Returns `Vector2`. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.GetCursorStartPos() -- expected: Vector2 end) ``` ## `ImGui.GetFontSize` ### Description ImGui.GetFontSize returns the current font size from ImGui. ### Syntax ```luau ImGui.GetFontSize() -> number ``` ### Parameters This function has no parameters. ### Returns Returns `number`. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.GetFontSize() -- expected: number end) ``` ## `ImGui.GetFrameCount` ### Description ImGui.GetFrameCount returns the current frame count from ImGui. ### Syntax ```luau ImGui.GetFrameCount() -> integer ``` ### Parameters This function has no parameters. ### Returns Returns `integer`. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.GetFrameCount() -- expected: integer end) ``` ## `ImGui.GetFrameHeight` ### Description ImGui.GetFrameHeight returns the current frame height from ImGui. ### Syntax ```luau ImGui.GetFrameHeight() -> number ``` ### Parameters This function has no parameters. ### Returns Returns `number`. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.GetFrameHeight() -- expected: number end) ``` ## `ImGui.GetFrameHeightWithSpacing` ### Description ImGui.GetFrameHeightWithSpacing returns the current frame height with spacing from ImGui. ### Syntax ```luau ImGui.GetFrameHeightWithSpacing() -> number ``` ### Parameters This function has no parameters. ### Returns Returns `number`. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.GetFrameHeightWithSpacing() -- expected: number end) ``` ## `ImGui.GetID` ### Description ImGui.GetID returns the current i d from ImGui. ### Syntax ```luau ImGui.GetID(value: string) -> integer ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `value` | `string` | Value read, written, displayed, or passed to the operation. | ### Returns Returns `integer`. ### Errors Raises an error when called outside `ImGui.OnRender` or when `value` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.GetID("sample") -- expected: integer end) ``` ## `ImGui.GetItemRectMax` ### Description ImGui.GetItemRectMax returns the current item rect max from ImGui. ### Syntax ```luau ImGui.GetItemRectMax() -> Vector2 ``` ### Parameters This function has no parameters. ### Returns Returns `Vector2`. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.GetItemRectMax() -- expected: Vector2 end) ``` ## `ImGui.GetItemRectMin` ### Description ImGui.GetItemRectMin returns the current item rect min from ImGui. ### Syntax ```luau ImGui.GetItemRectMin() -> Vector2 ``` ### Parameters This function has no parameters. ### Returns Returns `Vector2`. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.GetItemRectMin() -- expected: Vector2 end) ``` ## `ImGui.GetItemRectSize` ### Description ImGui.GetItemRectSize returns the current item rect size from ImGui. ### Syntax ```luau ImGui.GetItemRectSize() -> Vector2 ``` ### Parameters This function has no parameters. ### Returns Returns `Vector2`. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.GetItemRectSize() -- expected: Vector2 end) ``` ## `ImGui.GetMouseCursor` ### Description ImGui.GetMouseCursor returns the current mouse cursor from ImGui. ### Syntax ```luau ImGui.GetMouseCursor() -> integer ``` ### Parameters This function has no parameters. ### Returns Returns `integer`. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.GetMouseCursor() -- expected: integer end) ``` ## `ImGui.GetMouseDragDelta` ### Description ImGui.GetMouseDragDelta returns the current mouse drag delta from ImGui. ### Syntax ```luau ImGui.GetMouseDragDelta(button?: integer, threshold?: number) -> Vector2 ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `button` | `integer?` | ImGui mouse-button constant. | | `threshold` | `number?` | Minimum drag distance in pixels. | ### Returns Returns `Vector2`. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.GetMouseDragDelta() -- expected: Vector2 end) ``` ## `ImGui.GetMousePos` ### Description ImGui.GetMousePos returns the current mouse pos from ImGui. ### Syntax ```luau ImGui.GetMousePos() -> Vector2 ``` ### Parameters This function has no parameters. ### Returns Returns `Vector2`. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.GetMousePos() -- expected: Vector2 end) ``` ## `ImGui.GetScrollMaxX` ### Description ImGui.GetScrollMaxX returns the current scroll max x from ImGui. ### Syntax ```luau ImGui.GetScrollMaxX() -> number ``` ### Parameters This function has no parameters. ### Returns Returns `number`. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.GetScrollMaxX() -- expected: number end) ``` ## `ImGui.GetScrollMaxY` ### Description ImGui.GetScrollMaxY returns the current scroll max y from ImGui. ### Syntax ```luau ImGui.GetScrollMaxY() -> number ``` ### Parameters This function has no parameters. ### Returns Returns `number`. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.GetScrollMaxY() -- expected: number end) ``` ## `ImGui.GetScrollX` ### Description ImGui.GetScrollX returns the current scroll x from ImGui. ### Syntax ```luau ImGui.GetScrollX() -> number ``` ### Parameters This function has no parameters. ### Returns Returns `number`. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.GetScrollX() -- expected: number end) ``` ## `ImGui.GetScrollY` ### Description ImGui.GetScrollY returns the current scroll y from ImGui. ### Syntax ```luau ImGui.GetScrollY() -> number ``` ### Parameters This function has no parameters. ### Returns Returns `number`. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.GetScrollY() -- expected: number end) ``` ## `ImGui.GetTextLineHeight` ### Description ImGui.GetTextLineHeight returns the current text line height from ImGui. ### Syntax ```luau ImGui.GetTextLineHeight() -> number ``` ### Parameters This function has no parameters. ### Returns Returns `number`. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.GetTextLineHeight() -- expected: number end) ``` ## `ImGui.GetTextLineHeightWithSpacing` ### Description ImGui.GetTextLineHeightWithSpacing returns the current text line height with spacing from ImGui. ### Syntax ```luau ImGui.GetTextLineHeightWithSpacing() -> number ``` ### Parameters This function has no parameters. ### Returns Returns `number`. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.GetTextLineHeightWithSpacing() -- expected: number end) ``` ## `ImGui.GetWindowPos` ### Description ImGui.GetWindowPos returns the current window pos from ImGui. ### Syntax ```luau ImGui.GetWindowPos() -> Vector2 ``` ### Parameters This function has no parameters. ### Returns Returns `Vector2`. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.GetWindowPos() -- expected: Vector2 end) ``` ## `ImGui.GetWindowSize` ### Description ImGui.GetWindowSize returns the current window size from ImGui. ### Syntax ```luau ImGui.GetWindowSize() -> Vector2 ``` ### Parameters This function has no parameters. ### Returns Returns `Vector2`. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.GetWindowSize() -- expected: Vector2 end) ``` ## `ImGui.Image` ### Description ImGui.Image draws an image. ### Syntax ```luau ImGui.Image(texture: userdata, size: Vector2, uv0?: Vector2, uv1?: Vector2, tint?: Color3, border?: Color3) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `texture` | `userdata` | Texture identifier accepted by the renderer. | | `size` | `Vector2` | Requested size, byte count, or dimensions. | | `uv0` | `Vector2?` | Texture coordinate for the image's upper-left corner. | | `uv1` | `Vector2?` | Texture coordinate for the image's lower-right corner. | | `tint` | `Color3?` | Color multiplied with the texture. | | `border` | `Color3?` | Border color around the image. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `texture` or `size` have an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.Image("sample", Vector2.new(120, 24)) -- expected: the operation completes without returning a value end) ``` ## `ImGui.ImageButton` ### Description ImGui.ImageButton draws an image button and reports whether it was clicked. ### Syntax ```luau ImGui.ImageButton(texture: userdata, size: Vector2, uv0?: Vector2, uv1?: Vector2, background?: Color3, tint?: Color3) -> boolean ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `texture` | `userdata` | Texture identifier accepted by the renderer. | | `size` | `Vector2` | Requested size, byte count, or dimensions. | | `uv0` | `Vector2?` | Texture coordinate for the image's upper-left corner. | | `uv1` | `Vector2?` | Texture coordinate for the image's lower-right corner. | | `background` | `Color3?` | Background color behind the image button. | | `tint` | `Color3?` | Color multiplied with the texture. | ### Returns Returns true when it was clicked, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or when `texture` or `size` have an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.ImageButton("sample", Vector2.new(120, 24)) -- expected: boolean end) ``` ## `ImGui.Indent` ### Description ImGui.Indent moves the current layout cursor to the right. ### Syntax ```luau ImGui.Indent(width?: number) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `width` | `number?` | Width in screen pixels. A negative ImGui width uses the remaining region. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.Indent() -- expected: the operation completes without returning a value end) ``` ## `ImGui.InputFloat` ### Description ImGui.InputFloat draws a number input and returns its value and change state. ### Syntax ```luau ImGui.InputFloat(label: string, input: number, step?: number, fast_step?: number, format?: string, flags?: integer) -> (number, boolean) ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `label` | `string` | Visible label and ImGui identifier for the item. | | `input` | `number` | Current value displayed by the widget. | | `step` | `number?` | Increment used by the input controls. | | `fast_step` | `number?` | Increment used by the faster input controls. | | `format` | `string?` | ImGui numeric format string. | | `flags` | `integer?` | Bitwise combination of flags accepted by this command. | ### Returns Returns `(number, boolean)`. ### Errors Raises an error when called outside `ImGui.OnRender` or when `label` or `input` have an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.InputFloat("Documentation", 50) -- expected: (number, boolean) end) ``` ## `ImGui.InputInt` ### Description ImGui.InputInt draws an integer input and returns its value and change state. ### Syntax ```luau ImGui.InputInt(label: string, input: integer, step?: integer, fast_step?: integer, flags?: integer) -> (integer, boolean) ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `label` | `string` | Visible label and ImGui identifier for the item. | | `input` | `integer` | Current value displayed by the widget. | | `step` | `integer?` | Increment used by the input controls. | | `fast_step` | `integer?` | Increment used by the faster input controls. | | `flags` | `integer?` | Bitwise combination of flags accepted by this command. | ### Returns Returns `(integer, boolean)`. ### Errors Raises an error when called outside `ImGui.OnRender` or when `label` or `input` have an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.InputInt("Documentation", 50) -- expected: (integer, boolean) end) ``` ## `ImGui.InputText` ### Description ImGui.InputText draws a text input and returns its change state and text. ### Syntax ```luau ImGui.InputText(label: string, state: ImGuiStringBuffer, flags?: integer) -> (string, boolean) ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `label` | `string` | Visible label and ImGui identifier for the item. | | `state` | `ImGuiStringBuffer` | ImGuiStringBuffer that stores editable text between frames. | | `flags` | `integer?` | Bitwise combination of flags accepted by this command. | ### Returns Returns `(string, boolean)`. ### Errors Raises an error when called outside `ImGui.OnRender` or when `label` or `state` have an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local buffer = ImGui.StringBuffer("initial text", 256) local connection = ImGui.OnRender(function() local text, changed = ImGui.InputText("Name", buffer) if changed then print(text) -- expected: current input text end end) ``` ## `ImGui.InputTextMultiline` ### Description ImGui.InputTextMultiline draws a multiline text input and returns its change state and text. ### Syntax ```luau ImGui.InputTextMultiline(label: string, state: ImGuiStringBuffer, size?: Vector2, flags?: integer) -> (string, boolean) ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `label` | `string` | Visible label and ImGui identifier for the item. | | `state` | `ImGuiStringBuffer` | ImGuiStringBuffer that stores editable text between frames. | | `size` | `Vector2?` | Requested size, byte count, or dimensions. | | `flags` | `integer?` | Bitwise combination of flags accepted by this command. | ### Returns Returns `(string, boolean)`. ### Errors Raises an error when called outside `ImGui.OnRender` or when `label` or `state` have an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.InputTextMultiline("Documentation", nil) -- expected: (string, boolean) end) ``` ## `ImGui.InputTextWithHint` ### Description ImGui.InputTextWithHint draws a text input with hint text and returns its change state and text. ### Syntax ```luau ImGui.InputTextWithHint(label: string, hint: string, state: ImGuiStringBuffer, flags?: integer) -> (string, boolean) ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `label` | `string` | Visible label and ImGui identifier for the item. | | `hint` | `string` | Placeholder text shown while the input is empty. | | `state` | `ImGuiStringBuffer` | ImGuiStringBuffer that stores editable text between frames. | | `flags` | `integer?` | Bitwise combination of flags accepted by this command. | ### Returns Returns `(string, boolean)`. ### Errors Raises an error when called outside `ImGui.OnRender` or when `label` or `hint` or `state` have an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local buffer = ImGui.StringBuffer("", 256) local connection = ImGui.OnRender(function() local text, changed = ImGui.InputTextWithHint("Name", "Enter a name", buffer) if changed then print(text) -- expected: current input text end end) ``` ## `ImGui.InvisibleButton` ### Description ImGui.InvisibleButton creates an invisible button and reports whether it was activated. ### Syntax ```luau ImGui.InvisibleButton(size: Vector2, flags?: integer) -> boolean ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `size` | `Vector2` | Requested size, byte count, or dimensions. | | `flags` | `integer?` | Bitwise combination of flags accepted by this command. | ### Returns Returns true when it was activated, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or when `size` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.InvisibleButton(Vector2.new(120, 24)) -- expected: boolean end) ``` ## `ImGui.IsAnyItemActive` ### Description ImGui.IsAnyItemActive reports whether any item active for the current ImGui frame. ### Syntax ```luau ImGui.IsAnyItemActive() -> boolean ``` ### Parameters This function has no parameters. ### Returns Returns true when any item active for the current ImGui frame, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.IsAnyItemActive() -- expected: boolean end) ``` ## `ImGui.IsAnyItemFocused` ### Description ImGui.IsAnyItemFocused reports whether any item focused for the current ImGui frame. ### Syntax ```luau ImGui.IsAnyItemFocused() -> boolean ``` ### Parameters This function has no parameters. ### Returns Returns true when any item focused for the current ImGui frame, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.IsAnyItemFocused() -- expected: boolean end) ``` ## `ImGui.IsAnyItemHovered` ### Description ImGui.IsAnyItemHovered reports whether any item hovered for the current ImGui frame. ### Syntax ```luau ImGui.IsAnyItemHovered() -> boolean ``` ### Parameters This function has no parameters. ### Returns Returns true when any item hovered for the current ImGui frame, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.IsAnyItemHovered() -- expected: boolean end) ``` ## `ImGui.IsItemActivated` ### Description ImGui.IsItemActivated reports whether item activated for the current ImGui frame. ### Syntax ```luau ImGui.IsItemActivated() -> boolean ``` ### Parameters This function has no parameters. ### Returns Returns true when item activated for the current ImGui frame, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.IsItemActivated() -- expected: boolean end) ``` ## `ImGui.IsItemActive` ### Description ImGui.IsItemActive reports whether item active for the current ImGui frame. ### Syntax ```luau ImGui.IsItemActive() -> boolean ``` ### Parameters This function has no parameters. ### Returns Returns true when item active for the current ImGui frame, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.IsItemActive() -- expected: boolean end) ``` ## `ImGui.IsItemClicked` ### Description ImGui.IsItemClicked reports whether item clicked for the current ImGui frame. ### Syntax ```luau ImGui.IsItemClicked(button?: integer) -> boolean ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `button` | `integer?` | ImGui mouse-button constant. | ### Returns Returns true when item clicked for the current ImGui frame, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.IsItemClicked() -- expected: boolean end) ``` ## `ImGui.IsItemDeactivated` ### Description ImGui.IsItemDeactivated reports whether item deactivated for the current ImGui frame. ### Syntax ```luau ImGui.IsItemDeactivated() -> boolean ``` ### Parameters This function has no parameters. ### Returns Returns true when item deactivated for the current ImGui frame, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.IsItemDeactivated() -- expected: boolean end) ``` ## `ImGui.IsItemDeactivatedAfterEdit` ### Description ImGui.IsItemDeactivatedAfterEdit reports whether item deactivated after edit for the current ImGui frame. ### Syntax ```luau ImGui.IsItemDeactivatedAfterEdit() -> boolean ``` ### Parameters This function has no parameters. ### Returns Returns true when item deactivated after edit for the current ImGui frame, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.IsItemDeactivatedAfterEdit() -- expected: boolean end) ``` ## `ImGui.IsItemEdited` ### Description ImGui.IsItemEdited reports whether item edited for the current ImGui frame. ### Syntax ```luau ImGui.IsItemEdited() -> boolean ``` ### Parameters This function has no parameters. ### Returns Returns true when item edited for the current ImGui frame, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.IsItemEdited() -- expected: boolean end) ``` ## `ImGui.IsItemFocused` ### Description ImGui.IsItemFocused reports whether item focused for the current ImGui frame. ### Syntax ```luau ImGui.IsItemFocused() -> boolean ``` ### Parameters This function has no parameters. ### Returns Returns true when item focused for the current ImGui frame, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.IsItemFocused() -- expected: boolean end) ``` ## `ImGui.IsItemHovered` ### Description ImGui.IsItemHovered reports whether item hovered for the current ImGui frame. ### Syntax ```luau ImGui.IsItemHovered() -> boolean ``` ### Parameters This function has no parameters. ### Returns Returns true when item hovered for the current ImGui frame, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.IsItemHovered() -- expected: boolean end) ``` ## `ImGui.IsItemToggledOpen` ### Description ImGui.IsItemToggledOpen reports whether item toggled open for the current ImGui frame. ### Syntax ```luau ImGui.IsItemToggledOpen() -> boolean ``` ### Parameters This function has no parameters. ### Returns Returns true when item toggled open for the current ImGui frame, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.IsItemToggledOpen() -- expected: boolean end) ``` ## `ImGui.IsItemVisible` ### Description ImGui.IsItemVisible reports whether item visible for the current ImGui frame. ### Syntax ```luau ImGui.IsItemVisible() -> boolean ``` ### Parameters This function has no parameters. ### Returns Returns true when item visible for the current ImGui frame, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.IsItemVisible() -- expected: boolean end) ``` ## `ImGui.IsKeyDown` ### Description ImGui.IsKeyDown reports whether key down for the current ImGui frame. ### Syntax ```luau ImGui.IsKeyDown(key: integer) -> boolean ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `key` | `integer` | Encryption or authentication key. | ### Returns Returns true when key down for the current ImGui frame, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or when `key` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.IsKeyDown(1) -- expected: boolean end) ``` ## `ImGui.IsKeyPressed` ### Description ImGui.IsKeyPressed reports whether key pressed for the current ImGui frame. ### Syntax ```luau ImGui.IsKeyPressed(key: integer, repeat?: boolean) -> boolean ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `key` | `integer` | Encryption or authentication key. | | `repeat` | `boolean?` | Whether the key or mouse press should repeat while held. | ### Returns Returns true when key pressed for the current ImGui frame, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or when `key` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.IsKeyPressed(1) -- expected: boolean end) ``` ## `ImGui.IsKeyReleased` ### Description ImGui.IsKeyReleased reports whether key released for the current ImGui frame. ### Syntax ```luau ImGui.IsKeyReleased(key: integer) -> boolean ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `key` | `integer` | Encryption or authentication key. | ### Returns Returns true when key released for the current ImGui frame, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or when `key` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.IsKeyReleased(1) -- expected: boolean end) ``` ## `ImGui.IsMouseClicked` ### Description ImGui.IsMouseClicked reports whether mouse clicked for the current ImGui frame. ### Syntax ```luau ImGui.IsMouseClicked(button: integer, repeat?: boolean) -> boolean ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `button` | `integer` | ImGui mouse-button constant. | | `repeat` | `boolean?` | Whether the key or mouse press should repeat while held. | ### Returns Returns true when mouse clicked for the current ImGui frame, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or when `button` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.IsMouseClicked(1) -- expected: boolean end) ``` ## `ImGui.IsMouseDoubleClicked` ### Description ImGui.IsMouseDoubleClicked reports whether mouse double clicked for the current ImGui frame. ### Syntax ```luau ImGui.IsMouseDoubleClicked(button: integer) -> boolean ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `button` | `integer` | ImGui mouse-button constant. | ### Returns Returns true when mouse double clicked for the current ImGui frame, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or when `button` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.IsMouseDoubleClicked(1) -- expected: boolean end) ``` ## `ImGui.IsMouseDown` ### Description ImGui.IsMouseDown reports whether mouse down for the current ImGui frame. ### Syntax ```luau ImGui.IsMouseDown(button: integer) -> boolean ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `button` | `integer` | ImGui mouse-button constant. | ### Returns Returns true when mouse down for the current ImGui frame, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or when `button` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.IsMouseDown(1) -- expected: boolean end) ``` ## `ImGui.IsMouseDragging` ### Description ImGui.IsMouseDragging reports whether mouse dragging for the current ImGui frame. ### Syntax ```luau ImGui.IsMouseDragging(button: integer, threshold?: number) -> boolean ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `button` | `integer` | ImGui mouse-button constant. | | `threshold` | `number?` | Minimum drag distance in pixels. | ### Returns Returns true when mouse dragging for the current ImGui frame, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or when `button` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.IsMouseDragging(1) -- expected: boolean end) ``` ## `ImGui.IsMouseReleased` ### Description ImGui.IsMouseReleased reports whether mouse released for the current ImGui frame. ### Syntax ```luau ImGui.IsMouseReleased(button: integer) -> boolean ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `button` | `integer` | ImGui mouse-button constant. | ### Returns Returns true when mouse released for the current ImGui frame, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or when `button` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.IsMouseReleased(1) -- expected: boolean end) ``` ## `ImGui.IsPopupOpen` ### Description ImGui.IsPopupOpen reports whether popup open for the current ImGui frame. ### Syntax ```luau ImGui.IsPopupOpen(id: string, flags?: integer) -> boolean ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `id` | `string` | Identifier used to locate or distinguish the object. | | `flags` | `integer?` | Bitwise combination of flags accepted by this command. | ### Returns Returns true when popup open for the current ImGui frame, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or when `id` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.IsPopupOpen("sample") -- expected: boolean end) ``` ## `ImGui.IsWindowAppearing` ### Description ImGui.IsWindowAppearing reports whether window appearing for the current ImGui frame. ### Syntax ```luau ImGui.IsWindowAppearing() -> boolean ``` ### Parameters This function has no parameters. ### Returns Returns true when window appearing for the current ImGui frame, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.IsWindowAppearing() -- expected: boolean end) ``` ## `ImGui.IsWindowCollapsed` ### Description ImGui.IsWindowCollapsed reports whether window collapsed for the current ImGui frame. ### Syntax ```luau ImGui.IsWindowCollapsed() -> boolean ``` ### Parameters This function has no parameters. ### Returns Returns true when window collapsed for the current ImGui frame, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.IsWindowCollapsed() -- expected: boolean end) ``` ## `ImGui.IsWindowFocused` ### Description ImGui.IsWindowFocused reports whether window focused for the current ImGui frame. ### Syntax ```luau ImGui.IsWindowFocused(flags?: integer) -> boolean ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `flags` | `integer?` | Bitwise combination of flags accepted by this command. | ### Returns Returns true when window focused for the current ImGui frame, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.IsWindowFocused() -- expected: boolean end) ``` ## `ImGui.IsWindowHovered` ### Description ImGui.IsWindowHovered reports whether window hovered for the current ImGui frame. ### Syntax ```luau ImGui.IsWindowHovered(flags?: integer) -> boolean ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `flags` | `integer?` | Bitwise combination of flags accepted by this command. | ### Returns Returns true when window hovered for the current ImGui frame, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.IsWindowHovered() -- expected: boolean end) ``` ## `ImGui.ListBox` ### Description ImGui.ListBox draws a scrollable list of labels and returns the selected index together with a changed flag. ### Syntax ```luau ImGui.ListBox(label: string, input: integer, items: {string}, height?: integer) -> (integer, boolean) ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `label` | `string` | Visible label and ImGui identifier for the item. | | `input` | `integer` | Zero-based index of the currently selected item. | | `items` | `{string}` | Ordered labels displayed by the selector. | | `height` | `integer?` | Number of list rows displayed without scrolling. | ### Returns Returns `(integer, boolean)`. ### Errors Raises an error when called outside `ImGui.OnRender` or when `label` or `input` or `items` have an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.ListBox("Documentation", 50, {}) -- expected: (integer, boolean) end) ``` ## `ImGui.MenuItem` ### Description ImGui.MenuItem adds an item to the current menu and returns its selected state together with an activation flag. ### Syntax ```luau ImGui.MenuItem(label: string, shortcut?: string, selected?: boolean, enabled?: boolean) -> (boolean, boolean) ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `label` | `string` | Visible label and ImGui identifier for the item. | | `shortcut` | `string?` | Shortcut label displayed beside the menu item. | | `selected` | `boolean?` | Current selected state of the menu item. | | `enabled` | `boolean?` | Whether the feature or connection should be enabled. | ### Returns Returns `(boolean, boolean)`. ### Errors Raises an error when called outside `ImGui.OnRender` or when `label` has an unsupported type or value. ### Notes Call this function between a successful ImGui.BeginMenu call and its matching ImGui.EndMenu. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.BeginMenu("File") then local selected, activated = ImGui.MenuItem("Save", "Ctrl+S") if activated then print(selected) -- expected: the current selected state end ImGui.EndMenu() end end) ``` ## `ImGui.NewLine` ### Description ImGui.NewLine moves the cursor to a new line. ### Syntax ```luau ImGui.NewLine() -> () ``` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.NewLine() -- expected: the operation completes without returning a value end) ``` ## `ImGui.OnRender` ### Description ImGui.OnRender registers a function that records ImGui commands each render frame. ### Syntax ```luau ImGui.OnRender(callback: function) -> MadiumConnection ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `callback` | `function` | Function invoked when the event or hook runs. | ### Returns Returns `MadiumConnection`. ### Errors Raises an error when called outside `ImGui.OnRender` or when `callback` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.Text("Rendered every frame") end) print(typeof(connection)) -- expected: "userdata" ``` ## `ImGui.OpenPopup` ### Description ImGui.OpenPopup opens the ImGui popup. ### Syntax ```luau ImGui.OpenPopup(id: string, flags?: integer) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `id` | `string` | Identifier used to locate or distinguish the object. | | `flags` | `integer?` | Bitwise combination of flags accepted by this command. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `id` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.OpenPopup("sample") -- expected: the operation completes without returning a value end) ``` ## `ImGui.PlotHistogram` ### Description ImGui.PlotHistogram draws numeric samples as vertical histogram bars. Offset, scale bounds, overlay text, and graph size are optional. ### Syntax ```luau ImGui.PlotHistogram(label: string, values: {number}, offset?: integer, overlay?: string, minimum?: number, maximum?: number, size?: Vector2) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `label` | `string` | Visible label and ImGui identifier for the item. | | `values` | `{number}` | Numeric samples displayed by the plot. | | `offset` | `integer?` | Starting value index used by the plot. | | `overlay` | `string?` | Optional text drawn over the plot or progress bar. | | `minimum` | `number?` | Lower bound. | | `maximum` | `number?` | Upper bound or maximum radius. | | `size` | `Vector2?` | Requested size, byte count, or dimensions. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `label` or `values` have an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local samples = { 2, 5, 3, 8 } local connection = ImGui.OnRender(function() ImGui.PlotHistogram("Counts", samples) end) -- expected: a histogram with four bars ``` ## `ImGui.PlotLines` ### Description ImGui.PlotLines draws numeric samples as a connected line graph. Offset, scale bounds, overlay text, and graph size are optional. ### Syntax ```luau ImGui.PlotLines(label: string, values: {number}, offset?: integer, overlay?: string, minimum?: number, maximum?: number, size?: Vector2) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `label` | `string` | Visible label and ImGui identifier for the item. | | `values` | `{number}` | Numeric samples displayed by the plot. | | `offset` | `integer?` | Starting value index used by the plot. | | `overlay` | `string?` | Optional text drawn over the plot or progress bar. | | `minimum` | `number?` | Lower bound. | | `maximum` | `number?` | Upper bound or maximum radius. | | `size` | `Vector2?` | Requested size, byte count, or dimensions. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `label` or `values` have an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local samples = { 0.1, 0.4, 0.2, 0.8 } local connection = ImGui.OnRender(function() ImGui.PlotLines("Frame time", samples) end) -- expected: a line plot with four samples ``` ## `ImGui.PopFont` ### Description ImGui.PopFont removes the most recently pushed font from the matching ImGui stack. ### Syntax ```luau ImGui.PopFont() -> () ``` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.PushFont() ImGui.PopFont() end) -- expected: the scope is balanced each frame ``` ## `ImGui.PopID` ### Description ImGui.PopID removes the most recently pushed i d from the matching ImGui stack. ### Syntax ```luau ImGui.PopID() -> () ``` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.PushID("docs") ImGui.PopID() end) -- expected: the scope is balanced each frame ``` ## `ImGui.PopItemFlag` ### Description ImGui.PopItemFlag removes the most recently pushed item flag from the matching ImGui stack. ### Syntax ```luau ImGui.PopItemFlag() -> () ``` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.PushItemFlag(ImGuiItemFlags_Disabled, true) ImGui.PopItemFlag() end) -- expected: the scope is balanced each frame ``` ## `ImGui.PopItemWidth` ### Description ImGui.PopItemWidth removes the most recently pushed item width from the matching ImGui stack. ### Syntax ```luau ImGui.PopItemWidth() -> () ``` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.PushItemWidth(180) ImGui.PopItemWidth() end) -- expected: the scope is balanced each frame ``` ## `ImGui.PopStyleColor` ### Description ImGui.PopStyleColor removes the most recently pushed style color from the matching ImGui stack. ### Syntax ```luau ImGui.PopStyleColor(count?: integer) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `count` | `integer?` | Number of entries removed from the matching stack. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.PushStyleColor(ImGuiCol_Text, Color3.fromRGB(255, 220, 120)) ImGui.PopStyleColor() end) -- expected: the scope is balanced each frame ``` ## `ImGui.PopStyleVar` ### Description ImGui.PopStyleVar removes the most recently pushed style var from the matching ImGui stack. ### Syntax ```luau ImGui.PopStyleVar(count?: integer) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `count` | `integer?` | Number of entries removed from the matching stack. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.PushStyleVar(ImGuiStyleVar_WindowPadding, Vector2.new(8, 8)) ImGui.PopStyleVar() end) -- expected: the scope is balanced each frame ``` ## `ImGui.PopTextWrapPos` ### Description ImGui.PopTextWrapPos removes the most recently pushed text wrap pos from the matching ImGui stack. ### Syntax ```luau ImGui.PopTextWrapPos() -> () ``` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.PushTextWrapPos(240) ImGui.PopTextWrapPos() end) -- expected: the scope is balanced each frame ``` ## `ImGui.ProgressBar` ### Description ImGui.ProgressBar draws a progress indicator for fraction, normally from 0 to 1, with optional size and overlay text. ### Syntax ```luau ImGui.ProgressBar(fraction: number, size?: Vector2, overlay?: string) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `fraction` | `number` | Progress value, normally from 0 to 1. | | `size` | `Vector2?` | Requested size, byte count, or dimensions. | | `overlay` | `string?` | Optional text drawn over the plot or progress bar. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `fraction` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.ProgressBar(1.0) -- expected: the operation completes without returning a value end) ``` ## `ImGui.PushFont` ### Description ImGui.PushFont pushes font onto the matching ImGui stack. ### Syntax ```luau ImGui.PushFont(index?: integer, size?: number) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `index` | `integer?` | One-based element, constant, upvalue, proto, or stack-slot index. | | `size` | `number?` | Requested size, byte count, or dimensions. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.PushFont() ImGui.Text("Custom font") ImGui.PopFont() end) -- expected: the scope is balanced each frame ``` ## `ImGui.PushID` ### Description ImGui.PushID pushes i d onto the matching ImGui stack. ### Syntax ```luau ImGui.PushID(id: string) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `id` | `string` | Identifier used to locate or distinguish the object. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `id` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.PushID("docs") ImGui.Button("Run") ImGui.PopID() end) -- expected: the scope is balanced each frame ``` ## `ImGui.PushItemFlag` ### Description ImGui.PushItemFlag pushes item flag onto the matching ImGui stack. ### Syntax ```luau ImGui.PushItemFlag(flag: integer, enabled: boolean) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `flag` | `integer` | Single ImGui item flag to push. | | `enabled` | `boolean` | Whether the feature or connection should be enabled. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `flag` or `enabled` have an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.PushItemFlag(ImGuiItemFlags_Disabled, true) ImGui.Button("Disabled") ImGui.PopItemFlag() end) -- expected: the scope is balanced each frame ``` ## `ImGui.PushItemWidth` ### Description ImGui.PushItemWidth pushes item width onto the matching ImGui stack. ### Syntax ```luau ImGui.PushItemWidth(width: number) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `width` | `number` | Width in screen pixels. A negative ImGui width uses the remaining region. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `width` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.PushItemWidth(180) ImGui.InputInt("Count", 1) ImGui.PopItemWidth() end) -- expected: the scope is balanced each frame ``` ## `ImGui.PushStyleColor` ### Description ImGui.PushStyleColor pushes style color onto the matching ImGui stack. ### Syntax ```luau ImGui.PushStyleColor(color_id: integer, color: Color3 | integer) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `color_id` | `integer` | ImGuiCol value selecting the style color. | | `color` | `Color3 | integer` | Color applied to the item. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `color_id` or `color` have an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.PushStyleColor(ImGuiCol_Text, Color3.fromRGB(255, 220, 120)) ImGui.Text("Tinted text") ImGui.PopStyleColor() end) -- expected: the scope is balanced each frame ``` ## `ImGui.PushStyleVar` ### Description ImGui.PushStyleVar pushes style var onto the matching ImGui stack. ### Syntax ```luau ImGui.PushStyleVar(style: integer, value: Vector2) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `style` | `integer` | ImGuiStyleVar value selecting the style field. | | `value` | `Vector2` | Value read, written, displayed, or passed to the operation. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `style` or `value` have an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.PushStyleVar(ImGuiStyleVar_WindowPadding, Vector2.new(8, 8)) ImGui.Text("Styled content") ImGui.PopStyleVar() end) -- expected: the scope is balanced each frame ``` ## `ImGui.PushTextWrapPos` ### Description ImGui.PushTextWrapPos pushes text wrap pos onto the matching ImGui stack. ### Syntax ```luau ImGui.PushTextWrapPos(position?: number) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `position` | `number?` | Screen or layout position. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.PushTextWrapPos(240) ImGui.TextWrapped("Text wraps at the selected position.") ImGui.PopTextWrapPos() end) -- expected: the scope is balanced each frame ``` ## `ImGui.RadioButton` ### Description ImGui.RadioButton draws a radio button and reports whether it was selected. ### Syntax ```luau ImGui.RadioButton(label: string, active?: boolean) -> boolean ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `label` | `string` | Visible label and ImGui identifier for the item. | | `active` | `boolean?` | Whether the item is currently active. | ### Returns Returns true when it was selected, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or when `label` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.RadioButton("Documentation") -- expected: boolean end) ``` ## `ImGui.ResetMouseDragDelta` ### Description ImGui.ResetMouseDragDelta resets the ImGui mouse drag delta. ### Syntax ```luau ImGui.ResetMouseDragDelta(button?: integer) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `button` | `integer?` | ImGui mouse-button constant. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.ResetMouseDragDelta() -- expected: the operation completes without returning a value end) ``` ## `ImGui.SameLine` ### Description ImGui.SameLine places the next item on the current line. ### Syntax ```luau ImGui.SameLine(offset?: number, spacing?: number) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `offset` | `number?` | Starting value index used by the plot. | | `spacing` | `number?` | Spacing between repeated items in screen pixels. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.SameLine() -- expected: the operation completes without returning a value end) ``` ## `ImGui.Selectable` ### Description ImGui.Selectable draws a row that can be selected and returns its current state together with an activation flag. ### Syntax ```luau ImGui.Selectable(label: string, input?: boolean, flags?: integer, size?: Vector2) -> (boolean, boolean) ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `label` | `string` | Visible label and ImGui identifier for the item. | | `input` | `boolean?` | Current value displayed by the widget. | | `flags` | `integer?` | Bitwise combination of flags accepted by this command. | | `size` | `Vector2?` | Requested size, byte count, or dimensions. | ### Returns Returns `(boolean, boolean)`. ### Errors Raises an error when called outside `ImGui.OnRender` or when `label` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.Selectable("Documentation") -- expected: (boolean, boolean) end) ``` ## `ImGui.Separator` ### Description ImGui.Separator draws a separator on the current layout axis. ### Syntax ```luau ImGui.Separator() -> () ``` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.Separator() -- expected: the operation completes without returning a value end) ``` ## `ImGui.SeparatorText` ### Description ImGui.SeparatorText draws a labeled separator. ### Syntax ```luau ImGui.SeparatorText(label: string) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `label` | `string` | Visible label and ImGui identifier for the item. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `label` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.SeparatorText("Documentation") -- expected: the operation completes without returning a value end) ``` ## `ImGui.SetClipboardText` ### Description ImGui.SetClipboardText sets clipboard text in the current ImGui context. ### Syntax ```luau ImGui.SetClipboardText(value: string) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `value` | `string` | Value read, written, displayed, or passed to the operation. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `value` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.SetClipboardText("sample") -- expected: the operation completes without returning a value end) ``` ## `ImGui.SetCursorPos` ### Description ImGui.SetCursorPos sets cursor pos in the current ImGui context. ### Syntax ```luau ImGui.SetCursorPos(position: Vector2) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `position` | `Vector2` | Screen or layout position. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `position` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.SetCursorPos(Vector2.new(20, 20)) -- expected: the operation completes without returning a value end) ``` ## `ImGui.SetCursorPosX` ### Description ImGui.SetCursorPosX sets cursor pos x in the current ImGui context. ### Syntax ```luau ImGui.SetCursorPosX(position: number) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `position` | `number` | Screen or layout position. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `position` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.SetCursorPosX(Vector2.new(20, 20)) -- expected: the operation completes without returning a value end) ``` ## `ImGui.SetCursorPosY` ### Description ImGui.SetCursorPosY sets cursor pos y in the current ImGui context. ### Syntax ```luau ImGui.SetCursorPosY(position: number) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `position` | `number` | Screen or layout position. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `position` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.SetCursorPosY(Vector2.new(20, 20)) -- expected: the operation completes without returning a value end) ``` ## `ImGui.SetCursorScreenPos` ### Description ImGui.SetCursorScreenPos sets cursor screen pos in the current ImGui context. ### Syntax ```luau ImGui.SetCursorScreenPos(position: Vector2) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `position` | `Vector2` | Screen or layout position. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `position` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.SetCursorScreenPos(Vector2.new(20, 20)) -- expected: the operation completes without returning a value end) ``` ## `ImGui.SetDragDropPayload` ### Description ImGui.SetDragDropPayload sets drag drop payload in the current ImGui context. ### Syntax ```luau ImGui.SetDragDropPayload(type: string, data: string, condition?: integer) -> boolean ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `type` | `string` | Payload or object type name. | | `data` | `string` | Input bytes. Luau strings may contain zero bytes. | | `condition` | `integer?` | ImGuiCond flags controlling when the setting is applied. | ### Returns Returns true when the operation succeeds or its condition is met; otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or when `type` or `data` have an unsupported type or value. ### Notes Call this function only while ImGui.BeginDragDropSource is active. The payload is copied for the current drag operation. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.Button("Drag source") if ImGui.BeginDragDropSource() then ImGui.SetDragDropPayload("DOCS", "example payload") ImGui.Text("Drag this value") ImGui.EndDragDropSource() end end) -- expected: the text payload is attached while dragging ``` ## `ImGui.SetItemAllowOverlap` ### Description ImGui.SetItemAllowOverlap sets item allow overlap in the current ImGui context. ### Syntax ```luau ImGui.SetItemAllowOverlap() -> () ``` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.SetItemAllowOverlap() -- expected: the operation completes without returning a value end) ``` ## `ImGui.SetItemDefaultFocus` ### Description ImGui.SetItemDefaultFocus sets item default focus in the current ImGui context. ### Syntax ```luau ImGui.SetItemDefaultFocus() -> () ``` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.SetItemDefaultFocus() -- expected: the operation completes without returning a value end) ``` ## `ImGui.SetItemTooltip` ### Description ImGui.SetItemTooltip sets item tooltip in the current ImGui context. ### Syntax ```luau ImGui.SetItemTooltip(value: string) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `value` | `string` | Value read, written, displayed, or passed to the operation. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `value` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.SetItemTooltip("sample") -- expected: the operation completes without returning a value end) ``` ## `ImGui.SetKeyboardFocusHere` ### Description ImGui.SetKeyboardFocusHere sets keyboard focus here in the current ImGui context. ### Syntax ```luau ImGui.SetKeyboardFocusHere(offset?: integer) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `offset` | `integer?` | Starting value index used by the plot. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.SetKeyboardFocusHere() -- expected: the operation completes without returning a value end) ``` ## `ImGui.SetMouseCursor` ### Description ImGui.SetMouseCursor sets mouse cursor in the current ImGui context. ### Syntax ```luau ImGui.SetMouseCursor(cursor: integer) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `cursor` | `integer` | ImGuiMouseCursor value to display. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `cursor` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.SetMouseCursor(1) -- expected: the operation completes without returning a value end) ``` ## `ImGui.SetNextItemOpen` ### Description ImGui.SetNextItemOpen sets item open for the next matching ImGui item or window. ### Syntax ```luau ImGui.SetNextItemOpen(open: boolean, condition?: integer) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `open` | `boolean` | Current open state supplied to the widget. | | `condition` | `integer?` | ImGuiCond flags controlling when the setting is applied. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `open` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.SetNextItemOpen(true) -- expected: the operation completes without returning a value end) ``` ## `ImGui.SetNextItemShortcut` ### Description ImGui.SetNextItemShortcut sets item shortcut for the next matching ImGui item or window. ### Syntax ```luau ImGui.SetNextItemShortcut(chord: integer, flags?: integer) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `chord` | `integer` | ImGuiKeyChord value tested for a shortcut. | | `flags` | `integer?` | Bitwise combination of flags accepted by this command. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `chord` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.SetNextItemShortcut(1) -- expected: the operation completes without returning a value end) ``` ## `ImGui.SetNextItemWidth` ### Description ImGui.SetNextItemWidth sets item width for the next matching ImGui item or window. ### Syntax ```luau ImGui.SetNextItemWidth(width: number) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `width` | `number` | Width in screen pixels. A negative ImGui width uses the remaining region. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `width` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.SetNextItemWidth(1.0) -- expected: the operation completes without returning a value end) ``` ## `ImGui.SetNextWindowBgAlpha` ### Description ImGui.SetNextWindowBgAlpha sets window bg alpha for the next matching ImGui item or window. ### Syntax ```luau ImGui.SetNextWindowBgAlpha(alpha: number) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `alpha` | `number` | Opacity value, normally between 0 and 1. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `alpha` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.SetNextWindowBgAlpha(1.0) -- expected: the operation completes without returning a value end) ``` ## `ImGui.SetNextWindowCollapsed` ### Description ImGui.SetNextWindowCollapsed sets window collapsed for the next matching ImGui item or window. ### Syntax ```luau ImGui.SetNextWindowCollapsed(collapsed: boolean, condition?: integer) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `collapsed` | `boolean` | Whether the next window starts collapsed. | | `condition` | `integer?` | ImGuiCond flags controlling when the setting is applied. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `collapsed` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.SetNextWindowCollapsed(true) -- expected: the operation completes without returning a value end) ``` ## `ImGui.SetNextWindowContentSize` ### Description ImGui.SetNextWindowContentSize sets window content size for the next matching ImGui item or window. ### Syntax ```luau ImGui.SetNextWindowContentSize(size: Vector2) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `size` | `Vector2` | Requested size, byte count, or dimensions. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `size` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.SetNextWindowContentSize(Vector2.new(120, 24)) -- expected: the operation completes without returning a value end) ``` ## `ImGui.SetNextWindowFocus` ### Description ImGui.SetNextWindowFocus sets window focus for the next matching ImGui item or window. ### Syntax ```luau ImGui.SetNextWindowFocus() -> () ``` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.SetNextWindowFocus() -- expected: the operation completes without returning a value end) ``` ## `ImGui.SetNextWindowPos` ### Description ImGui.SetNextWindowPos sets window pos for the next matching ImGui item or window. ### Syntax ```luau ImGui.SetNextWindowPos(position: Vector2, condition?: integer, pivot?: Vector2) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `position` | `Vector2` | Screen or layout position. | | `condition` | `integer?` | ImGuiCond flags controlling when the setting is applied. | | `pivot` | `Vector2?` | Normalized pivot used to position the next window. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `position` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.SetNextWindowPos(Vector2.new(20, 20)) -- expected: the operation completes without returning a value end) ``` ## `ImGui.SetNextWindowScroll` ### Description ImGui.SetNextWindowScroll sets window scroll for the next matching ImGui item or window. ### Syntax ```luau ImGui.SetNextWindowScroll(scroll: Vector2) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `scroll` | `Vector2` | Horizontal and vertical scroll position. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `scroll` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.SetNextWindowScroll(Vector2.new(120, 24)) -- expected: the operation completes without returning a value end) ``` ## `ImGui.SetNextWindowSize` ### Description ImGui.SetNextWindowSize sets window size for the next matching ImGui item or window. ### Syntax ```luau ImGui.SetNextWindowSize(size: Vector2, condition?: integer) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `size` | `Vector2` | Requested size, byte count, or dimensions. | | `condition` | `integer?` | ImGuiCond flags controlling when the setting is applied. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `size` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.SetNextWindowSize(Vector2.new(120, 24)) -- expected: the operation completes without returning a value end) ``` ## `ImGui.SetNextWindowSizeConstraints` ### Description ImGui.SetNextWindowSizeConstraints sets window size constraints for the next matching ImGui item or window. ### Syntax ```luau ImGui.SetNextWindowSizeConstraints(minimum: Vector2, maximum: Vector2) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `minimum` | `Vector2` | Lower bound. | | `maximum` | `Vector2` | Upper bound or maximum radius. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `minimum` or `maximum` have an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.SetNextWindowSizeConstraints(0, 100) -- expected: the operation completes without returning a value end) ``` ## `ImGui.SetScrollHereX` ### Description ImGui.SetScrollHereX sets scroll here x in the current ImGui context. ### Syntax ```luau ImGui.SetScrollHereX(ratio?: number) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `ratio` | `number?` | Initial split ratio from 0 to 1. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.SetScrollHereX() -- expected: the operation completes without returning a value end) ``` ## `ImGui.SetScrollHereY` ### Description ImGui.SetScrollHereY sets scroll here y in the current ImGui context. ### Syntax ```luau ImGui.SetScrollHereY(ratio?: number) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `ratio` | `number?` | Initial split ratio from 0 to 1. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.SetScrollHereY() -- expected: the operation completes without returning a value end) ``` ## `ImGui.SetScrollX` ### Description ImGui.SetScrollX sets scroll x in the current ImGui context. ### Syntax ```luau ImGui.SetScrollX(value: number) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `value` | `number` | Value read, written, displayed, or passed to the operation. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `value` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.SetScrollX(1.0) -- expected: the operation completes without returning a value end) ``` ## `ImGui.SetScrollY` ### Description ImGui.SetScrollY sets scroll y in the current ImGui context. ### Syntax ```luau ImGui.SetScrollY(value: number) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `value` | `number` | Value read, written, displayed, or passed to the operation. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `value` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.SetScrollY(1.0) -- expected: the operation completes without returning a value end) ``` ## `ImGui.SetTabItemClosed` ### Description ImGui.SetTabItemClosed sets tab item closed in the current ImGui context. ### Syntax ```luau ImGui.SetTabItemClosed(label: string) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `label` | `string` | Visible label and ImGui identifier for the item. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `label` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.SetTabItemClosed("Documentation") -- expected: the operation completes without returning a value end) ``` ## `ImGui.SetTooltip` ### Description ImGui.SetTooltip sets tooltip in the current ImGui context. ### Syntax ```luau ImGui.SetTooltip(value: string) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `value` | `string` | Value read, written, displayed, or passed to the operation. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `value` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.SetTooltip("sample") -- expected: the operation completes without returning a value end) ``` ## `ImGui.Shortcut` ### Description ImGui.Shortcut tests an ImGui key chord in the current input context and returns true when the shortcut is triggered. ### Syntax ```luau ImGui.Shortcut(chord: integer, flags?: integer) -> boolean ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `chord` | `integer` | ImGuiKeyChord value tested for a shortcut. | | `flags` | `integer?` | Bitwise combination of flags accepted by this command. | ### Returns Returns true when the operation succeeds or its condition is met; otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or when `chord` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.Shortcut(1) -- expected: boolean end) ``` ## `ImGui.SliderAngle` ### Description ImGui.SliderAngle draws an angle slider and returns its value and change state. ### Syntax ```luau ImGui.SliderAngle(label: string, input?: number, minimum?: number, maximum?: number, format?: string, flags?: integer) -> (number, boolean) ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `label` | `string` | Visible label and ImGui identifier for the item. | | `input` | `number?` | Current value displayed by the widget. | | `minimum` | `number?` | Lower bound. | | `maximum` | `number?` | Upper bound or maximum radius. | | `format` | `string?` | ImGui numeric format string. | | `flags` | `integer?` | Bitwise combination of flags accepted by this command. | ### Returns Returns `(number, boolean)`. ### Errors Raises an error when called outside `ImGui.OnRender` or when `label` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.SliderAngle("Documentation") -- expected: (number, boolean) end) ``` ## `ImGui.SliderFloat` ### Description ImGui.SliderFloat draws a number slider and returns its value and change state. ### Syntax ```luau ImGui.SliderFloat(label: string, input?: number, minimum?: number, maximum?: number, format?: string, flags?: integer) -> (number, boolean) ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `label` | `string` | Visible label and ImGui identifier for the item. | | `input` | `number?` | Current value displayed by the widget. | | `minimum` | `number?` | Lower bound. | | `maximum` | `number?` | Upper bound or maximum radius. | | `format` | `string?` | ImGui numeric format string. | | `flags` | `integer?` | Bitwise combination of flags accepted by this command. | ### Returns Returns `(number, boolean)`. ### Errors Raises an error when called outside `ImGui.OnRender` or when `label` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.SliderFloat("Documentation") -- expected: (number, boolean) end) ``` ## `ImGui.SliderInt` ### Description ImGui.SliderInt draws an integer slider and returns its value and change state. ### Syntax ```luau ImGui.SliderInt(label: string, input?: integer, minimum?: integer, maximum?: integer, format?: string, flags?: integer) -> (integer, boolean) ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `label` | `string` | Visible label and ImGui identifier for the item. | | `input` | `integer?` | Current value displayed by the widget. | | `minimum` | `integer?` | Lower bound. | | `maximum` | `integer?` | Upper bound or maximum radius. | | `format` | `string?` | ImGui numeric format string. | | `flags` | `integer?` | Bitwise combination of flags accepted by this command. | ### Returns Returns `(integer, boolean)`. ### Errors Raises an error when called outside `ImGui.OnRender` or when `label` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.SliderInt("Documentation") -- expected: (integer, boolean) end) ``` ## `ImGui.SmallButton` ### Description ImGui.SmallButton draws a compact button and reports whether it was clicked. ### Syntax ```luau ImGui.SmallButton(label: string) -> boolean ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `label` | `string` | Visible label and ImGui identifier for the item. | ### Returns Returns true when it was clicked, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or when `label` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() local result = ImGui.SmallButton("Documentation") -- expected: boolean end) ``` ## `ImGui.Spacing` ### Description ImGui.Spacing adds one item-spacing unit to the layout. ### Syntax ```luau ImGui.Spacing() -> () ``` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.Spacing() -- expected: the operation completes without returning a value end) ``` ## `ImGui.StringBuffer` ### Description ImGui.StringBuffer creates mutable text storage for ImGui input widgets. The buffer keeps its contents across render frames. ### Syntax ```luau ImGui.StringBuffer(initial?: string, max_size?: integer) -> ImGuiStringBuffer ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `initial` | `string?` | Initial text stored in the string buffer. | | `max_size` | `integer?` | Maximum number of bytes stored by the string buffer. | ### Returns Returns `ImGuiStringBuffer`. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local buffer = ImGui.StringBuffer("initial text", 256) local connection = ImGui.OnRender(function() local text, changed = ImGui.InputText("Name", buffer) if changed then print(text) -- expected: the edited text end end) ``` ## `ImGui.StyleColorsClassic` ### Description ImGui.StyleColorsClassic applies the ImGui colors classic preset. ### Syntax ```luau ImGui.StyleColorsClassic() -> () ``` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.StyleColorsClassic() -- expected: the operation completes without returning a value end) ``` ## `ImGui.StyleColorsDark` ### Description ImGui.StyleColorsDark applies the ImGui colors dark preset. ### Syntax ```luau ImGui.StyleColorsDark() -> () ``` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.StyleColorsDark() -- expected: the operation completes without returning a value end) ``` ## `ImGui.StyleColorsLight` ### Description ImGui.StyleColorsLight applies the ImGui colors light preset. ### Syntax ```luau ImGui.StyleColorsLight() -> () ``` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.StyleColorsLight() -- expected: the operation completes without returning a value end) ``` ## `ImGui.TabItemButton` ### Description ImGui.TabItemButton places a button in the current tab bar and returns true when it is activated. ### Syntax ```luau ImGui.TabItemButton(label: string, flags?: integer) -> boolean ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `label` | `string` | Visible label and ImGui identifier for the item. | | `flags` | `integer?` | Bitwise combination of flags accepted by this command. | ### Returns Returns true when the operation succeeds or its condition is met; otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or when `label` has an unsupported type or value. ### Notes Call this function between a successful ImGui.BeginTabBar call and its matching ImGui.EndTabBar. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.BeginTabBar("docs-tabs") then if ImGui.TabItemButton("Add") then print("Add clicked") -- expected: printed after a click end ImGui.EndTabBar() end end) ``` ## `ImGui.TableGetColumnCount` ### Description ImGui.TableGetColumnCount returns the number of columns in the current table. ### Syntax ```luau ImGui.TableGetColumnCount() -> integer ``` ### Parameters This function has no parameters. ### Returns Returns `integer`. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function between a successful ImGui.BeginTable call and its matching ImGui.EndTable during the same render frame. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.BeginTable("docs-table", 2) then local result = ImGui.TableGetColumnCount() -- expected: integer ImGui.EndTable() end end) ``` ## `ImGui.TableGetColumnFlags` ### Description ImGui.TableGetColumnFlags returns the status flags for a column in the current table. Omitting column selects the current column. ### Syntax ```luau ImGui.TableGetColumnFlags(column?: integer) -> integer ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `column` | `integer?` | Zero-based table column index. | ### Returns Returns `integer`. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function between a successful ImGui.BeginTable call and its matching ImGui.EndTable during the same render frame. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.BeginTable("docs-table", 2) then local result = ImGui.TableGetColumnFlags() -- expected: integer ImGui.EndTable() end end) ``` ## `ImGui.TableGetColumnIndex` ### Description ImGui.TableGetColumnIndex returns the zero-based index of the current table column. ### Syntax ```luau ImGui.TableGetColumnIndex() -> integer ``` ### Parameters This function has no parameters. ### Returns Returns `integer`. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function between a successful ImGui.BeginTable call and its matching ImGui.EndTable during the same render frame. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.BeginTable("docs-table", 2) then local result = ImGui.TableGetColumnIndex() -- expected: integer ImGui.EndTable() end end) ``` ## `ImGui.TableGetColumnName` ### Description ImGui.TableGetColumnName returns the display name of a column in the current table. Omitting column selects the current column. ### Syntax ```luau ImGui.TableGetColumnName(column?: integer) -> string ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `column` | `integer?` | Zero-based table column index. | ### Returns Returns `string`. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function between a successful ImGui.BeginTable call and its matching ImGui.EndTable during the same render frame. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.BeginTable("docs-table", 2) then local result = ImGui.TableGetColumnName() -- expected: string ImGui.EndTable() end end) ``` ## `ImGui.TableGetRowIndex` ### Description ImGui.TableGetRowIndex returns the zero-based index of the current table row. ### Syntax ```luau ImGui.TableGetRowIndex() -> integer ``` ### Parameters This function has no parameters. ### Returns Returns `integer`. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function between a successful ImGui.BeginTable call and its matching ImGui.EndTable during the same render frame. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.BeginTable("docs-table", 2) then local result = ImGui.TableGetRowIndex() -- expected: integer ImGui.EndTable() end end) ``` ## `ImGui.TableHeader` ### Description ImGui.TableHeader draws one header cell using the current table column settings. ### Syntax ```luau ImGui.TableHeader(label: string) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `label` | `string` | Visible label and ImGui identifier for the item. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `label` has an unsupported type or value. ### Notes Call this function between a successful ImGui.BeginTable call and its matching ImGui.EndTable during the same render frame. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.BeginTable("docs-table", 2) then ImGui.TableHeader("Documentation") -- expected: the operation completes without returning a value ImGui.EndTable() end end) ``` ## `ImGui.TableHeadersRow` ### Description ImGui.TableHeadersRow draws the complete header row for the current table. ### Syntax ```luau ImGui.TableHeadersRow() -> () ``` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function between a successful ImGui.BeginTable call and its matching ImGui.EndTable during the same render frame. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.BeginTable("docs-table", 2) then ImGui.TableHeadersRow() -- expected: the operation completes without returning a value ImGui.EndTable() end end) ``` ## `ImGui.TableNextColumn` ### Description ImGui.TableNextColumn advances to the next enabled table column and reports whether that column is visible. ### Syntax ```luau ImGui.TableNextColumn() -> boolean ``` ### Parameters This function has no parameters. ### Returns Returns true when that column is visible, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function between a successful ImGui.BeginTable call and its matching ImGui.EndTable during the same render frame. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.BeginTable("docs-table", 2) then local result = ImGui.TableNextColumn() -- expected: boolean ImGui.EndTable() end end) ``` ## `ImGui.TableNextRow` ### Description ImGui.TableNextRow starts a new table row with optional row flags and minimum height. ### Syntax ```luau ImGui.TableNextRow(flags?: integer, height?: number) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `flags` | `integer?` | Bitwise ImGuiTableRowFlags value applied to the new row. | | `height` | `number?` | Minimum row height in screen pixels. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function between a successful ImGui.BeginTable call and its matching ImGui.EndTable during the same render frame. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.BeginTable("docs-table", 2) then ImGui.TableNextRow() -- expected: the operation completes without returning a value ImGui.EndTable() end end) ``` ## `ImGui.TableSetBgColor` ### Description ImGui.TableSetBgColor changes a row or cell background color in the current table. ### Syntax ```luau ImGui.TableSetBgColor(target: integer, color: Color3 | integer, column?: integer) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `target` | `integer` | ImGuiTableBgTarget value selecting the row or cell background layer. | | `color` | `Color3 | integer` | Color applied to the item. | | `column` | `integer?` | Zero-based column index, or -1 for the current column. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `target` or `color` have an unsupported type or value. ### Notes Call this function between a successful ImGui.BeginTable call and its matching ImGui.EndTable during the same render frame. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.BeginTable("docs-table", 2) then ImGui.TableSetBgColor(1, Color3.fromRGB(255, 255, 255)) -- expected: the operation completes without returning a value ImGui.EndTable() end end) ``` ## `ImGui.TableSetColumnEnabled` ### Description ImGui.TableSetColumnEnabled changes whether a table column is enabled. ### Syntax ```luau ImGui.TableSetColumnEnabled(column: integer, enabled: boolean) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `column` | `integer` | Zero-based table column index. | | `enabled` | `boolean` | Whether the feature or connection should be enabled. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `column` or `enabled` have an unsupported type or value. ### Notes Call this function between a successful ImGui.BeginTable call and its matching ImGui.EndTable during the same render frame. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.BeginTable("docs-table", 2) then ImGui.TableSetColumnEnabled(1, true) -- expected: the operation completes without returning a value ImGui.EndTable() end end) ``` ## `ImGui.TableSetColumnIndex` ### Description ImGui.TableSetColumnIndex selects a zero-based table column and reports whether it is visible. ### Syntax ```luau ImGui.TableSetColumnIndex(column: integer) -> boolean ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `column` | `integer` | Zero-based table column index. | ### Returns Returns true when it is visible, otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or when `column` has an unsupported type or value. ### Notes Call this function between a successful ImGui.BeginTable call and its matching ImGui.EndTable during the same render frame. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.BeginTable("docs-table", 2) then local result = ImGui.TableSetColumnIndex(1) -- expected: boolean ImGui.EndTable() end end) ``` ## `ImGui.TableSetupColumn` ### Description ImGui.TableSetupColumn defines a table column before the first row, including its label, flags, width or weight, and optional user ID. ### Syntax ```luau ImGui.TableSetupColumn(label: string, flags?: integer, width?: number, user_id?: integer) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `label` | `string` | Visible label and ImGui identifier for the item. | | `flags` | `integer?` | Bitwise combination of flags accepted by this command. | | `width` | `number?` | Initial fixed width or stretch weight, depending on the column flags. | | `user_id` | `integer?` | Optional application-defined table column identifier. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `label` has an unsupported type or value. ### Notes Call this function between a successful ImGui.BeginTable call and its matching ImGui.EndTable during the same render frame. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.BeginTable("docs-table", 2) then ImGui.TableSetupColumn("Documentation") -- expected: the operation completes without returning a value ImGui.EndTable() end end) ``` ## `ImGui.TableSetupScrollFreeze` ### Description ImGui.TableSetupScrollFreeze keeps the requested leading columns and rows visible while the table scrolls. ### Syntax ```luau ImGui.TableSetupScrollFreeze(columns: integer, rows: integer) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `columns` | `integer` | Number of leading columns kept visible while scrolling. | | `rows` | `integer` | Number of leading rows kept visible while scrolling. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `columns` or `rows` have an unsupported type or value. ### Notes Call this function between a successful ImGui.BeginTable call and its matching ImGui.EndTable during the same render frame. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.BeginTable("docs-table", 2) then ImGui.TableSetupScrollFreeze(1, 1) -- expected: the operation completes without returning a value ImGui.EndTable() end end) ``` ## `ImGui.Text` ### Description ImGui.Text draws unformatted text. ### Syntax ```luau ImGui.Text(value: string) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `value` | `string` | Value read, written, displayed, or passed to the operation. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `value` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.Text("sample") -- expected: the operation completes without returning a value end) ``` ## `ImGui.TextColored` ### Description ImGui.TextColored draws text in the specified color. ### Syntax ```luau ImGui.TextColored(color: Color3 | integer, value: string) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `color` | `Color3 | integer` | Color applied to the item. | | `value` | `string` | Value read, written, displayed, or passed to the operation. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `color` or `value` have an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.TextColored(Color3.fromRGB(255, 255, 255), "sample") -- expected: the operation completes without returning a value end) ``` ## `ImGui.TextDisabled` ### Description ImGui.TextDisabled draws text using the disabled-text style. ### Syntax ```luau ImGui.TextDisabled(value: string) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `value` | `string` | Value read, written, displayed, or passed to the operation. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `value` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.TextDisabled("sample") -- expected: the operation completes without returning a value end) ``` ## `ImGui.TextEx` ### Description ImGui.TextEx draws text with optional handling for the ## identifier suffix. ### Syntax ```luau ImGui.TextEx(value: string, flags: integer) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `value` | `string` | Value read, written, displayed, or passed to the operation. | | `flags` | `integer` | Bitwise combination of flags accepted by this command. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `value` or `flags` have an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.TextEx("sample", 1) -- expected: the operation completes without returning a value end) ``` ## `ImGui.TextWrapped` ### Description ImGui.TextWrapped draws text that wraps at the current content boundary. ### Syntax ```luau ImGui.TextWrapped(value: string) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `value` | `string` | Value read, written, displayed, or passed to the operation. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or when `value` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.TextWrapped("sample") -- expected: the operation completes without returning a value end) ``` ## `ImGui.TreeNode` ### Description ImGui.TreeNode draws an expandable tree node and returns true while its child contents should be submitted. ### Syntax ```luau ImGui.TreeNode(label: string, id?: string) -> boolean ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `label` | `string` | Visible label and ImGui identifier for the item. | | `id` | `string?` | Identifier used to locate or distinguish the object. | ### Returns Returns true when the operation succeeds or its condition is met; otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or when `label` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.TreeNode("Details") then ImGui.Text("Visible child") ImGui.TreePop() end end) -- expected: an expandable tree node ``` ## `ImGui.TreeNodeEx` ### Description ImGui.TreeNodeEx draws an expandable tree node with optional flags and ID. It returns true while its child contents should be submitted. ### Syntax ```luau ImGui.TreeNodeEx(label: string, flags?: integer, id?: string) -> boolean ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `label` | `string` | Visible label and ImGui identifier for the item. | | `flags` | `integer?` | Bitwise combination of flags accepted by this command. | | `id` | `string?` | Identifier used to locate or distinguish the object. | ### Returns Returns true when the operation succeeds or its condition is met; otherwise false. ### Errors Raises an error when called outside `ImGui.OnRender` or when `label` has an unsupported type or value. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.TreeNodeEx("Details", ImGuiTreeNodeFlags_DefaultOpen) then ImGui.Text("Visible child") ImGui.TreePop() end end) -- expected: an initially open tree node ``` ## `ImGui.TreePop` ### Description ImGui.TreePop closes the most recent open tree-node scope. Call it only when the matching tree-node function returned true. ### Syntax ```luau ImGui.TreePop() -> () ``` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Keep its Begin/End or Push/Pop scope balanced during the same frame. ### Example ```luau local connection = ImGui.OnRender(function() if ImGui.TreeNode("Details") then ImGui.Text("Visible child") ImGui.TreePop() end end) -- expected: the scope is balanced each frame ``` ## `ImGui.Unindent` ### Description ImGui.Unindent moves the current layout cursor to the left. ### Syntax ```luau ImGui.Unindent(width?: number) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `width` | `number?` | Width in screen pixels. A negative ImGui width uses the remaining region. | ### Returns This function does not return a value. ### Errors Raises an error when called outside `ImGui.OnRender` or without the ImGui state required by the operation. ### Notes Call this function from ImGui.OnRender. Returned state applies to the current frame. ### Example ```luau local connection = ImGui.OnRender(function() ImGui.Unindent() -- expected: the operation completes without returning a value end) ``` --- # Input # Input Keyboard and mouse input functions for the game window. ## Function index | Function | Summary | | --- | --- | | [`iswindowactive`](#iswindowactive) | iswindowactive returns whether the game window is currently focused. | | [`keyclick`](#keyclick) | keyclick presses and releases a Windows virtual key. | | [`keypress`](#keypress) | keypress presses a Windows virtual key. | | [`keyrelease`](#keyrelease) | keyrelease releases a Windows virtual key. | | [`mouse1click`](#mouse1click) | mouse1click presses and releases the left mouse button. | | [`mouse1press`](#mouse1press) | mouse1press presses the left mouse button. | | [`mouse1release`](#mouse1release) | mouse1release releases the left mouse button. | | [`mouse2click`](#mouse2click) | mouse2click presses and releases the right mouse button. | | [`mouse2press`](#mouse2press) | mouse2press presses the right mouse button. | | [`mouse2release`](#mouse2release) | mouse2release releases the right mouse button. | | [`mousemoveabs`](#mousemoveabs) | mousemoveabs moves the cursor to a position in the game client area. | | [`mousemoverel`](#mousemoverel) | mousemoverel moves the cursor by a pixel offset. | | [`mousescroll`](#mousescroll) | mousescroll sends a mouse-wheel movement. | ## `iswindowactive` ### Description iswindowactive returns whether the game window is currently focused. ### Syntax ```luau iswindowactive() -> boolean ``` ### Aliases `isrbxactive`, `isgameactive`, `is_window_active`, `is_rbx_active`, `is_game_active` ### Parameters This function has no parameters. ### Returns Returns true when the game window is currently focused, otherwise false. ### Errors This function has no function-specific error conditions. ### Notes Input is sent to the game window. Check iswindowactive before sending input that should not reach another application. ### Example ```luau local result = iswindowactive() print(result) -- expected: boolean ``` ## `keyclick` ### Description keyclick presses and releases a Windows virtual key. ### Syntax ```luau keyclick(keycode: integer) -> () ``` ### Aliases `key_click` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `keycode` | `integer` | Windows virtual-key code. | ### Returns This function does not return a value. ### Errors Raises an argument error when `keycode` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Input is sent to the game window. Check iswindowactive before sending input that should not reach another application. ### Example ```luau keyclick(0x57) -- expected: the operation completes without returning a value ``` ## `keypress` ### Description keypress presses a Windows virtual key. ### Syntax ```luau keypress(keycode: integer) -> () ``` ### Aliases `keytap`, `key_tap`, `key_press` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `keycode` | `integer` | Windows virtual-key code. | ### Returns This function does not return a value. ### Errors Raises an argument error when `keycode` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Input is sent to the game window. Check iswindowactive before sending input that should not reach another application. ### Example ```luau keypress(0x57) -- expected: the operation completes without returning a value ``` ## `keyrelease` ### Description keyrelease releases a Windows virtual key. ### Syntax ```luau keyrelease(keycode: integer) -> () ``` ### Aliases `key_release` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `keycode` | `integer` | Windows virtual-key code. | ### Returns This function does not return a value. ### Errors Raises an argument error when `keycode` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Input is sent to the game window. Check iswindowactive before sending input that should not reach another application. ### Example ```luau keyrelease(0x57) -- expected: the operation completes without returning a value ``` ## `mouse1click` ### Description mouse1click presses and releases the left mouse button. ### Syntax ```luau mouse1click() -> () ``` ### Aliases `mouse_1_click` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors This function has no function-specific error conditions. ### Notes Input is sent to the game window. Check iswindowactive before sending input that should not reach another application. ### Example ```luau mouse1click() -- expected: the operation completes without returning a value ``` ## `mouse1press` ### Description mouse1press presses the left mouse button. ### Syntax ```luau mouse1press() -> () ``` ### Aliases `mouse_1_press` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors This function has no function-specific error conditions. ### Notes Input is sent to the game window. Check iswindowactive before sending input that should not reach another application. ### Example ```luau mouse1press() -- expected: the operation completes without returning a value ``` ## `mouse1release` ### Description mouse1release releases the left mouse button. ### Syntax ```luau mouse1release() -> () ``` ### Aliases `mouse_1_release` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors This function has no function-specific error conditions. ### Notes Input is sent to the game window. Check iswindowactive before sending input that should not reach another application. ### Example ```luau mouse1release() -- expected: the operation completes without returning a value ``` ## `mouse2click` ### Description mouse2click presses and releases the right mouse button. ### Syntax ```luau mouse2click() -> () ``` ### Aliases `mouse_2_click` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors This function has no function-specific error conditions. ### Notes Input is sent to the game window. Check iswindowactive before sending input that should not reach another application. ### Example ```luau mouse2click() -- expected: the operation completes without returning a value ``` ## `mouse2press` ### Description mouse2press presses the right mouse button. ### Syntax ```luau mouse2press() -> () ``` ### Aliases `mouse_2_press` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors This function has no function-specific error conditions. ### Notes Input is sent to the game window. Check iswindowactive before sending input that should not reach another application. ### Example ```luau mouse2press() -- expected: the operation completes without returning a value ``` ## `mouse2release` ### Description mouse2release releases the right mouse button. ### Syntax ```luau mouse2release() -> () ``` ### Aliases `mouse_2_release` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors This function has no function-specific error conditions. ### Notes Input is sent to the game window. Check iswindowactive before sending input that should not reach another application. ### Example ```luau mouse2release() -- expected: the operation completes without returning a value ``` ## `mousemoveabs` ### Description mousemoveabs moves the cursor to a position in the game client area. ### Syntax ```luau mousemoveabs(x: integer, y: integer) -> () ``` ### Aliases `mouse_move_abs` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `x` | `integer` | Horizontal screen coordinate or offset. | | `y` | `integer` | Vertical screen coordinate or offset. | ### Returns This function does not return a value. ### Errors Raises an argument error when `x` or `y` have an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Input is sent to the game window. Check iswindowactive before sending input that should not reach another application. ### Example ```luau mousemoveabs(1, 1) -- expected: the operation completes without returning a value ``` ## `mousemoverel` ### Description mousemoverel moves the cursor by a pixel offset. ### Syntax ```luau mousemoverel(x: integer, y: integer) -> () ``` ### Aliases `mouse_move_rel` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `x` | `integer` | Horizontal screen coordinate or offset. | | `y` | `integer` | Vertical screen coordinate or offset. | ### Returns This function does not return a value. ### Errors Raises an argument error when `x` or `y` have an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Input is sent to the game window. Check iswindowactive before sending input that should not reach another application. ### Example ```luau mousemoverel(1, 1) -- expected: the operation completes without returning a value ``` ## `mousescroll` ### Description mousescroll sends a mouse-wheel movement. ### Syntax ```luau mousescroll(delta: integer) -> () ``` ### Aliases `mouse_scroll` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `delta` | `integer` | Signed scroll or movement amount. | ### Returns This function does not return a value. ### Errors Raises an argument error when `delta` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Input is sent to the game window. Check iswindowactive before sending input that should not reach another application. ### Example ```luau mousescroll(1) -- expected: the operation completes without returning a value ``` --- # Madium Signal # Madium signal Script-created signals and connection objects. ## Function index | Function | Summary | | --- | --- | | [`MadiumConnection.Disconnect`](#madiumconnection-disconnect) | MadiumConnection.Disconnect disconnects the connection. | | [`MadiumSignal.Connect`](#madiumsignal-connect) | MadiumSignal.Connect connects a function to the signal. | | [`MadiumSignal.Fire`](#madiumsignal-fire) | MadiumSignal.Fire fires the signal with the supplied arguments. | | [`MadiumSignal.new`](#madiumsignal-new) | MadiumSignal.new creates a script signal. | | [`MadiumSignal.Once`](#madiumsignal-once) | MadiumSignal.Once connects a function that is removed after its first call. | | [`MadiumSignal.Wait`](#madiumsignal-wait) | MadiumSignal.Wait yields until the signal fires, then returns its arguments. | ## `MadiumConnection.Disconnect` ### Description MadiumConnection.Disconnect disconnects the connection. ### Syntax ```luau MadiumConnection.Disconnect() -> () ``` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors This function has no function-specific error conditions. ### Notes Disconnect connections that are no longer used so their callbacks and captured values can be released. ### Example ```luau local signal = MadiumSignal.new() local connection = signal:Connect(print) connection:Disconnect() -- expected: the operation completes without returning a value ``` ## `MadiumSignal.Connect` ### Description MadiumSignal.Connect connects a function to the signal. ### Syntax ```luau MadiumSignal.Connect(callback: function) -> MadiumConnection ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `callback` | `function` | Function invoked when the event or hook runs. | ### Returns Returns `MadiumConnection`. ### Errors Raises an argument error when `callback` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Disconnect connections that are no longer used so their callbacks and captured values can be released. ### Example ```luau local signal = MadiumSignal.new() local connection = signal:Connect(function(value) print(value) -- expected: MadiumConnection end) ``` ## `MadiumSignal.Fire` ### Description MadiumSignal.Fire fires the signal with the supplied arguments. ### Syntax ```luau MadiumSignal.Fire(...: any) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `...` | `any` | Values forwarded without changing their order or nil slots. | ### Returns This function does not return a value. ### Errors This function has no function-specific error conditions. ### Notes Disconnect connections that are no longer used so their callbacks and captured values can be released. ### Example ```luau local signal = MadiumSignal.new() signal:Fire("ready") -- expected: the operation completes without returning a value ``` ## `MadiumSignal.new` ### Description MadiumSignal.new creates a script signal. ### Syntax ```luau MadiumSignal.new() -> MadiumSignal ``` ### Aliases `Signal.new` ### Parameters This function has no parameters. ### Returns Returns `MadiumSignal`. ### Errors This function has no function-specific error conditions. ### Notes Disconnect connections that are no longer used so their callbacks and captured values can be released. ### Example ```luau local signal = MadiumSignal.new() print(signal) -- expected: MadiumSignal ``` ## `MadiumSignal.Once` ### Description MadiumSignal.Once connects a function that is removed after its first call. ### Syntax ```luau MadiumSignal.Once(callback: function) -> MadiumConnection ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `callback` | `function` | Function invoked when the event or hook runs. | ### Returns Returns `MadiumConnection`. ### Errors Raises an argument error when `callback` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Disconnect connections that are no longer used so their callbacks and captured values can be released. ### Example ```luau local signal = MadiumSignal.new() signal:Once(function(value) print(value) -- expected: MadiumConnection end) ``` ## `MadiumSignal.Wait` ### Description MadiumSignal.Wait yields until the signal fires, then returns its arguments. ### Syntax ```luau MadiumSignal.Wait() -> ...any ``` ### Parameters This function has no parameters. ### Returns Returns `...any`. ### Errors This function has no function-specific error conditions. ### Notes Disconnect connections that are no longer used so their callbacks and captured values can be released. ### Example ```luau local signal = MadiumSignal.new() task.defer(function() signal:Fire("ready", 42) end) local state, value = signal:Wait() print(state, value) -- expected: "ready", 42 ``` --- # Miscellaneous # Miscellaneous Clipboard, process, frame-rate, fast-flag, HTTP, and teleport-queue functions. ## Function index | Function | Summary | | --- | --- | | [`clearqueueonteleport`](#clearqueueonteleport) | clearqueueonteleport clears all Luau source queued for execution after teleporting. | | [`getfflag`](#getfflag) | getfflag gets a Fast Flag value. | | [`getfpscap`](#getfpscap) | getfpscap gets the current fps cap. | | [`gethui`](#gethui) | gethui returns the cached hidden UI container or creates one for the current DataModel. | | [`gethwid`](#gethwid) | gethwid returns the current hardware identifier. | | [`getprocessidentifier`](#getprocessidentifier) | getprocessidentifier returns the current process identifier. | | [`httpget`](#httpget) | httpget performs an HTTP GET request. | | [`identifyexecutor`](#identifyexecutor) | identifyexecutor returns information about the executor. | | [`messagebox`](#messagebox) | messagebox displays a yielding Windows message box and returns the selected button. | | [`queueonteleport`](#queueonteleport) | queueonteleport queues Luau source for execution after the next teleport. | | [`request`](#request) | request performs an HTTP request described by options and returns a response table containing the status, headers, body, and success state. | | [`setclipboard`](#setclipboard) | setclipboard copies a value's string representation to the system clipboard. | | [`setfflag`](#setfflag) | setfflag sets a Fast Flag value. | | [`setfpscap`](#setfpscap) | setfpscap sets the fps cap. | | [`setrbxclipboard`](#setrbxclipboard) | setrbxclipboard copies a value's string representation using Roblox Studio's clipboard format. | ## `clearqueueonteleport` ### Description clearqueueonteleport clears all Luau source queued for execution after teleporting. ### Syntax ```luau clearqueueonteleport() -> () ``` ### Aliases `clearteleportqueue`, `clear_teleport_queue` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors This function has no function-specific error conditions. ### Notes Operations that depend on the client, network, or operating system can fail even when their arguments are valid. ### Example ```luau clearqueueonteleport() -- expected: the operation completes without returning a value ``` ## `getfflag` ### Description getfflag gets a Fast Flag value. ### Syntax ```luau getfflag(name: string) -> string ``` ### Aliases `get_fflag` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `name` | `string` | Case-sensitive name used by the operation. | ### Returns Returns `string`. ### Errors Raises an argument error when `name` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Operations that depend on the client, network, or operating system can fail even when their arguments are valid. ### Example ```luau local result = getfflag("sample") print(result) -- expected: string ``` ## `getfpscap` ### Description getfpscap gets the current fps cap. ### Syntax ```luau getfpscap() -> number ``` ### Aliases `get_fps_cap` ### Parameters This function has no parameters. ### Returns Returns `number`. ### Errors This function has no function-specific error conditions. ### Notes Operations that depend on the client, network, or operating system can fail even when their arguments are valid. ### Example ```luau local result = getfpscap() print(result) -- expected: number ``` ## `gethui` ### Description gethui returns the cached hidden UI container or creates one for the current DataModel. ### Syntax ```luau gethui() -> nil | string ``` ### Aliases `get_hidden_gui`, `get_hui` ### Parameters This function has no parameters. ### Returns Returns `nil | string`. ### Errors This function has no function-specific error conditions. ### Notes Operations that depend on the client, network, or operating system can fail even when their arguments are valid. ### Example ```luau local result = gethui() print(result) -- expected: nil | string ``` ## `gethwid` ### Description gethwid returns the current hardware identifier. ### Syntax ```luau gethwid() -> string ``` ### Aliases `get_hwid` ### Parameters This function has no parameters. ### Returns Returns `string`. ### Errors This function has no function-specific error conditions. ### Notes Operations that depend on the client, network, or operating system can fail even when their arguments are valid. ### Example ```luau local result = gethwid() print(result) -- expected: string ``` ## `getprocessidentifier` ### Description getprocessidentifier returns the current process identifier. ### Syntax ```luau getprocessidentifier() -> integer ``` ### Aliases `get_process_identifier` ### Parameters This function has no parameters. ### Returns Returns `integer`. ### Errors This function has no function-specific error conditions. ### Notes Operations that depend on the client, network, or operating system can fail even when their arguments are valid. ### Example ```luau local result = getprocessidentifier() print(result) -- expected: integer ``` ## `httpget` ### Description httpget performs an HTTP GET request. ### Syntax ```luau httpget(url: string, use_cache?: boolean) -> string ``` ### Aliases `HttpGet`, `http_get` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `url` | `string` | HTTP, HTTPS, WS, or WSS URL used by the operation. | | `use_cache` | `boolean?` | Whether the current cached result may be reused. | ### Returns Returns `string`. ### Errors Raises an argument error when `url` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Operations that depend on the client, network, or operating system can fail even when their arguments are valid. ### Example ```luau local result = httpget("https://HOST") print(result) -- expected: string ``` ## `identifyexecutor` ### Description identifyexecutor returns information about the executor. ### Syntax ```luau identifyexecutor() -> (string, string) ``` ### Aliases `getexecutorname`, `identify_executor`, `get_executor_name` ### Parameters This function has no parameters. ### Returns Returns `(string, string)`. ### Errors This function has no function-specific error conditions. ### Notes Operations that depend on the client, network, or operating system can fail even when their arguments are valid. ### Example ```luau local result = identifyexecutor() print(result) -- expected: (string, string) ``` ## `messagebox` ### Description messagebox displays a yielding Windows message box and returns the selected button. ### Syntax ```luau messagebox(text: string, caption: string, flags: integer) -> integer ``` ### Aliases `message_box` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `text` | `string` | Text displayed or copied by the operation. | | `caption` | `string` | Text displayed in the message-box title bar. | | `flags` | `integer` | Bitwise combination of flags accepted by this command. | ### Returns Returns `integer`. ### Errors Raises an argument error when `text` or `caption` or `flags` have an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Operations that depend on the client, network, or operating system can fail even when their arguments are valid. ### Example ```luau local result = messagebox("sample", "sample", 1) print(result) -- expected: integer ``` ## `queueonteleport` ### Description queueonteleport queues Luau source for execution after the next teleport. ### Syntax ```luau queueonteleport(source: string) -> () ``` ### Aliases `queue_on_teleport`, `queueteleport` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `source` | `string` | Luau source text compiled or scheduled by the operation. | ### Returns This function does not return a value. ### Errors Raises an argument error when `source` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Operations that depend on the client, network, or operating system can fail even when their arguments are valid. ### Example ```luau queueonteleport("return 1") -- expected: the operation completes without returning a value ``` ## `request` ### Description request performs an HTTP request described by options and returns a response table containing the status, headers, body, and success state. ### Syntax ```luau request(options: table) -> table ``` ### Aliases `http_request`, `httprequest`, `http.request` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `options` | `table` | Options table controlling the operation. | ### Returns Returns `table`. ### Errors Raises an argument error when `options` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Operations that depend on the client, network, or operating system can fail even when their arguments are valid. ### Example ```luau local response = request({ Url = "https://example.com/", Method = "GET", }) print(response.StatusCode) -- expected: an HTTP status code print(type(response.Body)) -- expected: "string" ``` ## `setclipboard` ### Description setclipboard copies a value's string representation to the system clipboard. ### Syntax ```luau setclipboard(value: any) -> () ``` ### Aliases `toclipboard`, `set_clipboard`, `to_clipboard` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `value` | `any` | Value read, written, displayed, or passed to the operation. | ### Returns This function does not return a value. ### Errors Raises an argument error when `value` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Operations that depend on the client, network, or operating system can fail even when their arguments are valid. ### Example ```luau setclipboard("sample") -- expected: the operation completes without returning a value ``` ## `setfflag` ### Description setfflag sets a Fast Flag value. ### Syntax ```luau setfflag(name: string, value: string | boolean | number) -> () ``` ### Aliases `set_fflag` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `name` | `string` | Case-sensitive name used by the operation. | | `value` | `string | boolean | number` | Value read, written, displayed, or passed to the operation. | ### Returns This function does not return a value. ### Errors Raises an argument error when `name` or `value` have an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Operations that depend on the client, network, or operating system can fail even when their arguments are valid. ### Example ```luau setfflag("sample", nil) -- expected: the operation completes without returning a value ``` ## `setfpscap` ### Description setfpscap sets the fps cap. ### Syntax ```luau setfpscap(fps: number) -> () ``` ### Aliases `set_fps_cap` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `fps` | `number` | Requested frame-rate cap. Use 0 for the implementation's uncapped mode. | ### Returns This function does not return a value. ### Errors Raises an argument error when `fps` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Operations that depend on the client, network, or operating system can fail even when their arguments are valid. ### Example ```luau setfpscap(1.0) -- expected: the operation completes without returning a value ``` ## `setrbxclipboard` ### Description setrbxclipboard copies a value's string representation using Roblox Studio's clipboard format. ### Syntax ```luau setrbxclipboard(value: any) -> () ``` ### Aliases `set_rbx_clipboard` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `value` | `any` | Value read, written, displayed, or passed to the operation. | ### Returns This function does not return a value. ### Errors Raises an argument error when `value` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Operations that depend on the client, network, or operating system can fail even when their arguments are valid. ### Example ```luau setrbxclipboard("sample") -- expected: the operation completes without returning a value ``` --- # Oth # OTH OTH callback hooks and hook-thread inspection. ## Function index | Function | Summary | | --- | --- | | [`oth.get_original_thread`](#oth-get-original-thread) | oth.get_original_thread returns the original calling thread for an OTH callback. | | [`oth.get_root_callback`](#oth-get-root-callback) | oth.get_root_callback returns a callback that invokes the root C closure for the active OTH call. | | [`oth.hook`](#oth-hook) | oth.hook installs an OTH hook and returns the original function. | | [`oth.is_hook_thread`](#oth-is-hook-thread) | oth.is_hook_thread returns whether the current thread is servicing an OTH callback. | | [`oth.unhook`](#oth-unhook) | oth.unhook removes an OTH hook. | ## `oth.get_original_thread` ### Description oth.get_original_thread returns the original calling thread for an OTH callback. ### Syntax ```luau oth.get_original_thread() -> nil ``` ### Parameters This function has no parameters. ### Returns Returns `nil`. ### Errors This function has no function-specific error conditions. ### Notes OTH state belongs to the active hook call. Values returned by the thread-inspection helpers may be nil outside a callback. ### Example ```luau local result = oth.get_original_thread() print(result) -- expected: nil ``` ## `oth.get_root_callback` ### Description oth.get_root_callback returns a callback that invokes the root C closure for the active OTH call. ### Syntax ```luau oth.get_root_callback() -> nil ``` ### Parameters This function has no parameters. ### Returns Returns `nil`. ### Errors This function has no function-specific error conditions. ### Notes OTH state belongs to the active hook call. Values returned by the thread-inspection helpers may be nil outside a callback. ### Example ```luau local result = oth.get_root_callback() print(result) -- expected: nil ``` ## `oth.hook` ### Description oth.hook installs an OTH hook and returns the original function. ### Syntax ```luau oth.hook(to_hook: function, hook: function, filter?: FilterBase) -> function ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `to_hook` | `function` | Function modified in place. | | `hook` | `function` | Replacement function called for matching invocations. | | `filter` | `FilterBase?` | FilterBase value that decides which calls reach the replacement. | ### Returns Returns `function`. ### Errors Raises an argument error when `to_hook` or `hook` have an unsupported type or value. Errors from the underlying operation are propagated. ### Notes OTH state belongs to the active hook call. Values returned by the thread-inspection helpers may be nil outside a callback. ### Example ```luau local target = getrawmetatable(game).__index local original original = oth.hook(target, function(self, key) return original(self, key) end) print(game.Name) -- expected: the current DataModel name oth.unhook(target, original) ``` ## `oth.is_hook_thread` ### Description oth.is_hook_thread returns whether the current thread is servicing an OTH callback. ### Syntax ```luau oth.is_hook_thread() -> boolean ``` ### Parameters This function has no parameters. ### Returns Returns true when the current thread is servicing an OTH callback, otherwise false. ### Errors This function has no function-specific error conditions. ### Notes OTH state belongs to the active hook call. Values returned by the thread-inspection helpers may be nil outside a callback. ### Example ```luau local result = oth.is_hook_thread() print(result) -- expected: boolean ``` ## `oth.unhook` ### Description oth.unhook removes an OTH hook. ### Syntax ```luau oth.unhook(to_hook: function, original: function) -> boolean ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `to_hook` | `function` | Function modified in place. | | `original` | `function` | Function called when the filter does not match. | ### Returns Returns true when the operation succeeds or its condition is met; otherwise false. ### Errors Raises an argument error when `to_hook` or `original` have an unsupported type or value. Errors from the underlying operation are propagated. ### Notes OTH state belongs to the active hook call. Values returned by the thread-inspection helpers may be nil outside a callback. ### Example ```luau local target = getrawmetatable(game).__index local original original = oth.hook(target, function(self, key) return original(self, key) end) local restored = oth.unhook(target, original) print(restored) -- expected: true ``` --- # Raknet # RakNet Outgoing RakNet packet hooks, packet inspection, and packet sending. ## Function index | Function | Summary | | --- | --- | | [`raknet.add_send_hook`](#raknet-add-send-hook) | raknet.add_send_hook adds a callback that can inspect or change outgoing packets. | | [`raknet.is_enabled`](#raknet-is-enabled) | raknet.is_enabled returns whether enabled. | | [`raknet.remove_send_hook`](#raknet-remove-send-hook) | raknet.remove_send_hook removes an outgoing-packet callback. | | [`raknet.send`](#raknet-send) | raknet.send sends a RakNet packet. | | [`RakNetPacket.Block`](#raknetpacket-block) | RakNetPacket.Block marks the packet as blocked and returns the packet. | | [`RakNetPacket.SetData`](#raknetpacket-setdata) | RakNetPacket.SetData replaces the packet payload and returns the packet. | ## `raknet.add_send_hook` ### Description raknet.add_send_hook adds a callback that can inspect or change outgoing packets. ### Syntax ```luau raknet.add_send_hook(callback: (packet: RakNetPacket) -> ()) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `callback` | `(packet: RakNetPacket) -> ()` | Function invoked when the event or hook runs. | ### Returns This function does not return a value. ### Errors Raises an argument error when `callback` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Packet hooks run on the network send path. Keep callbacks short and avoid yielding from them. ### Example ```luau raknet.add_send_hook(function(...) print(...) -- expected: the operation completes without returning a value end) ``` ## `raknet.is_enabled` ### Description raknet.is_enabled returns whether enabled. ### Syntax ```luau raknet.is_enabled() -> boolean ``` ### Parameters This function has no parameters. ### Returns Returns true when enabled, otherwise false. ### Errors This function has no function-specific error conditions. ### Notes Packet hooks run on the network send path. Keep callbacks short and avoid yielding from them. ### Example ```luau local result = raknet.is_enabled() print(result) -- expected: boolean ``` ## `raknet.remove_send_hook` ### Description raknet.remove_send_hook removes an outgoing-packet callback. ### Syntax ```luau raknet.remove_send_hook(callback: function) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `callback` | `function` | Function invoked when the event or hook runs. | ### Returns This function does not return a value. ### Errors Raises an argument error when `callback` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Packet hooks run on the network send path. Keep callbacks short and avoid yielding from them. ### Example ```luau raknet.remove_send_hook(function(...) print(...) -- expected: the operation completes without returning a value end) ``` ## `raknet.send` ### Description raknet.send sends a RakNet packet. ### Syntax ```luau raknet.send(data: buffer | string | {integer}, priority?: integer, reliability?: integer, ordering_channel?: integer) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `data` | `buffer | string | {integer}` | Input bytes. Luau strings may contain zero bytes. | | `priority` | `integer?` | RakNet packet-priority constant. | | `reliability` | `integer?` | RakNet reliability constant. | | `ordering_channel` | `integer?` | RakNet ordering channel. | ### Returns This function does not return a value. ### Errors Raises an argument error when `data` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Packet hooks run on the network send path. Keep callbacks short and avoid yielding from them. ### Example ```luau raknet.send("sample") -- expected: the operation completes without returning a value ``` ## `RakNetPacket.Block` ### Description RakNetPacket.Block marks the packet as blocked and returns the packet. ### Syntax ```luau RakNetPacket.Block() -> RakNetPacket ``` ### Parameters This function has no parameters. ### Returns Returns `RakNetPacket`. ### Errors This function has no function-specific error conditions. ### Notes Packet hooks run on the network send path. Keep callbacks short and avoid yielding from them. ### Example ```luau raknet.add_send_hook(function(packet) packet:Block() -- expected: RakNetPacket end) ``` ## `RakNetPacket.SetData` ### Description RakNetPacket.SetData replaces the packet payload and returns the packet. ### Syntax ```luau RakNetPacket.SetData(data: buffer | string | {integer}) -> RakNetPacket ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `data` | `buffer | string | {integer}` | Input bytes. Luau strings may contain zero bytes. | ### Returns Returns `RakNetPacket`. ### Errors Raises an argument error when `data` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Packet hooks run on the network send path. Keep callbacks short and avoid yielding from them. ### Example ```luau raknet.add_send_hook(function(packet) packet:SetData("replacement") -- expected: RakNetPacket end) ``` ## `RakNetPacket` properties | Member | Type | Access | Description | | --- | --- | --- | --- | | `AsBuffer` | `buffer` | Read-only | Packet bytes as a Luau buffer. | | `AsString` | `string` | Read-only | Packet bytes as a string. | | `AsArray` | `{integer}` | Read-only | Packet bytes as an integer array. | | `PacketId` | `integer` | Read-only | First packet byte, or zero for an empty packet. | | `Priority` | `integer` | Read-only | RakNet priority. | | `Reliability` | `integer` | Read-only | RakNet reliability mode. | | `OrderingChannel` | `integer` | Read-only | RakNet ordering channel. | | `Size` | `integer` | Read-only | Payload size in bytes. | --- # Reflection # Reflection Functions for hidden properties, scriptability, callbacks, events, ownership, and thread identity. ## Function index | Function | Summary | | --- | --- | | [`getcallbackthread`](#getcallbackthread) | getcallbackthread gets the thread assigned to an object callback property. | | [`getcallbackvalue`](#getcallbackvalue) | getcallbackvalue gets the value assigned to an object callback property. | | [`geteventmember`](#geteventmember) | geteventmember returns an unrestricted signal for an Instance event. | | [`gethiddenproperties`](#gethiddenproperties) | gethiddenproperties returns all non-scriptable readable properties on an Instance. | | [`gethiddenproperty`](#gethiddenproperty) | gethiddenproperty gets the value of a hidden property. | | [`getproperties`](#getproperties) | getproperties returns all scriptable readable properties on an Instance. | | [`getthreadidentity`](#getthreadidentity) | getthreadidentity returns the current thread identity. | | [`isnetworkowner`](#isnetworkowner) | isnetworkowner returns whether the local client owns a BasePart's simulation. | | [`isscriptable`](#isscriptable) | isscriptable returns whether a property is scriptable. | | [`sethiddenproperty`](#sethiddenproperty) | sethiddenproperty sets the value of a hidden property. | | [`setscriptable`](#setscriptable) | setscriptable changes a property's scriptable flag and returns its previous value. | | [`setsimulationradius`](#setsimulationradius) | setsimulationradius sets the local player's simulation radius. | | [`setthreadidentity`](#setthreadidentity) | setthreadidentity changes the current thread identity. | ## `getcallbackthread` ### Description getcallbackthread gets the thread assigned to an object callback property. ### Syntax ```luau getcallbackthread(instance: Instance, property: string) -> thread? ``` ### Aliases `get_callback_thread` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `instance` | `Instance` | Instance used by the operation. | | `property` | `string` | Case-sensitive property or callback name. | ### Returns Returns `thread` when available; otherwise returns nil. ### Errors Raises an argument error when `instance` or `property` have an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Property and event names are case-sensitive and must exist on the supplied Instance. ### Example ```luau local result = getcallbackthread(workspace, "sample") print(result) -- expected: thread? ``` ## `getcallbackvalue` ### Description getcallbackvalue gets the value assigned to an object callback property. ### Syntax ```luau getcallbackvalue(instance: Instance, property: string, return_raw?: boolean) -> any ``` ### Aliases `get_callback_value`, `getcallbackmember`, `get_callback_member`, `getcallbackfunction`, `get_callback_function` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `instance` | `Instance` | Instance used by the operation. | | `property` | `string` | Case-sensitive property or callback name. | | `return_raw` | `boolean?` | When true, returns the stored callback value without callable filtering. | ### Returns Returns `any`. ### Errors Raises an argument error when `instance` or `property` have an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Property and event names are case-sensitive and must exist on the supplied Instance. ### Example ```luau local result = getcallbackvalue(workspace, "sample") print(result) -- expected: any ``` ## `geteventmember` ### Description geteventmember returns an unrestricted signal for an Instance event. ### Syntax ```luau geteventmember(instance: Instance, event_name: string) -> ScriptSignal ``` ### Aliases `get_event_member` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `instance` | `Instance` | Instance used by the operation. | | `event_name` | `string` | Case-sensitive event member name. | ### Returns Returns `ScriptSignal`. ### Errors Raises an argument error when `instance` or `event_name` have an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Property and event names are case-sensitive and must exist on the supplied Instance. ### Example ```luau local result = geteventmember(workspace, "sample") print(result) -- expected: ScriptSignal ``` ## `gethiddenproperties` ### Description gethiddenproperties returns all non-scriptable readable properties on an Instance. ### Syntax ```luau gethiddenproperties(instance: Instance) -> table ``` ### Aliases `get_hidden_properties` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `instance` | `Instance` | Instance used by the operation. | ### Returns Returns `table`. ### Errors Raises an argument error when `instance` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Property and event names are case-sensitive and must exist on the supplied Instance. ### Example ```luau local result = gethiddenproperties(workspace) print(result) -- expected: table ``` ## `gethiddenproperty` ### Description gethiddenproperty gets the value of a hidden property. ### Syntax ```luau gethiddenproperty(instance: Instance, property: string) -> (any, boolean) ``` ### Aliases `get_hidden_property` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `instance` | `Instance` | Instance used by the operation. | | `property` | `string` | Case-sensitive property or callback name. | ### Returns Returns `(any, boolean)`. ### Errors Raises an argument error when `instance` or `property` have an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Property and event names are case-sensitive and must exist on the supplied Instance. ### Example ```luau local result = gethiddenproperty(workspace, "sample") print(result) -- expected: (any, boolean) ``` ## `getproperties` ### Description getproperties returns all scriptable readable properties on an Instance. ### Syntax ```luau getproperties(instance: Instance) -> table ``` ### Aliases `get_properties` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `instance` | `Instance` | Instance used by the operation. | ### Returns Returns `table`. ### Errors Raises an argument error when `instance` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Property and event names are case-sensitive and must exist on the supplied Instance. ### Example ```luau local result = getproperties(workspace) print(result) -- expected: table ``` ## `getthreadidentity` ### Description getthreadidentity returns the current thread identity. ### Syntax ```luau getthreadidentity() -> integer ``` ### Aliases `getthreadcontext`, `getidentity`, `get_thread_identity`, `get_thread_context`, `get_identity` ### Parameters This function has no parameters. ### Returns Returns `integer`. ### Errors This function has no function-specific error conditions. ### Notes Property and event names are case-sensitive and must exist on the supplied Instance. ### Example ```luau local result = getthreadidentity() print(result) -- expected: integer ``` ## `isnetworkowner` ### Description isnetworkowner returns whether the local client owns a BasePart's simulation. ### Syntax ```luau isnetworkowner(part: BasePart) -> boolean ``` ### Aliases `is_network_owner` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `part` | `BasePart` | BasePart used by the hidden-property helper. | ### Returns Returns true when the local client owns a BasePart's simulation, otherwise false. ### Errors Raises an argument error when `part` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Property and event names are case-sensitive and must exist on the supplied Instance. ### Example ```luau local result = isnetworkowner(workspace:FindFirstChildWhichIsA("BasePart", true)) print(result) -- expected: boolean ``` ## `isscriptable` ### Description isscriptable returns whether a property is scriptable. ### Syntax ```luau isscriptable(instance: Instance, property: string) -> boolean ``` ### Aliases `is_scriptable` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `instance` | `Instance` | Instance used by the operation. | | `property` | `string` | Case-sensitive property or callback name. | ### Returns Returns true when a property is scriptable, otherwise false. ### Errors Raises an argument error when `instance` or `property` have an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Property and event names are case-sensitive and must exist on the supplied Instance. ### Example ```luau local result = isscriptable(workspace, "sample") print(result) -- expected: boolean ``` ## `sethiddenproperty` ### Description sethiddenproperty sets the value of a hidden property. ### Syntax ```luau sethiddenproperty(instance: Instance, property: string, value: any) -> boolean ``` ### Aliases `set_hidden_property` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `instance` | `Instance` | Instance used by the operation. | | `property` | `string` | Case-sensitive property or callback name. | | `value` | `any` | Value read, written, displayed, or passed to the operation. | ### Returns Returns true when the operation succeeds or its condition is met; otherwise false. ### Errors Raises an argument error when `instance` or `property` or `value` have an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Property and event names are case-sensitive and must exist on the supplied Instance. ### Example ```luau local result = sethiddenproperty(workspace, "sample", "sample") print(result) -- expected: boolean ``` ## `setscriptable` ### Description setscriptable changes a property's scriptable flag and returns its previous value. ### Syntax ```luau setscriptable(instance: Instance, property: string, scriptable: boolean) -> boolean ``` ### Aliases `set_scriptable` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `instance` | `Instance` | Instance used by the operation. | | `property` | `string` | Case-sensitive property or callback name. | | `scriptable` | `boolean` | New scriptable state for the property. | ### Returns Returns true when the operation succeeds or its condition is met; otherwise false. ### Errors Raises an argument error when `instance` or `property` or `scriptable` have an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Property and event names are case-sensitive and must exist on the supplied Instance. ### Example ```luau local result = setscriptable(workspace, "sample", true) print(result) -- expected: boolean ``` ## `setsimulationradius` ### Description setsimulationradius sets the local player's simulation radius. ### Syntax ```luau setsimulationradius(radius: number, maximum?: number) -> () ``` ### Aliases `set_simulation_radius` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `radius` | `number` | Circle radius in screen pixels. | | `maximum` | `number?` | Upper bound or maximum radius. | ### Returns This function does not return a value. ### Errors Raises an argument error when `radius` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Property and event names are case-sensitive and must exist on the supplied Instance. ### Example ```luau setsimulationradius(1.0) -- expected: the operation completes without returning a value ``` ## `setthreadidentity` ### Description setthreadidentity changes the current thread identity. ### Syntax ```luau setthreadidentity(identity: integer) -> () ``` ### Aliases `setthreadcontext`, `setidentity`, `set_thread_identity`, `set_thread_context`, `set_identity` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `identity` | `integer` | Thread security identity. | ### Returns This function does not return a value. ### Errors Raises an argument error when `identity` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Property and event names are case-sensitive and must exist on the supplied Instance. ### Example ```luau setthreadidentity(1) -- expected: the operation completes without returning a value ``` --- # Regex # Regex Regex construction, matching, captures, and replacement. ## Function index | Function | Summary | | --- | --- | | [`Regex.Escape`](#regex-escape) | Regex.Escape escapes text for use in a regular expression. | | [`Regex.Match`](#regex-match) | Regex.Match returns the first match or nil. | | [`Regex.MatchMany`](#regex-matchmany) | Regex.MatchMany returns every match in the input string. | | [`Regex.new`](#regex-new) | Regex.new creates a Regex object. | | [`Regex.Replace`](#regex-replace) | Regex.Replace replaces the first match. | ## `Regex.Escape` ### Description Regex.Escape escapes text for use in a regular expression. ### Syntax ```luau Regex.Escape(contents: string) -> string ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `contents` | `string` | Bytes written or appended to the file. | ### Returns Returns `string`. ### Errors Raises an argument error when `contents` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Patterns use the regular-expression syntax accepted by the bundled regex engine. ### Example ```luau local result = Regex.Escape("sample") print(result) -- expected: string ``` ## `Regex.Match` ### Description Regex.Match returns the first match or nil. ### Syntax ```luau Regex.Match(contents: string) -> Match? ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `contents` | `string` | Bytes written or appended to the file. | ### Returns Returns `Match` when available; otherwise returns nil. ### Errors Raises an argument error when `contents` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Patterns use the regular-expression syntax accepted by the bundled regex engine. ### Example ```luau local regex = Regex.new("\\d+") local match = regex:Match("value 42") print(match and match.Captures[1]) -- expected: Match? ``` ## `Regex.MatchMany` ### Description Regex.MatchMany returns every match in the input string. ### Syntax ```luau Regex.MatchMany(contents: string) -> {Match} ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `contents` | `string` | Bytes written or appended to the file. | ### Returns Returns an array of `Match` values. The array is empty when no values match. ### Errors Raises an argument error when `contents` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Patterns use the regular-expression syntax accepted by the bundled regex engine. ### Example ```luau local regex = Regex.new("\\d+") for _, match in regex:MatchMany("1 2 3") do print(match.Captures[1]) -- expected: {Match} end ``` ## `Regex.new` ### Description Regex.new creates a Regex object. ### Syntax ```luau Regex.new(pattern: string) -> Regex ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `pattern` | `string` | Regular-expression pattern compiled by Regex.new. | ### Returns Returns `Regex`. ### Errors Raises an argument error when `pattern` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Patterns use the regular-expression syntax accepted by the bundled regex engine. ### Example ```luau local result = Regex.new("sample") print(result) -- expected: Regex ``` ## `Regex.Replace` ### Description Regex.Replace replaces the first match. ### Syntax ```luau Regex.Replace(contents: string, replace_with: string) -> string ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `contents` | `string` | Bytes written or appended to the file. | | `replace_with` | `string` | Text inserted for the first regex match. | ### Returns Returns `string`. ### Errors Raises an argument error when `contents` or `replace_with` have an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Patterns use the regular-expression syntax accepted by the bundled regex engine. ### Example ```luau local regex = Regex.new("cat") print(regex:Replace("cat and cat", "dog")) -- expected: string ``` --- # Save Instance # Save instance Instance-tree serialization and save options. ## Function index | Function | Summary | | --- | --- | | [`saveinstance`](#saveinstance) | saveinstance saves one or more Instances to a file. | | [`SaveInstanceOptions.new`](#saveinstanceoptions-new) | SaveInstanceOptions.new creates a save-options object. | | [`saveplace`](#saveplace) | saveplace saves the current place to a file. | ## `saveinstance` ### Description saveinstance saves one or more Instances to a file. ### Syntax ```luau saveinstance(roots: Instance | {Instance}, options?: SaveInstanceOptions | table) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `roots` | `Instance | {Instance}` | Instance or array of Instances written as serialization roots. | | `options` | `SaveInstanceOptions | table?` | Options table controlling the operation. | ### Returns This function does not return a value. ### Errors Raises an argument error when `roots` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Saving can take time for large hierarchies. The destination stays inside the executor workspace. ### Example ```luau saveinstance(workspace) -- expected: the operation completes without returning a value ``` ## `SaveInstanceOptions.new` ### Description SaveInstanceOptions.new creates a save-options object. ### Syntax ```luau SaveInstanceOptions.new() -> SaveInstanceOptions ``` ### Parameters This function has no parameters. ### Returns Returns `SaveInstanceOptions`. ### Errors This function has no function-specific error conditions. ### Notes Saving can take time for large hierarchies. The destination stays inside the executor workspace. ### Example ```luau local result = SaveInstanceOptions.new() print(result) -- expected: SaveInstanceOptions ``` ## `saveplace` ### Description saveplace saves the current place to a file. ### Syntax ```luau saveplace(options?: SaveInstanceOptions | table) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `options` | `SaveInstanceOptions | table?` | Options table controlling the operation. | ### Returns This function does not return a value. ### Errors This function has no function-specific error conditions. ### Notes Saving can take time for large hierarchies. The destination stays inside the executor workspace. ### Example ```luau saveplace() -- expected: the operation completes without returning a value ``` ## `SaveInstanceOptions` properties `FilePath`, `IgnoreArchivable`, `SavePlayerCharacters`, `SavePlayers`, `DisableCompression`, `DecompileScripts`, `SaveNonCreatable`, `SaveNilInstances`, `CopyToClipboard`, `IgnoreList`, and `DecompilerOptions` control serialization. --- # Scripts # Scripts Functions for scripts, closures, bytecode, environments, and executor-thread checks. ## Function index | Function | Summary | | --- | --- | | [`checkcaller`](#checkcaller) | checkcaller returns whether the current thread is owned by the executor. | | [`decompile`](#decompile) | decompile decompiles Luau bytecode into source text. | | [`getcallingscript`](#getcallingscript) | getcallingscript returns the script associated with the current thread or nil. | | [`getrunningscripts`](#getrunningscripts) | getrunningscripts returns scripts that are currently running. | | [`getscriptbytecode`](#getscriptbytecode) | getscriptbytecode gets processed Luau bytecode for a script. | | [`getscriptclosure`](#getscriptclosure) | getscriptclosure returns the main function associated with script. | | [`getscriptfromthread`](#getscriptfromthread) | getscriptfromthread gets the script associated with a thread. | | [`getscripthash`](#getscripthash) | getscripthash gets a hash of a script's bytecode. | | [`getscriptthread`](#getscriptthread) | getscriptthread gets the live thread associated with a script. | | [`getsenv`](#getsenv) | getsenv gets a script's environment table. | | [`iscclosure`](#iscclosure) | iscclosure returns whether a function is a C closure. | | [`isexecutorthread`](#isexecutorthread) | isexecutorthread returns whether a thread was created by the executor. | | [`islclosure`](#islclosure) | islclosure returns whether a function is a Luau closure. | | [`loadstring`](#loadstring) | loadstring compiles source and returns a callable Luau closure. | | [`require`](#require) | require invokes the engine require after enabling mixed script contexts. | ## `checkcaller` ### Description checkcaller returns whether the current thread is owned by the executor. ### Syntax ```luau checkcaller() -> boolean ``` ### Aliases `check_caller` ### Parameters This function has no parameters. ### Returns Returns true when the current thread is owned by the executor, otherwise false. ### Errors This function has no function-specific error conditions. ### Notes A script may not have a live thread, environment, closure, or bytecode at the time of the call. ### Example ```luau local result = checkcaller() print(result) -- expected: boolean ``` ## `decompile` ### Description decompile decompiles Luau bytecode into source text. ### Syntax ```luau decompile(script: LuaSourceContainer) -> string ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `script` | `LuaSourceContainer` | LuaSourceContainer inspected by the operation. | ### Returns Returns `string`. ### Errors Raises an argument error when `script` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes A script may not have a live thread, environment, closure, or bytecode at the time of the call. ### Example ```luau local result = decompile(script) print(result) -- expected: string ``` ## `getcallingscript` ### Description getcallingscript returns the script associated with the current thread or nil. ### Syntax ```luau getcallingscript() -> LuaSourceContainer? ``` ### Aliases `get_calling_script` ### Parameters This function has no parameters. ### Returns Returns `LuaSourceContainer` when available; otherwise returns nil. ### Errors This function has no function-specific error conditions. ### Notes A script may not have a live thread, environment, closure, or bytecode at the time of the call. ### Example ```luau local result = getcallingscript() print(result) -- expected: LuaSourceContainer? ``` ## `getrunningscripts` ### Description getrunningscripts returns scripts that are currently running. ### Syntax ```luau getrunningscripts() -> {LuaSourceContainer} ``` ### Aliases `get_running_scripts` ### Parameters This function has no parameters. ### Returns Returns an array of `LuaSourceContainer` values. The array is empty when no values match. ### Errors This function has no function-specific error conditions. ### Notes A script may not have a live thread, environment, closure, or bytecode at the time of the call. ### Example ```luau local result = getrunningscripts() print(result) -- expected: {LuaSourceContainer} ``` ## `getscriptbytecode` ### Description getscriptbytecode gets processed Luau bytecode for a script. ### Syntax ```luau getscriptbytecode(script: LuaSourceContainer) -> string ``` ### Aliases `dumpstring`, `get_script_bytecode`, `dump_string` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `script` | `LuaSourceContainer` | LuaSourceContainer inspected by the operation. | ### Returns Returns `string`. ### Errors Raises an argument error when `script` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes A script may not have a live thread, environment, closure, or bytecode at the time of the call. ### Example ```luau local result = getscriptbytecode(script) print(result) -- expected: string ``` ## `getscriptclosure` ### Description getscriptclosure returns the main function associated with script. ### Syntax ```luau getscriptclosure(script: LuaSourceContainer) -> function? ``` ### Aliases `getscriptfunction`, `get_script_closure`, `get_script_function` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `script` | `LuaSourceContainer` | LuaSourceContainer inspected by the operation. | ### Returns Returns `function` when available; otherwise returns nil. ### Errors Raises an argument error when `script` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes A script may not have a live thread, environment, closure, or bytecode at the time of the call. ### Example ```luau local result = getscriptclosure(script) print(result) -- expected: function? ``` ## `getscriptfromthread` ### Description getscriptfromthread gets the script associated with a thread. ### Syntax ```luau getscriptfromthread(thread: thread) -> LuaSourceContainer? ``` ### Aliases `get_script_from_thread` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `thread` | `thread` | Luau thread inspected by the operation. | ### Returns Returns `LuaSourceContainer` when available; otherwise returns nil. ### Errors Raises an argument error when `thread` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes A script may not have a live thread, environment, closure, or bytecode at the time of the call. ### Example ```luau local result = getscriptfromthread(coroutine.running()) print(result) -- expected: LuaSourceContainer? ``` ## `getscripthash` ### Description getscripthash gets a hash of a script's bytecode. ### Syntax ```luau getscripthash(script: LuaSourceContainer) -> string ``` ### Aliases `get_script_hash` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `script` | `LuaSourceContainer` | LuaSourceContainer inspected by the operation. | ### Returns Returns `string`. ### Errors Raises an argument error when `script` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes A script may not have a live thread, environment, closure, or bytecode at the time of the call. ### Example ```luau local result = getscripthash(script) print(result) -- expected: string ``` ## `getscriptthread` ### Description getscriptthread gets the live thread associated with a script. ### Syntax ```luau getscriptthread(script: LuaSourceContainer) -> thread? ``` ### Aliases `get_script_thread` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `script` | `LuaSourceContainer` | LuaSourceContainer inspected by the operation. | ### Returns Returns `thread` when available; otherwise returns nil. ### Errors Raises an argument error when `script` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes A script may not have a live thread, environment, closure, or bytecode at the time of the call. ### Example ```luau local result = getscriptthread(script) print(result) -- expected: thread? ``` ## `getsenv` ### Description getsenv gets a script's environment table. ### Syntax ```luau getsenv(script: LuaSourceContainer) -> table? ``` ### Aliases `getmenv`, `get_senv` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `script` | `LuaSourceContainer` | LuaSourceContainer inspected by the operation. | ### Returns Returns `table` when available; otherwise returns nil. ### Errors Raises an argument error when `script` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes A script may not have a live thread, environment, closure, or bytecode at the time of the call. ### Example ```luau local result = getsenv(script) print(result) -- expected: table? ``` ## `iscclosure` ### Description iscclosure returns whether a function is a C closure. ### Syntax ```luau iscclosure(func: function) -> boolean ``` ### Aliases `is_c_closure` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `func` | `function` | Function inspected or called by the operation. | ### Returns Returns true when a function is a C closure, otherwise false. ### Errors Raises an argument error when `func` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes A script may not have a live thread, environment, closure, or bytecode at the time of the call. ### Example ```luau local result = iscclosure(function(...) print(...) end) print(result) -- expected: boolean ``` ## `isexecutorthread` ### Description isexecutorthread returns whether a thread was created by the executor. ### Syntax ```luau isexecutorthread(thread?: thread) -> boolean ``` ### Aliases `is_executor_thread` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `thread` | `thread?` | Luau thread inspected by the operation. | ### Returns Returns true when a thread was created by the executor, otherwise false. ### Errors This function has no function-specific error conditions. ### Notes A script may not have a live thread, environment, closure, or bytecode at the time of the call. ### Example ```luau local result = isexecutorthread() print(result) -- expected: boolean ``` ## `islclosure` ### Description islclosure returns whether a function is a Luau closure. ### Syntax ```luau islclosure(func: function) -> boolean ``` ### Aliases `is_l_closure` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `func` | `function` | Function inspected or called by the operation. | ### Returns Returns true when a function is a Luau closure, otherwise false. ### Errors Raises an argument error when `func` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes A script may not have a live thread, environment, closure, or bytecode at the time of the call. ### Example ```luau local result = islclosure(function(...) print(...) end) print(result) -- expected: boolean ``` ## `loadstring` ### Description loadstring compiles source and returns a callable Luau closure. Compilation failure returns nil and an error string instead of raising the compiler error. ### Syntax ```luau loadstring(source: string, chunk_name?: string) -> (function?, string?) ``` ### Aliases `load_string` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `source` | `string` | Luau source text compiled or scheduled by the operation. | | `chunk_name` | `string?` | Source name shown in compiler errors and tracebacks. | ### Returns Returns the compiled function and nil on success. Compilation or loading failure returns nil followed by an error string. ### Errors Raises an argument error when source or chunk_name has the wrong type. Syntax errors are returned as nil and an error string. ### Notes The returned closure is not executed automatically. ### Example ```luau local chunk, compileError = loadstring("return 6 * 7", "docs-example") assert(chunk, compileError) print(chunk()) -- expected: 42 ``` ## `require` ### Description require invokes the engine require after enabling mixed script contexts. ### Syntax ```luau require(module: ModuleScript) -> any ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `module` | `ModuleScript` | ModuleScript whose cached value is changed or read. | ### Returns Returns `any`. ### Errors Raises an argument error when `module` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes A script may not have a live thread, environment, closure, or bytecode at the time of the call. ### Example ```luau local result = require(game:GetService("ReplicatedStorage"):FindFirstChildWhichIsA("ModuleScript")) print(result) -- expected: any ``` --- # Signals # Signals Functions for enumerating, changing, hooking, firing, and replicating signal connections. ## Function index | Function | Summary | | --- | --- | | [`cansignalreplicate`](#cansignalreplicate) | cansignalreplicate checks if a signal can be replicated to the server. | | [`cfiresignal`](#cfiresignal) | cfiresignal fires every engine and script connection through the event descriptor. | | [`firesignal`](#firesignal) | firesignal fires a signal with the given arguments. | | [`getconnectionfunction`](#getconnectionfunction) | getconnectionfunction gets the value connected to a function connection. | | [`getconnections`](#getconnections) | getconnections gets all connections to a signal. | | [`getconnectionthread`](#getconnectionthread) | getconnectionthread gets the thread associated with a Luau connection. | | [`getsignalarguments`](#getsignalarguments) | getsignalarguments gets the argument types for a signal. | | [`getsignalargumentsinfo`](#getsignalargumentsinfo) | getsignalargumentsinfo gets detailed information about a signal's expected arguments. | | [`getsignalwhitelist`](#getsignalwhitelist) | getsignalwhitelist gets information about signals that support replication. | | [`hooksignal`](#hooksignal) | hooksignal intercepts the Lua connections belonging to a signal. | | [`isconnectionenabled`](#isconnectionenabled) | isconnectionenabled returns whether a connection is enabled. | | [`isgamescriptconnection`](#isgamescriptconnection) | isgamescriptconnection returns whether a connection was created by a game script. | | [`isluaconnection`](#isluaconnection) | isluaconnection returns whether a connection belongs to Luau. | | [`issignalhooked`](#issignalhooked) | issignalhooked returns whether a signal is currently intercepted. | | [`iswaitingconnection`](#iswaitingconnection) | iswaitingconnection returns whether a connection belongs to a waiting thread. | | [`replicatesignal`](#replicatesignal) | replicatesignal fires a signal with server replication. | | [`restoresignal`](#restoresignal) | restoresignal removes a signal interception by hooksignal. | | [`setconnectionenabled`](#setconnectionenabled) | setconnectionenabled enables or disables a connection. | ## `cansignalreplicate` ### Description cansignalreplicate checks if a signal can be replicated to the server. ### Syntax ```luau cansignalreplicate(signal: ScriptSignal) -> boolean ``` ### Aliases `can_signal_replicate` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `signal` | `ScriptSignal` | ScriptSignal inspected, fired, or hooked by the operation. | ### Returns Returns true when the operation succeeds or its condition is met; otherwise false. ### Errors Raises an argument error when `signal` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Signal argument types must match the engine event. Invalid values can be rejected before any connection runs. ### Example ```luau local result = cansignalreplicate(game:GetService("RunService").Heartbeat) print(result) -- expected: boolean ``` ## `cfiresignal` ### Description cfiresignal fires every engine and script connection through the event descriptor. ### Syntax ```luau cfiresignal(signal: ScriptSignal, ...: any) -> () ``` ### Aliases `c_fire_signal` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `signal` | `ScriptSignal` | ScriptSignal inspected, fired, or hooked by the operation. | | `...` | `any` | Values forwarded without changing their order or nil slots. | ### Returns This function does not return a value. ### Errors Raises an argument error when `signal` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Signal argument types must match the engine event. Invalid values can be rejected before any connection runs. ### Example ```luau cfiresignal(game:GetService("RunService").Heartbeat) -- expected: the operation completes without returning a value ``` ## `firesignal` ### Description firesignal fires a signal with the given arguments. ### Syntax ```luau firesignal(signal: ScriptSignal, ...: any) -> () ``` ### Aliases `fire_signal` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `signal` | `ScriptSignal` | ScriptSignal inspected, fired, or hooked by the operation. | | `...` | `any` | Values forwarded without changing their order or nil slots. | ### Returns This function does not return a value. ### Errors Raises an argument error when `signal` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Signal argument types must match the engine event. Invalid values can be rejected before any connection runs. ### Example ```luau firesignal(game:GetService("RunService").Heartbeat) -- expected: the operation completes without returning a value ``` ## `getconnectionfunction` ### Description getconnectionfunction gets the value connected to a function connection. ### Syntax ```luau getconnectionfunction(connection: ScriptConnection, return_raw?: boolean) -> function? ``` ### Aliases `get_connection_function` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `connection` | `ScriptConnection` | ScriptConnection returned by getconnections. | | `return_raw` | `boolean?` | When true, returns the stored callback value without callable filtering. | ### Returns Returns `function` when available; otherwise returns nil. ### Errors Raises an argument error when `connection` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Signal argument types must match the engine event. Invalid values can be rejected before any connection runs. ### Example ```luau local event = Instance.new("BindableEvent") local callback = function() end local native = event.Event:Connect(callback) local connection = getconnections(event.Event)[1] print(getconnectionfunction(connection) == callback) -- expected: function? native:Disconnect() event:Destroy() ``` ## `getconnections` ### Description getconnections gets all connections to a signal. ### Syntax ```luau getconnections(signal: ScriptSignal) -> {ScriptConnection} ``` ### Aliases `get_signal_cons`, `get_connections` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `signal` | `ScriptSignal` | ScriptSignal inspected, fired, or hooked by the operation. | ### Returns Returns an array of `ScriptConnection` values. The array is empty when no values match. ### Errors Raises an argument error when `signal` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Signal argument types must match the engine event. Invalid values can be rejected before any connection runs. ### Example ```luau local result = getconnections(game:GetService("RunService").Heartbeat) print(result) -- expected: {ScriptConnection} ``` ## `getconnectionthread` ### Description getconnectionthread gets the thread associated with a Luau connection. ### Syntax ```luau getconnectionthread(connection: ScriptConnection) -> thread ``` ### Aliases `get_connection_thread` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `connection` | `ScriptConnection` | ScriptConnection returned by getconnections. | ### Returns Returns `thread`. ### Errors Raises an argument error when `connection` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Signal argument types must match the engine event. Invalid values can be rejected before any connection runs. ### Example ```luau local event = Instance.new("BindableEvent") local native = event.Event:Connect(function() end) local connection = getconnections(event.Event)[1] print(getconnectionthread(connection)) -- expected: thread native:Disconnect() event:Destroy() ``` ## `getsignalarguments` ### Description getsignalarguments gets the argument types for a signal. ### Syntax ```luau getsignalarguments(signal: ScriptSignal) -> table ``` ### Aliases `get_signal_arguments` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `signal` | `ScriptSignal` | ScriptSignal inspected, fired, or hooked by the operation. | ### Returns Returns `table`. ### Errors Raises an argument error when `signal` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Signal argument types must match the engine event. Invalid values can be rejected before any connection runs. ### Example ```luau local result = getsignalarguments(game:GetService("RunService").Heartbeat) print(result) -- expected: table ``` ## `getsignalargumentsinfo` ### Description getsignalargumentsinfo gets detailed information about a signal's expected arguments. ### Syntax ```luau getsignalargumentsinfo(signal: ScriptSignal) -> table ``` ### Aliases `get_signal_arguments_info` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `signal` | `ScriptSignal` | ScriptSignal inspected, fired, or hooked by the operation. | ### Returns Returns `table`. ### Errors Raises an argument error when `signal` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Signal argument types must match the engine event. Invalid values can be rejected before any connection runs. ### Example ```luau local result = getsignalargumentsinfo(game:GetService("RunService").Heartbeat) print(result) -- expected: table ``` ## `getsignalwhitelist` ### Description getsignalwhitelist gets information about signals that support replication. ### Syntax ```luau getsignalwhitelist(signal: ScriptSignal) -> table ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `signal` | `ScriptSignal` | ScriptSignal inspected, fired, or hooked by the operation. | ### Returns Returns `table`. ### Errors Raises an argument error when `signal` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Signal argument types must match the engine event. Invalid values can be rejected before any connection runs. ### Example ```luau local result = getsignalwhitelist(game:GetService("RunService").Heartbeat) print(result) -- expected: table ``` ## `hooksignal` ### Description hooksignal intercepts the Lua connections belonging to a signal. ### Syntax ```luau hooksignal(signal: ScriptSignal, callback: function) -> () ``` ### Aliases `hook_signal` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `signal` | `ScriptSignal` | ScriptSignal inspected, fired, or hooked by the operation. | | `callback` | `function` | Function invoked when the event or hook runs. | ### Returns This function does not return a value. ### Errors Raises an argument error when `signal` or `callback` have an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Signal argument types must match the engine event. Invalid values can be rejected before any connection runs. ### Example ```luau hooksignal(game:GetService("RunService").Heartbeat, function(...) print(...) -- expected: the operation completes without returning a value end) ``` ## `isconnectionenabled` ### Description isconnectionenabled returns whether a connection is enabled. ### Syntax ```luau isconnectionenabled(connection: ScriptConnection) -> boolean ``` ### Aliases `is_connection_enabled` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `connection` | `ScriptConnection` | ScriptConnection returned by getconnections. | ### Returns Returns true when a connection is enabled, otherwise false. ### Errors Raises an argument error when `connection` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Signal argument types must match the engine event. Invalid values can be rejected before any connection runs. ### Example ```luau local event = Instance.new("BindableEvent") local native = event.Event:Connect(function() end) local connection = getconnections(event.Event)[1] print(isconnectionenabled(connection)) -- expected: boolean native:Disconnect() event:Destroy() ``` ## `isgamescriptconnection` ### Description isgamescriptconnection returns whether a connection was created by a game script. ### Syntax ```luau isgamescriptconnection(connection: ScriptConnection) -> boolean ``` ### Aliases `is_game_script_connection` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `connection` | `ScriptConnection` | ScriptConnection returned by getconnections. | ### Returns Returns true when a connection was created by a game script, otherwise false. ### Errors Raises an argument error when `connection` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Signal argument types must match the engine event. Invalid values can be rejected before any connection runs. ### Example ```luau local event = Instance.new("BindableEvent") local native = event.Event:Connect(function() end) local connection = getconnections(event.Event)[1] print(isgamescriptconnection(connection)) -- expected: boolean native:Disconnect() event:Destroy() ``` ## `isluaconnection` ### Description isluaconnection returns whether a connection belongs to Luau. ### Syntax ```luau isluaconnection(connection: ScriptConnection) -> boolean ``` ### Aliases `is_lua_connection` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `connection` | `ScriptConnection` | ScriptConnection returned by getconnections. | ### Returns Returns true when a connection belongs to Luau, otherwise false. ### Errors Raises an argument error when `connection` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Signal argument types must match the engine event. Invalid values can be rejected before any connection runs. ### Example ```luau local event = Instance.new("BindableEvent") local native = event.Event:Connect(function() end) local connection = getconnections(event.Event)[1] print(isluaconnection(connection)) -- expected: boolean native:Disconnect() event:Destroy() ``` ## `issignalhooked` ### Description issignalhooked returns whether a signal is currently intercepted. ### Syntax ```luau issignalhooked(signal: ScriptSignal) -> boolean ``` ### Aliases `is_signal_hooked` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `signal` | `ScriptSignal` | ScriptSignal inspected, fired, or hooked by the operation. | ### Returns Returns true when a signal is currently intercepted, otherwise false. ### Errors Raises an argument error when `signal` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Signal argument types must match the engine event. Invalid values can be rejected before any connection runs. ### Example ```luau local result = issignalhooked(game:GetService("RunService").Heartbeat) print(result) -- expected: boolean ``` ## `iswaitingconnection` ### Description iswaitingconnection returns whether a connection belongs to a waiting thread. ### Syntax ```luau iswaitingconnection(connection: ScriptConnection) -> boolean ``` ### Aliases `is_waiting_connection` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `connection` | `ScriptConnection` | ScriptConnection returned by getconnections. | ### Returns Returns true when a connection belongs to a waiting thread, otherwise false. ### Errors Raises an argument error when `connection` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Signal argument types must match the engine event. Invalid values can be rejected before any connection runs. ### Example ```luau local event = Instance.new("BindableEvent") task.spawn(function() event.Event:Wait() end) task.wait() for _, connection in getconnections(event.Event) do print(iswaitingconnection(connection)) -- expected: true for the waiting connection end event:Fire() event:Destroy() ``` ## `replicatesignal` ### Description replicatesignal fires a signal with server replication. ### Syntax ```luau replicatesignal(signal: ScriptSignal, ...: any) -> () ``` ### Aliases `replicate_signal` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `signal` | `ScriptSignal` | ScriptSignal inspected, fired, or hooked by the operation. | | `...` | `any` | Values forwarded without changing their order or nil slots. | ### Returns This function does not return a value. ### Errors Raises an argument error when `signal` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Signal argument types must match the engine event. Invalid values can be rejected before any connection runs. ### Example ```luau replicatesignal(game:GetService("RunService").Heartbeat) -- expected: the operation completes without returning a value ``` ## `restoresignal` ### Description restoresignal removes a signal interception by hooksignal. ### Syntax ```luau restoresignal(signal: ScriptSignal) -> () ``` ### Aliases `restore_signal` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `signal` | `ScriptSignal` | ScriptSignal inspected, fired, or hooked by the operation. | ### Returns This function does not return a value. ### Errors Raises an argument error when `signal` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Signal argument types must match the engine event. Invalid values can be rejected before any connection runs. ### Example ```luau restoresignal(game:GetService("RunService").Heartbeat) -- expected: the operation completes without returning a value ``` ## `setconnectionenabled` ### Description setconnectionenabled enables or disables a connection. ### Syntax ```luau setconnectionenabled(connection: ScriptConnection, enabled: boolean) -> () ``` ### Aliases `set_connection_enabled` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `connection` | `ScriptConnection` | ScriptConnection returned by getconnections. | | `enabled` | `boolean` | Whether the feature or connection should be enabled. | ### Returns This function does not return a value. ### Errors Raises an argument error when `connection` or `enabled` have an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Signal argument types must match the engine event. Invalid values can be rejected before any connection runs. ### Example ```luau local event = Instance.new("BindableEvent") local native = event.Event:Connect(function() end) local connection = getconnections(event.Event)[1] setconnectionenabled(connection, false) print(isconnectionenabled(connection)) -- expected: the operation completes without returning a value native:Disconnect() event:Destroy() ``` --- # Table And Metatable # Table and metatable Functions for raw metatables, read-only state, table protection, and namecall state. ## Function index | Function | Summary | | --- | --- | | [`getnamecallmethod`](#getnamecallmethod) | getnamecallmethod gets the method name being called in a __namecall hook. | | [`getrawmetatable`](#getrawmetatable) | getrawmetatable gets the raw metatable of an object, ignoring the __metatable metamethod. | | [`isprotected`](#isprotected) | isprotected returns whether a table or its metatable is protected from modification. | | [`isreadonly`](#isreadonly) | isreadonly returns a table's read-only flag. | | [`isuntouched`](#isuntouched) | isuntouched returns the untouched flag of a table or a function/thread environment. | | [`iswriteable`](#iswriteable) | iswriteable returns if a table is writable. | | [`makereadonly`](#makereadonly) | makereadonly makes a table read-only. | | [`makewritable`](#makewritable) | makewritable makes a table writable. | | [`setnamecallmethod`](#setnamecallmethod) | setnamecallmethod sets the method name for the current __namecall invocation. | | [`setrawmetatable`](#setrawmetatable) | setrawmetatable sets an object's metatable, ignoring the __metatable metamethod. | | [`setreadonly`](#setreadonly) | setreadonly sets a table's read-only flag. | | [`setuntouched`](#setuntouched) | setuntouched sets the untouched flag on a table or a function/thread environment. | ## `getnamecallmethod` ### Description getnamecallmethod gets the method name being called in a __namecall hook. ### Syntax ```luau getnamecallmethod() -> string ``` ### Aliases `get_namecall_method` ### Parameters This function has no parameters. ### Returns Returns `string`. ### Errors This function has no function-specific error conditions. ### Notes Changing table or metatable state affects later accesses immediately. Restore the prior state when the change is temporary. ### Example ```luau local result = getnamecallmethod() print(result) -- expected: string ``` ## `getrawmetatable` ### Description getrawmetatable gets the raw metatable of an object, ignoring the __metatable metamethod. ### Syntax ```luau getrawmetatable(value: any) -> table? ``` ### Aliases `get_raw_metatable` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `value` | `any` | Value read, written, displayed, or passed to the operation. | ### Returns Returns `table` when available; otherwise returns nil. ### Errors Raises an argument error when `value` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Changing table or metatable state affects later accesses immediately. Restore the prior state when the change is temporary. ### Example ```luau local result = getrawmetatable("sample") print(result) -- expected: table? ``` ## `isprotected` ### Description isprotected returns whether a table or its metatable is protected from modification. ### Syntax ```luau isprotected(value: table) -> boolean ``` ### Aliases `is_protected` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `value` | `table` | Value read, written, displayed, or passed to the operation. | ### Returns Returns true when a table or its metatable is protected from modification, otherwise false. ### Errors Raises an argument error when `value` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Changing table or metatable state affects later accesses immediately. Restore the prior state when the change is temporary. ### Example ```luau local result = isprotected({}) print(result) -- expected: boolean ``` ## `isreadonly` ### Description isreadonly returns a table's read-only flag. ### Syntax ```luau isreadonly(value: table) -> boolean ``` ### Aliases `is_read_only` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `value` | `table` | Value read, written, displayed, or passed to the operation. | ### Returns Returns true when the operation succeeds or its condition is met; otherwise false. ### Errors Raises an argument error when `value` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Changing table or metatable state affects later accesses immediately. Restore the prior state when the change is temporary. ### Example ```luau local result = isreadonly({}) print(result) -- expected: boolean ``` ## `isuntouched` ### Description isuntouched returns the untouched flag of a table or a function/thread environment. ### Syntax ```luau isuntouched(thread: thread) -> boolean ``` ### Aliases `is_un_touched` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `thread` | `thread` | Luau thread inspected by the operation. | ### Returns Returns true when the operation succeeds or its condition is met; otherwise false. ### Errors Raises an argument error when `thread` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Changing table or metatable state affects later accesses immediately. Restore the prior state when the change is temporary. ### Example ```luau local result = isuntouched(coroutine.running()) print(result) -- expected: boolean ``` ## `iswriteable` ### Description iswriteable returns if a table is writable. ### Syntax ```luau iswriteable(value: table) -> boolean ``` ### Aliases `iswritable`, `is_write_able` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `value` | `table` | Value read, written, displayed, or passed to the operation. | ### Returns Returns true when the operation succeeds or its condition is met; otherwise false. ### Errors Raises an argument error when `value` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Changing table or metatable state affects later accesses immediately. Restore the prior state when the change is temporary. ### Example ```luau local result = iswriteable({}) print(result) -- expected: boolean ``` ## `makereadonly` ### Description makereadonly makes a table read-only. ### Syntax ```luau makereadonly(value: table) -> () ``` ### Aliases `make_read_only` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `value` | `table` | Value read, written, displayed, or passed to the operation. | ### Returns This function does not return a value. ### Errors Raises an argument error when `value` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Changing table or metatable state affects later accesses immediately. Restore the prior state when the change is temporary. ### Example ```luau makereadonly({}) -- expected: the operation completes without returning a value ``` ## `makewritable` ### Description makewritable makes a table writable. ### Syntax ```luau makewritable(value: table) -> () ``` ### Aliases `makewriteable`, `make_write_able` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `value` | `table` | Value read, written, displayed, or passed to the operation. | ### Returns This function does not return a value. ### Errors Raises an argument error when `value` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Changing table or metatable state affects later accesses immediately. Restore the prior state when the change is temporary. ### Example ```luau makewritable({}) -- expected: the operation completes without returning a value ``` ## `setnamecallmethod` ### Description setnamecallmethod sets the method name for the current __namecall invocation. ### Syntax ```luau setnamecallmethod(method: string) -> () ``` ### Aliases `set_namecall_method` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `method` | `string` | Metamethod name, such as __index or __namecall. | ### Returns This function does not return a value. ### Errors Raises an argument error when `method` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Changing table or metatable state affects later accesses immediately. Restore the prior state when the change is temporary. ### Example ```luau setnamecallmethod("sample") -- expected: the operation completes without returning a value ``` ## `setrawmetatable` ### Description setrawmetatable sets an object's metatable, ignoring the __metatable metamethod. ### Syntax ```luau setrawmetatable(value: any, metatable: table) -> any ``` ### Aliases `set_raw_metatable` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `value` | `any` | Value read, written, displayed, or passed to the operation. | | `metatable` | `table` | Replacement metatable, or nil where removal is supported. | ### Returns Returns `any`. ### Errors Raises an argument error when `value` or `metatable` have an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Changing table or metatable state affects later accesses immediately. Restore the prior state when the change is temporary. ### Example ```luau local value = {} setrawmetatable(value, { __index = { Enabled = true } }) print(value.Enabled) -- expected: any ``` ## `setreadonly` ### Description setreadonly sets a table's read-only flag. ### Syntax ```luau setreadonly(value: table, readonly: boolean) -> () ``` ### Aliases `set_read_only` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `value` | `table` | Value read, written, displayed, or passed to the operation. | | `readonly` | `boolean` | Whether writes to the table are blocked. | ### Returns This function does not return a value. ### Errors Raises an argument error when `value` or `readonly` have an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Changing table or metatable state affects later accesses immediately. Restore the prior state when the change is temporary. ### Example ```luau setreadonly({}, true) -- expected: the operation completes without returning a value ``` ## `setuntouched` ### Description setuntouched sets the untouched flag on a table or a function/thread environment. ### Syntax ```luau setuntouched(thread: thread, untouched: boolean) -> () ``` ### Aliases `set_un_touched` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `thread` | `thread` | Luau thread inspected by the operation. | | `untouched` | `boolean` | Whether the value should be returned without applying conversion. | ### Returns This function does not return a value. ### Errors Raises an argument error when `thread` or `untouched` have an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Changing table or metatable state affects later accesses immediately. Restore the prior state when the change is temporary. ### Example ```luau setuntouched(coroutine.running(), true) -- expected: the operation completes without returning a value ``` --- # Time # Time Duration values, stopwatches, and repeating timers. ## Function index | Function | Summary | | --- | --- | | [`Duration.FromDays`](#duration-fromdays) | Duration.FromDays creates a duration from days. | | [`Duration.FromHours`](#duration-fromhours) | Duration.FromHours creates a duration from hours. | | [`Duration.FromMicroseconds`](#duration-frommicroseconds) | Duration.FromMicroseconds creates a duration from microseconds. | | [`Duration.FromMilliseconds`](#duration-frommilliseconds) | Duration.FromMilliseconds creates a duration from milliseconds. | | [`Duration.FromMinutes`](#duration-fromminutes) | Duration.FromMinutes creates a duration from minutes. | | [`Duration.FromMonths`](#duration-frommonths) | Duration.FromMonths creates a duration from months. | | [`Duration.FromNanoseconds`](#duration-fromnanoseconds) | Duration.FromNanoseconds creates a duration from nanoseconds. | | [`Duration.FromSeconds`](#duration-fromseconds) | Duration.FromSeconds creates a duration from seconds. | | [`Duration.FromYears`](#duration-fromyears) | Duration.FromYears creates a duration from years. | | [`Duration.TimeSinceEpoch`](#duration-timesinceepoch) | Duration.TimeSinceEpoch returns the time elapsed since the Unix epoch. | | [`Stopwatch.new`](#stopwatch-new) | Stopwatch.new creates a stopwatch. | | [`Stopwatch.Reset`](#stopwatch-reset) | Stopwatch.Reset resets the elapsed time. | | [`Stopwatch.Start`](#stopwatch-start) | Stopwatch.Start starts or resumes the stopwatch. | | [`Stopwatch.Stop`](#stopwatch-stop) | Stopwatch.Stop stops the stopwatch. | | [`Timer.new`](#timer-new) | Timer.new creates a timer. | ## `Duration.FromDays` ### Description Duration.FromDays creates a duration from days. ### Syntax ```luau Duration.FromDays(days: number) -> Duration ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `days` | `number` | Duration expressed in days. | ### Returns Returns `Duration`. ### Errors Raises an argument error when `days` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Duration values use nanoseconds internally. Unit conversions can lose precision for very large values. ### Example ```luau local result = Duration.FromDays(1.0) print(result) -- expected: Duration ``` ## `Duration.FromHours` ### Description Duration.FromHours creates a duration from hours. ### Syntax ```luau Duration.FromHours(hours: number) -> Duration ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `hours` | `number` | Duration expressed in hours. | ### Returns Returns `Duration`. ### Errors Raises an argument error when `hours` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Duration values use nanoseconds internally. Unit conversions can lose precision for very large values. ### Example ```luau local result = Duration.FromHours(1.0) print(result) -- expected: Duration ``` ## `Duration.FromMicroseconds` ### Description Duration.FromMicroseconds creates a duration from microseconds. ### Syntax ```luau Duration.FromMicroseconds(microseconds: number) -> Duration ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `microseconds` | `number` | Duration expressed in microseconds. | ### Returns Returns `Duration`. ### Errors Raises an argument error when `microseconds` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Duration values use nanoseconds internally. Unit conversions can lose precision for very large values. ### Example ```luau local result = Duration.FromMicroseconds(1.0) print(result) -- expected: Duration ``` ## `Duration.FromMilliseconds` ### Description Duration.FromMilliseconds creates a duration from milliseconds. ### Syntax ```luau Duration.FromMilliseconds(milliseconds: number) -> Duration ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `milliseconds` | `number` | Duration expressed in milliseconds. | ### Returns Returns `Duration`. ### Errors Raises an argument error when `milliseconds` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Duration values use nanoseconds internally. Unit conversions can lose precision for very large values. ### Example ```luau local result = Duration.FromMilliseconds(1.0) print(result) -- expected: Duration ``` ## `Duration.FromMinutes` ### Description Duration.FromMinutes creates a duration from minutes. ### Syntax ```luau Duration.FromMinutes(minutes: number) -> Duration ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `minutes` | `number` | Duration expressed in minutes. | ### Returns Returns `Duration`. ### Errors Raises an argument error when `minutes` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Duration values use nanoseconds internally. Unit conversions can lose precision for very large values. ### Example ```luau local result = Duration.FromMinutes(1.0) print(result) -- expected: Duration ``` ## `Duration.FromMonths` ### Description Duration.FromMonths creates a duration from months. ### Syntax ```luau Duration.FromMonths(months: number) -> Duration ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `months` | `number` | Duration expressed in 30-day months. | ### Returns Returns `Duration`. ### Errors Raises an argument error when `months` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Duration values use nanoseconds internally. Unit conversions can lose precision for very large values. ### Example ```luau local result = Duration.FromMonths(1.0) print(result) -- expected: Duration ``` ## `Duration.FromNanoseconds` ### Description Duration.FromNanoseconds creates a duration from nanoseconds. ### Syntax ```luau Duration.FromNanoseconds(nanoseconds: number) -> Duration ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `nanoseconds` | `number` | Duration expressed in nanoseconds. | ### Returns Returns `Duration`. ### Errors Raises an argument error when `nanoseconds` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Duration values use nanoseconds internally. Unit conversions can lose precision for very large values. ### Example ```luau local result = Duration.FromNanoseconds(1.0) print(result) -- expected: Duration ``` ## `Duration.FromSeconds` ### Description Duration.FromSeconds creates a duration from seconds. ### Syntax ```luau Duration.FromSeconds(seconds: number) -> Duration ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `seconds` | `number` | Duration expressed in seconds. | ### Returns Returns `Duration`. ### Errors Raises an argument error when `seconds` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Duration values use nanoseconds internally. Unit conversions can lose precision for very large values. ### Example ```luau local result = Duration.FromSeconds(1.0) print(result) -- expected: Duration ``` ## `Duration.FromYears` ### Description Duration.FromYears creates a duration from years. ### Syntax ```luau Duration.FromYears(years: number) -> Duration ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `years` | `number` | Duration expressed in 365-day years. | ### Returns Returns `Duration`. ### Errors Raises an argument error when `years` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Duration values use nanoseconds internally. Unit conversions can lose precision for very large values. ### Example ```luau local result = Duration.FromYears(1.0) print(result) -- expected: Duration ``` ## `Duration.TimeSinceEpoch` ### Description Duration.TimeSinceEpoch returns the time elapsed since the Unix epoch. ### Syntax ```luau Duration.TimeSinceEpoch() -> Duration ``` ### Parameters This function has no parameters. ### Returns Returns `Duration`. ### Errors This function has no function-specific error conditions. ### Notes Duration values use nanoseconds internally. Unit conversions can lose precision for very large values. ### Example ```luau local result = Duration.TimeSinceEpoch() print(result) -- expected: Duration ``` ## `Stopwatch.new` ### Description Stopwatch.new creates a stopwatch. ### Syntax ```luau Stopwatch.new() -> Stopwatch ``` ### Parameters This function has no parameters. ### Returns Returns `Stopwatch`. ### Errors This function has no function-specific error conditions. ### Notes Duration values use nanoseconds internally. Unit conversions can lose precision for very large values. ### Example ```luau local result = Stopwatch.new() print(result) -- expected: Stopwatch ``` ## `Stopwatch.Reset` ### Description Stopwatch.Reset resets the elapsed time. ### Syntax ```luau Stopwatch.Reset() -> () ``` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors This function has no function-specific error conditions. ### Notes Duration values use nanoseconds internally. Unit conversions can lose precision for very large values. ### Example ```luau local stopwatch = Stopwatch.new() stopwatch:Reset() -- expected: the operation completes without returning a value ``` ## `Stopwatch.Start` ### Description Stopwatch.Start starts or resumes the stopwatch. ### Syntax ```luau Stopwatch.Start() -> () ``` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors This function has no function-specific error conditions. ### Notes Duration values use nanoseconds internally. Unit conversions can lose precision for very large values. ### Example ```luau local stopwatch = Stopwatch.new() stopwatch:Start() -- expected: the operation completes without returning a value ``` ## `Stopwatch.Stop` ### Description Stopwatch.Stop stops the stopwatch. ### Syntax ```luau Stopwatch.Stop() -> () ``` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors This function has no function-specific error conditions. ### Notes Duration values use nanoseconds internally. Unit conversions can lose precision for very large values. ### Example ```luau local stopwatch = Stopwatch.new() stopwatch:Start() task.wait() stopwatch:Stop() -- expected: the operation completes without returning a value ``` ## `Timer.new` ### Description Timer.new creates a timer. ### Syntax ```luau Timer.new() -> Timer ``` ### Parameters This function has no parameters. ### Returns Returns `Timer`. ### Errors This function has no function-specific error conditions. ### Notes Duration values use nanoseconds internally. Unit conversions can lose precision for very large values. ### Example ```luau local result = Timer.new() print(result) -- expected: Timer ``` --- # Websocket # WebSocket WebSocket connections with message and close signals. ## Function index | Function | Summary | | --- | --- | | [`WebSocket.Close`](#websocket-close) | WebSocket.Close closes the connection. | | [`WebSocket.connect`](#websocket-connect) | WebSocket.connect opens a WebSocket connection to url and returns a WebSocket object with message and close events. | | [`WebSocket.Send`](#websocket-send) | WebSocket.Send sends a text message. | ## `WebSocket.Close` ### Description WebSocket.Close closes the connection. ### Syntax ```luau WebSocket.Close() -> () ``` ### Parameters This function has no parameters. ### Returns This function does not return a value. ### Errors This function has no function-specific error conditions. ### Notes Close sockets that are no longer used. Message and close events are delivered asynchronously. ### Example ```luau local socket = WebSocket.connect("wss://HOST") socket:Close() -- expected: the operation completes without returning a value ``` ## `WebSocket.connect` ### Description WebSocket.connect opens a WebSocket connection to url and returns a WebSocket object with message and close events. ### Syntax ```luau WebSocket.connect(url: string) -> WebSocket ``` ### Aliases `websocket.connect` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `url` | `string` | HTTP, HTTPS, WS, or WSS URL used by the operation. | ### Returns Returns `WebSocket`. ### Errors Raises an argument error when `url` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Close sockets that are no longer used. Message and close events are delivered asynchronously. ### Example ```luau local socket = WebSocket.connect("wss://HOST") print(socket.IsClosed) -- expected: WebSocket ``` ## `WebSocket.Send` ### Description WebSocket.Send sends a text message. ### Syntax ```luau WebSocket.Send(message: string) -> () ``` ### Parameters | Parameter | Type | Description | | --- | --- | --- | | `message` | `string` | Text payload sent through the socket. | ### Returns This function does not return a value. ### Errors Raises an argument error when `message` has an unsupported type or value. Errors from the underlying operation are propagated. ### Notes Close sockets that are no longer used. Message and close events are delivered asynchronously. ### Example ```luau local socket = WebSocket.connect("wss://HOST") socket:Send("hello") -- expected: the operation completes without returning a value ```