# Bloom Executor API Source: https://docs.bloomclient.net/ Bloom's public Lua API is available from the Executor with Isolated VM selected. ## Getting started ```lua if Bloom then print(Bloom.Version) end ``` The version appears in the executor output and F8 console. ## API sections - [Getting Started](https://docs.bloomclient.net/ai/getting-started.md): Confirm the Bloom API is ready in the executor. - [Runtime](https://docs.bloomclient.net/ai/utilities.md): Inspect the installed API, capabilities, and shared constants. - [Native Bridge](https://docs.bloomclient.net/ai/native-calls.md): Call supported RedM natives by name or hash. - [Hooks & Inspection](https://docs.bloomclient.net/ai/hooks.md): Wrap local references, inspect Lua functions, and control supported FiveM native calls. - [Drawing](https://docs.bloomclient.net/ai/drawing.md): Draw shapes, text, images, and clipped overlays. - [Input](https://docs.bloomclient.net/ai/input.md): Read mouse, keyboard, text-entry, and clipboard state. - [Events](https://docs.bloomclient.net/ai/events.md): Register local handlers and observe exact-name FiveM events. - [Resources & Files](https://docs.bloomclient.net/ai/resources.md): Run resource-scoped code and work with resource or local files. - [Tick Routines](https://docs.bloomclient.net/ai/tick-routines.md): Run one persistent callback from the isolated workspace. - [ESP](https://docs.bloomclient.net/ai/esp.md): Configure Bloom ESP visibility, measurements, and colors. Complete reference: https://docs.bloomclient.net/llms-full.txt --- # Getting Started Source: https://docs.bloomclient.net/?section=getting-started Confirm the Bloom API is ready in the executor. ## Using the Bloom API Source: https://docs.bloomclient.net/reference/getting-started/first-script Category: Getting Started Confirm the Bloom API is available before running a larger script. ### Syntax ```lua Bloom.Version → string ``` ### Behavior Run the snippet from the Executor workspace with Isolated VM selected. A version string confirms that Bloom is ready. ### Returns No value. The active Bloom API version appears in the executor output. ### Example ```lua if Bloom then print(Bloom.Version) end ``` ### Notes - Use Isolated VM for scripts that call Bloom.Draw, Bloom.Input, Bloom.Esp, or another Bloom API. - Syntax and runtime errors remain visible in the executor output and F8 console. ### Related APIs - https://docs.bloomclient.net/reference/utilities/version - https://docs.bloomclient.net/reference/utilities/api-list --- # Runtime Source: https://docs.bloomclient.net/?section=utilities Inspect the installed API, capabilities, and shared constants. ## Bloom.Version Source: https://docs.bloomclient.net/reference/utilities/version Category: Runtime Read the installed Bloom Lua API version. ### Syntax ```lua Bloom.Version → string ``` ### Behavior The value identifies the API surface loaded by the current executor build. ### Returns A version string for the active Bloom Lua API. ### Example ```lua print(Bloom.Version) ``` ### Notes - Include this value when reporting an API issue. ### Related APIs - https://docs.bloomclient.net/reference/getting-started/first-script - https://docs.bloomclient.net/reference/utilities/api-list --- ## Bloom.Api Source: https://docs.bloomclient.net/reference/utilities/api-list Category: Runtime List the top-level keys available on the Bloom table. ### Syntax ```lua Bloom.Api() → { string, ... } ``` ### Behavior The function reads the active Bloom table, sorts its keys, and returns their names. ### Returns A sorted array of top-level Bloom table keys. ### Example ```lua for _, name in ipairs(Bloom.Api()) do print(name) end ``` ### Notes - Nested methods remain under Bloom.Draw, Bloom.Input, and Bloom.Esp. ### Related APIs - https://docs.bloomclient.net/reference/utilities/version - https://docs.bloomclient.net/reference/utilities/capability-state --- ## Bloom capability state Source: https://docs.bloomclient.net/reference/utilities/capability-state Category: Runtime Check whether event and Cfx-dependent features are ready. ### Syntax ```lua Bloom.eventsReady / Bloom.cfxReady → boolean ``` ### Behavior Each flag reports whether its corresponding runtime support was installed in the current state. ### Returns Boolean capability flags. ### Example ```lua if Bloom.eventsReady and Bloom.cfxReady then print("Bloom capabilities ready") end ``` ### Notes - Bloom.eventsReady covers Bloom event helpers. - Bloom.cfxReady covers helpers that depend on the active Cfx runtime. ### Related APIs - https://docs.bloomclient.net/reference/events/add-event-handler - https://docs.bloomclient.net/reference/resources/list-resources --- ## Bloom.SchedulerActive Source: https://docs.bloomclient.net/reference/utilities/scheduler-active Category: Runtime Check whether the Bloom scheduler wrapper is active. ### Syntax ```lua Bloom.SchedulerActive → boolean ``` ### Behavior The flag is set after Bloom installs its scheduler support in the current state. ### Returns true when the scheduler wrapper is active; otherwise nil or false. ### Example ```lua if Bloom.SchedulerActive then print("Scheduler ready") end ``` ### Related APIs - https://docs.bloomclient.net/reference/tick-routines/set-tick-routine - https://docs.bloomclient.net/reference/tick-routines/clear-tick-routine --- ## Bloom return types Source: https://docs.bloomclient.net/reference/utilities/return-types Category: Runtime Select the expected result type for hash-based native calls. ### Syntax ```lua Bloom.VOID / INT / FLOAT / STRING / VECTOR / BOOL → number ``` ### Behavior Pass one of these constants as the first argument to Bloom.native or Bloom.InvokeNative. ### Returns A numeric return-type constant. ### Example ```lua local resultType = Bloom.INT print(resultType) ``` ### Related APIs - https://docs.bloomclient.net/reference/native-calls/native-hash - https://docs.bloomclient.net/reference/native-calls/invoke-native --- # Native Bridge Source: https://docs.bloomclient.net/?section=native-calls Call supported RedM natives by name or hash. ## Bloom.CallNative Source: https://docs.bloomclient.net/reference/native-calls/call-native Category: Native Bridge Resolve a supported native by its Cfx Lua name and call it. ### Syntax ```lua Bloom.CallNative(name, ...) → ... ``` ### Behavior Bloom resolves the named native, forwards the supplied arguments, and returns its result. ### Parameters - `name` (string): Uppercase Cfx Lua native name. - `...` (any): Arguments required by the native. ### Returns The values returned by the native. ### Example ```lua local result = Bloom.CallNative( "NATIVE_NAME", ... ) ``` ### Notes - Check the native contract before calling it. Argument and return types come from the game API. ### Related APIs - https://docs.bloomclient.net/reference/native-calls/has-native - https://docs.bloomclient.net/reference/native-calls/native-hash --- ## Bloom.HasNative Source: https://docs.bloomclient.net/reference/native-calls/has-native Category: Native Bridge Check whether a named native is available before calling it. ### Syntax ```lua Bloom.HasNative(name) → boolean ``` ### Behavior The check resolves the name without invoking the native. ### Parameters - `name` (string): Cfx Lua native name to resolve. ### Returns true when the name resolves to a callable native; otherwise false. ### Example ```lua if Bloom.HasNative("NATIVE_NAME") then local result = Bloom.CallNative("NATIVE_NAME", ...) end ``` ### Notes - Use this guard when a script may run across builds with different native coverage. ### Related APIs - https://docs.bloomclient.net/reference/native-calls/call-native - https://docs.bloomclient.net/reference/native-calls/native-hash --- ## Bloom.native Source: https://docs.bloomclient.net/reference/native-calls/native-hash Category: Native Bridge Call a native by hash with an explicit Bloom return type. ### Syntax ```lua Bloom.native(retType, hash, ...) → ... ``` ### Behavior Bloom invokes the hash and converts the result according to retType. ### Parameters - `retType` (constant): Bloom.VOID, INT, FLOAT, STRING, VECTOR, or BOOL. - `hash` (number): Native hash. - `...` (any): Arguments required by the native. ### Returns A value matching retType, or no value for Bloom.VOID. ### Example ```lua local result = Bloom.native( Bloom.INT, nativeHash, ... ) ``` ### Notes - Use the correct return type and argument list for the selected hash. ### Related APIs - https://docs.bloomclient.net/reference/native-calls/invoke-native - https://docs.bloomclient.net/reference/utilities/return-types --- ## Bloom.InvokeNative Source: https://docs.bloomclient.net/reference/native-calls/invoke-native Category: Native Bridge Call the same hash-based native bridge exposed by Bloom.native. ### Syntax ```lua Bloom.InvokeNative(retType, hash, ...) → ... ``` ### Behavior Bloom.InvokeNative is an explicit alias of Bloom.native. ### Parameters - `retType` (constant): Expected Bloom return type. - `hash` (number): Native hash. - `...` (any): Arguments required by the native. ### Returns The same result as Bloom.native. ### Example ```lua local result = Bloom.InvokeNative( Bloom.BOOL, nativeHash, ... ) ``` ### Related APIs - https://docs.bloomclient.net/reference/native-calls/native-hash - https://docs.bloomclient.net/reference/utilities/return-types --- # Hooks & Inspection Source: https://docs.bloomclient.net/?section=hooks Wrap local references, inspect Lua functions, and control supported FiveM native calls. ## Bloom.HookFunction Source: https://docs.bloomclient.net/reference/hooks/hook-function Category: Hooks & Inspection Replace references to a Lua function and keep its original value. ### Syntax ```lua Bloom.HookFunction(target, replacement) → original | nil ``` ### Behavior Bloom finds matching Lua references in the current state and swaps them to replacement. ### Parameters - `target` (function | string): Function value or global function name to replace. - `replacement` (function): Function installed in matching references. ### Returns The original function when a matching reference is replaced; otherwise nil. ### Example ```lua local original original = Bloom.HookFunction("FormatName", function(value) return original(value):upper() end) ``` ### Notes - The replacement is limited to functions reachable in the current isolated executor state; it does not change another resource's Lua state. - Keep the returned function when the replacement needs to call the original behavior. ### Related APIs - https://docs.bloomclient.net/reference/hooks/hook-native - https://docs.bloomclient.net/reference/hooks/get-upvalue --- ## Bloom.HookNative Source: https://docs.bloomclient.net/reference/hooks/hook-native Category: Hooks & Inspection Wrap a named native for later calls from the isolated state. ### Syntax ```lua Bloom.HookNative(name, wrapper) → original ``` ### Behavior Later isolated-state calls to the named native pass through wrapper. ### Parameters - `name` (string): Bound native name. - `wrapper` (function): Function that receives the original callable followed by its arguments. ### Returns The original native wrapper. ### Example ```lua Bloom.HookNative("NATIVE_NAME", function(original, ...) print("native called") return original(...) end) ``` ### Notes - The wrapper affects only the current isolated executor state. It does not intercept calls from other resources, V8 or Mono scripts, or the game engine. - Bloom uses separate internal native-handler hooks for selected FiveM features; this Lua callback is not an engine-wide hook. ### Related APIs - https://docs.bloomclient.net/reference/hooks/hook-function - https://docs.bloomclient.net/reference/hooks/native-hooks-install - https://docs.bloomclient.net/reference/native-calls/has-native --- ## Bloom.NativeHooks.Install Source: https://docs.bloomclient.net/reference/hooks/native-hooks-install Category: Hooks & Inspection Install a FiveM rule on a validated cached GTA native handler. ### Syntax ```lua Bloom.NativeHooks.Install(spec) → handle | nil, reason ``` ### Behavior Observe calls the original and counts invocations. Replace calls the original once, then writes a fixed typed scalar value to its result. ### Parameters - `spec` (table): Exact GTA native name, cached-handler scope, observe or replace mode, and optional arg0 match. ### Returns A hook handle, or nil and a reason when validation or installation fails. ### Example ```lua local hook, reason = Bloom.NativeHooks.Install({ native = "GetEntityHealth", scope = "cached-handler", mode = "observe", }) if not hook then error(reason) end ``` ### Notes - FiveM only. The rule applies to calls reaching the cached GTA handler, regardless of calling resource. There is no resource filter or Lua callback. - Lua and V8 can reach this handler. Mono may bypass it. Cfx-added natives and game-engine calls are outside this contract. - scope must be cached-handler. native must be an exact GTA catalog name; numeric hashes are rejected. - Replace supports boolean and finite 32-bit float returns. Signed 32-bit replacement is limited to the vetted Absi and GetEntityHealth natives. - Boolean replacement writes a native 0 or 1. FiveM generic Cfx Lua calls can present nonzero as integer 1; use not not value when Lua boolean coercion is needed. - The game-timer native is reserved for Bloom diagnostics and rejects installation. Other catalog entries with an ambiguous integer result shape are also rejected. - Pointer, out-parameter, string, vector, and void results are unsupported. - arg0, when given, matches the first argument exactly as a nonnegative integer. It cannot be used for a native with no arguments and is not a resource selector. - Unknown options and unsupported native shapes are rejected. The registry has fixed capacity and will not claim a native already owned by another Bloom hook. ### Related APIs - https://docs.bloomclient.net/reference/hooks/native-hooks-status - https://docs.bloomclient.net/reference/hooks/native-hooks-remove - https://docs.bloomclient.net/reference/hooks/hook-native --- ## Bloom.NativeHooks.Status Source: https://docs.bloomclient.net/reference/hooks/native-hooks-status Category: Hooks & Inspection Inspect a FiveM cached-handler rule and its call counters. ### Syntax ```lua Bloom.NativeHooks.Status(handle) → state | nil, reason ``` ### Behavior Reads the current rule state and counters without changing its behavior. ### Parameters - `handle` (number): Handle returned by Bloom.NativeHooks.Install. ### Returns A table with handle, active, installed, native, mode, scope, calls, replacements, and optional arg0; otherwise nil and a reason. ### Example ```lua local state, reason = Bloom.NativeHooks.Status(hook) if state then print(state.native, state.calls, state.active) end ``` ### Notes - The handle remains valid across executor script runs until removed or Bloom shuts down. - Counters describe only calls that reached this cached GTA handler. Mono coverage is not guaranteed. ### Related APIs - https://docs.bloomclient.net/reference/hooks/native-hooks-install - https://docs.bloomclient.net/reference/hooks/native-hooks-remove --- ## Bloom.NativeHooks.Remove Source: https://docs.bloomclient.net/reference/hooks/native-hooks-remove Category: Hooks & Inspection Remove a FiveM cached-handler rule and verify restoration. ### Syntax ```lua Bloom.NativeHooks.Remove(handle) → true | nil, reason ``` ### Behavior Restores the saved handler pointer and verifies the result before reporting success. ### Parameters - `handle` (number): Handle returned by Bloom.NativeHooks.Install. ### Returns true after verified removal, or nil and a reason when removal fails. ### Example ```lua local ok, reason = Bloom.NativeHooks.Remove(hook) if not ok then error(reason) end ``` ### Notes - An invalid handle returns nil and a reason. ### Related APIs - https://docs.bloomclient.net/reference/hooks/native-hooks-install - https://docs.bloomclient.net/reference/hooks/native-hooks-status --- ## Bloom.CfxCalls.Observe Source: https://docs.bloomclient.net/reference/hooks/cfx-calls-observe Category: Hooks & Inspection Observe a named Cfx native call made through Bloom on FiveM. ### Syntax ```lua Bloom.CfxCalls.Observe(name, callback) → handle | nil, reason ``` ### Behavior The callback runs later on Bloom's isolated Lua thread. Its return value cannot change the native result. ### Parameters - `name` (string | integer): Catalogued Cfx name, unambiguous uppercase alias, or catalogued integer hash. - `callback` (function): Receives a copied call snapshot after the native completes. ### Returns A numeric handle, or nil and a reason if registration fails. ### Example ```lua local handle = Bloom.CfxCalls.Observe("GetNumResources", function(call) print(call.name, call.results[1].value) end) print(Bloom.CallNative("GetNumResources")) -- Later, after the deferred callback: Bloom.CfxCalls.Remove(handle) ``` ### Notes - Only calls through Bloom's named Cfx resolver are observed. Calls from other resources, V8, Mono, or direct raw native dispatch are outside this route. - Bloom.CfxCalls.List() returns sorted handle, name, and executor scope snapshots plus a cumulative dropped-call count. - Bloom.CfxCalls.Remove(handle) returns true once for an active handle. Removing it suppresses callbacks that have not started. - The isolated executor allows at most 16 observers, with at most 4 per native and 32 queued calls. ### Related APIs - https://docs.bloomclient.net/reference/hooks/cfx-calls-transform-result - https://docs.bloomclient.net/reference/hooks/hook-native --- ## Bloom.CfxCalls.TransformResult Source: https://docs.bloomclient.net/reference/hooks/cfx-calls-transform-result Category: Hooks & Inspection Transform one scalar result returned to a Bloom Cfx native caller on FiveM. ### Syntax ```lua Bloom.CfxCalls.TransformResult(name, callback) → handle | nil, reason ``` ### Behavior The real Cfx native runs first. Bloom.CfxCalls.Replace(value) changes one compatible Lua result returned through Bloom's named resolver; nil keeps the original result. ### Parameters - `name` (string | integer): Catalogued Cfx name, unambiguous uppercase alias, or catalogued integer hash. - `callback` (function): Receives the original completed call snapshot and returns nil or a Replace marker. ### Returns A numeric handle, or nil and a reason if the native or registration is unsupported. ### Example ```lua local handle = Bloom.CfxCalls.TransformResult("GetNumResources", function(call) return Bloom.CfxCalls.Replace(42) end) print(Bloom.CallNative("GetNumResources")) Bloom.CfxCalls.RemoveTransform(handle) ``` ### Notes - The change is visible only to the Bloom caller. Other resources, direct raw native dispatch, V8, and Mono do not use this resolver. - Object, vector, output-pointer, and multiple-result signatures cannot be transformed. Callback errors, yields, and invalid replacements leave the original result intact. - At most one transform may be active for each native and 16 may be active in total. Bloom.CfxCalls.ListTransforms() lists them; RemoveTransform(handle) returns true once. - This is a named executor result transform, not a process-wide Cfx Hook V2 callback or pointer-output override. ### Related APIs - https://docs.bloomclient.net/reference/hooks/cfx-calls-observe - https://docs.bloomclient.net/reference/hooks/native-hooks-install --- ## Bloom.GetUpvalue Source: https://docs.bloomclient.net/reference/hooks/get-upvalue Category: Hooks & Inspection Read one upvalue from a Lua function. ### Syntax ```lua Bloom.GetUpvalue(fn, index) → name, value ``` ### Behavior The result follows the Lua 5.4 upvalue inspection contract. ### Parameters - `fn` (function): Lua function to inspect. - `index` (number): One-based upvalue index. ### Returns The upvalue name and value, or nil when the index is invalid. ### Example ```lua local value = 42 local function readValue() return value end local name, current = Bloom.GetUpvalue(readValue, 1) print(name, current) ``` ### Related APIs - https://docs.bloomclient.net/reference/hooks/set-upvalue - https://docs.bloomclient.net/reference/hooks/get-info --- ## Bloom.SetUpvalue Source: https://docs.bloomclient.net/reference/hooks/set-upvalue Category: Hooks & Inspection Replace one upvalue on a Lua function. ### Syntax ```lua Bloom.SetUpvalue(fn, index, value) → name | nil ``` ### Behavior The selected upvalue is replaced immediately in the current Lua state. ### Parameters - `fn` (function): Lua function to update. - `index` (number): One-based upvalue index. - `value` (any): Replacement value. ### Returns The updated upvalue name, or nil when the index is invalid. ### Example ```lua local value = 10 local function readValue() return value end Bloom.SetUpvalue(readValue, 1, 25) print(readValue()) ``` ### Related APIs - https://docs.bloomclient.net/reference/hooks/get-upvalue - https://docs.bloomclient.net/reference/hooks/hook-function --- ## Bloom.GetLocal Source: https://docs.bloomclient.net/reference/hooks/get-local Category: Hooks & Inspection Read a local variable from an active Lua stack frame. ### Syntax ```lua Bloom.GetLocal(level, index) → name, value ``` ### Behavior Bloom reads the selected local from an active stack frame. ### Parameters - `level` (number): Stack level to inspect. - `index` (number): Local variable index. ### Returns The local variable name and value, or nil when unavailable. ### Example ```lua local function inspect() local score = 42 local name, value = Bloom.GetLocal(1, 1) print(name, value) end inspect() ``` ### Related APIs - https://docs.bloomclient.net/reference/hooks/set-local - https://docs.bloomclient.net/reference/hooks/get-info --- ## Bloom.SetLocal Source: https://docs.bloomclient.net/reference/hooks/set-local Category: Hooks & Inspection Replace a local variable in an active Lua stack frame. ### Syntax ```lua Bloom.SetLocal(level, index, value) → name | nil ``` ### Behavior Bloom replaces the selected local while its stack frame is active. ### Parameters - `level` (number): Stack level to update. - `index` (number): Local variable index. - `value` (any): Replacement value. ### Returns The updated local name, or nil when unavailable. ### Example ```lua local function update() local score = 10 Bloom.SetLocal(1, 1, 25) print(score) end update() ``` ### Related APIs - https://docs.bloomclient.net/reference/hooks/get-local - https://docs.bloomclient.net/reference/hooks/get-info --- ## Bloom.GetInfo Source: https://docs.bloomclient.net/reference/hooks/get-info Category: Hooks & Inspection Read Lua function or stack-frame metadata. ### Syntax ```lua Bloom.GetInfo(fnOrLevel, what?) → table | nil ``` ### Behavior The result follows the Lua 5.4 function information contract. ### Parameters - `fnOrLevel` (function | number): Function value or stack level to inspect. - `what` (string?): Lua information selector. ### Returns A metadata table, or nil when the target is unavailable. ### Example ```lua local info = Bloom.GetInfo(Bloom.Api, "nS") if info then print(info.what, info.source) end ``` ### Related APIs - https://docs.bloomclient.net/reference/hooks/get-upvalue - https://docs.bloomclient.net/reference/hooks/get-local --- # Drawing Source: https://docs.bloomclient.net/?section=drawing Draw shapes, text, images, and clipped overlays. ## Bloom.Draw.Rect Source: https://docs.bloomclient.net/reference/drawing/rect Category: Drawing Draw the outline of a rounded rectangle. ### Syntax ```lua Bloom.Draw.Rect(x, y, w, h, r, g, b, a, rounding?, thickness?, flags?, priority?) ``` ### Behavior The rectangle outline is queued for the current frame. ### Parameters - `x, y, w, h` (number): Position and size in screen pixels. - `r, g, b, a` (number): Outline color channels from 0 to 255. - `rounding` (number?): Corner radius. - `thickness` (number?): Outline width. - `flags` (constant?): Bloom.Draw.RoundCorners* mask. - `priority` (number?): Layer order. Higher values draw later. ### Returns No value. ### Example ```lua Bloom.Draw.Rect(40, 40, 260, 90, 239, 128, 180, 255, 8, 1, Bloom.Draw.RoundCornersAll, 1) ``` ### Notes - Use Bloom.Draw.RoundCornersAll for every corner or combine individual corner constants. ### Related APIs - https://docs.bloomclient.net/reference/drawing/rect-filled - https://docs.bloomclient.net/reference/drawing/rect-multi-color --- ## Bloom.Draw.RectFilled Source: https://docs.bloomclient.net/reference/drawing/rect-filled Category: Drawing Draw a filled rectangle with optional rounded corners. ### Syntax ```lua Bloom.Draw.RectFilled(x, y, w, h, r, g, b, a, rounding?, flags?, priority?) ``` ### Behavior The filled rectangle is queued for the current frame. ### Parameters - `x, y, w, h` (number): Position and size in screen pixels. - `r, g, b, a` (number): Fill color channels from 0 to 255. - `rounding` (number?): Corner radius. - `flags` (constant?): Bloom.Draw.RoundCorners* mask. - `priority` (number?): Layer order. ### Returns No value. ### Example ```lua Bloom.Draw.RectFilled(40, 40, 260, 90, 22, 16, 25, 230, 8, Bloom.Draw.RoundCornersAll, 0) ``` ### Related APIs - https://docs.bloomclient.net/reference/drawing/rect - https://docs.bloomclient.net/reference/drawing/rect-multi-color --- ## Bloom.Draw.RectMultiColor Source: https://docs.bloomclient.net/reference/drawing/rect-multi-color Category: Drawing Draw a rectangle with a separate color at each corner. ### Syntax ```lua Bloom.Draw.RectMultiColor(x, y, w, h, tl, tr, br, bl, priority?) ``` ### Behavior Bloom interpolates the four corner colors across the rectangle. ### Parameters - `x, y, w, h` (number): Position and size in screen pixels. - `tl, tr, br, bl` (four RGBA groups): Colors for top-left, top-right, bottom-right, and bottom-left. - `priority` (number?): Layer order. ### Returns No value. ### Example ```lua Bloom.Draw.RectMultiColor(40, 40, 260, 90, 239,128,180,220, 154,74,130,220, 44,25,48,220, 90,42,78,220, 0) ``` ### Related APIs - https://docs.bloomclient.net/reference/drawing/rect-filled - https://docs.bloomclient.net/reference/drawing/color --- ## Bloom.Draw.Line Source: https://docs.bloomclient.net/reference/drawing/line Category: Drawing Draw a line between two screen positions. ### Syntax ```lua Bloom.Draw.Line(x1, y1, x2, y2, r, g, b, a, thickness?, priority?) ``` ### Behavior The line is queued for the current frame. ### Parameters - `x1, y1, x2, y2` (number): Start and end positions in pixels. - `r, g, b, a` (number): Line color. - `thickness` (number?): Line width. - `priority` (number?): Layer order. ### Returns No value. ### Example ```lua Bloom.Draw.Line(40, 40, 240, 40, 239, 128, 180, 255, 2, 1) ``` ### Related APIs - https://docs.bloomclient.net/reference/drawing/triangle - https://docs.bloomclient.net/reference/drawing/circle --- ## Bloom.Draw.Circle Source: https://docs.bloomclient.net/reference/drawing/circle Category: Drawing Draw the outline of a circle. ### Syntax ```lua Bloom.Draw.Circle(cx, cy, radius, r, g, b, a, segments?, thickness?, priority?) ``` ### Behavior The circle outline is queued for the current frame. ### Parameters - `cx, cy` (number): Circle center in pixels. - `radius` (number): Circle radius in pixels. - `r, g, b, a` (number): Outline color. - `segments` (number?): Segment count. Use 0 for automatic detail. - `thickness` (number?): Outline width. - `priority` (number?): Layer order. ### Returns No value. ### Example ```lua Bloom.Draw.Circle(320, 180, 28, 239, 128, 180, 255, 0, 2, 1) ``` ### Related APIs - https://docs.bloomclient.net/reference/drawing/circle-filled - https://docs.bloomclient.net/reference/drawing/line --- ## Bloom.Draw.CircleFilled Source: https://docs.bloomclient.net/reference/drawing/circle-filled Category: Drawing Draw a filled circle. ### Syntax ```lua Bloom.Draw.CircleFilled(cx, cy, radius, r, g, b, a, segments?, priority?) ``` ### Behavior The filled circle is queued for the current frame. ### Parameters - `cx, cy` (number): Circle center in pixels. - `radius` (number): Circle radius in pixels. - `r, g, b, a` (number): Fill color. - `segments` (number?): Segment count. Use 0 for automatic detail. - `priority` (number?): Layer order. ### Returns No value. ### Example ```lua Bloom.Draw.CircleFilled(320, 180, 28, 239, 128, 180, 220, 0, 0) ``` ### Related APIs - https://docs.bloomclient.net/reference/drawing/circle - https://docs.bloomclient.net/reference/drawing/triangle-filled --- ## Bloom.Draw.Triangle Source: https://docs.bloomclient.net/reference/drawing/triangle Category: Drawing Draw the outline of a triangle. ### Syntax ```lua Bloom.Draw.Triangle(x1, y1, x2, y2, x3, y3, r, g, b, a, thickness?, priority?) ``` ### Behavior The triangle outline is queued for the current frame. ### Parameters - `x1, y1, x2, y2, x3, y3` (number): Three screen-space vertices. - `r, g, b, a` (number): Outline color. - `thickness` (number?): Outline width. - `priority` (number?): Layer order. ### Returns No value. ### Example ```lua Bloom.Draw.Triangle(100, 80, 140, 140, 60, 140, 239, 128, 180, 255, 2, 1) ``` ### Related APIs - https://docs.bloomclient.net/reference/drawing/triangle-filled - https://docs.bloomclient.net/reference/drawing/line --- ## Bloom.Draw.TriangleFilled Source: https://docs.bloomclient.net/reference/drawing/triangle-filled Category: Drawing Draw a filled triangle. ### Syntax ```lua Bloom.Draw.TriangleFilled(x1, y1, x2, y2, x3, y3, r, g, b, a, priority?) ``` ### Behavior The filled triangle is queued for the current frame. ### Parameters - `x1, y1, x2, y2, x3, y3` (number): Three screen-space vertices. - `r, g, b, a` (number): Fill color. - `priority` (number?): Layer order. ### Returns No value. ### Example ```lua Bloom.Draw.TriangleFilled(100, 80, 140, 140, 60, 140, 239, 128, 180, 220, 0) ``` ### Related APIs - https://docs.bloomclient.net/reference/drawing/triangle - https://docs.bloomclient.net/reference/drawing/circle-filled --- ## Bloom.Draw.Text Source: https://docs.bloomclient.net/reference/drawing/text Category: Drawing Draw text with the default or currently pushed font. ### Syntax ```lua Bloom.Draw.Text(x, y, text, size?, r?, g?, b?, a?, priority?) ``` ### Behavior Text is queued with the font pushed for the same priority, or the default font when no custom font is active. ### Parameters - `x, y` (number): Top-left text position in pixels. - `text` (any): Value converted to text. - `size` (number?): Font size. Use nil or 0 for the native size. - `r, g, b, a` (number?): Text color. Channels default to 255. - `priority` (number?): Layer order and font-stack group. ### Returns No value. ### Example ```lua Bloom.Draw.Text(48, 48, "Bloom", 22, 255, 255, 255, 255, 1) ``` ### Related APIs - https://docs.bloomclient.net/reference/drawing/load-font - https://docs.bloomclient.net/reference/drawing/font-object --- ## Bloom.Draw.ScreenSize Source: https://docs.bloomclient.net/reference/drawing/screen-size Category: Drawing Read the current drawing surface dimensions. ### Syntax ```lua Bloom.Draw.ScreenSize() → width, height ``` ### Behavior Bloom returns the dimensions captured by the renderer for the active frame. ### Returns The current width and height in pixels. ### Example ```lua local width, height = Bloom.Draw.ScreenSize() print(width, height) ``` ### Related APIs - https://docs.bloomclient.net/reference/drawing/text - https://docs.bloomclient.net/reference/input/mouse-pos --- ## Bloom.Draw.PushClip Source: https://docs.bloomclient.net/reference/drawing/push-clip Category: Drawing Begin clipping later draw calls to a rectangle. ### Syntax ```lua Bloom.Draw.PushClip(x, y, w, h, priority?) ``` ### Behavior Later commands in the same priority group are clipped until Bloom.Draw.PopClip is called. ### Parameters - `x, y, w, h` (number): Clip rectangle in pixels. - `priority` (number?): Priority stack to update. ### Returns No value. ### Example ```lua Bloom.Draw.PushClip(40, 40, 260, 180, 0) Bloom.Draw.Text(48, 48, "Clipped", 18) Bloom.Draw.PopClip(0) ``` ### Notes - Balance every push with a pop in the same priority group. ### Related APIs - https://docs.bloomclient.net/reference/drawing/pop-clip - https://docs.bloomclient.net/reference/drawing/rect --- ## Bloom.Draw.PopClip Source: https://docs.bloomclient.net/reference/drawing/pop-clip Category: Drawing End the current clipping rectangle. ### Syntax ```lua Bloom.Draw.PopClip(priority?) ``` ### Behavior The most recent clip rectangle in the selected priority group is removed. ### Parameters - `priority` (number?): Priority stack to update. ### Returns No value. ### Example ```lua Bloom.Draw.PushClip(40, 40, 260, 180, 0) Bloom.Draw.Text(48, 48, "Clipped", 18) Bloom.Draw.PopClip(0) ``` ### Related APIs - https://docs.bloomclient.net/reference/drawing/push-clip - https://docs.bloomclient.net/reference/drawing/rect --- ## Bloom.Draw.SetMouseDraw Source: https://docs.bloomclient.net/reference/drawing/set-mouse-draw Category: Drawing Show or hide the software mouse cursor for the next frame. ### Syntax ```lua Bloom.Draw.SetMouseDraw(enabled) ``` ### Behavior The renderer applies the requested software-cursor state on the next frame. ### Parameters - `enabled` (boolean): true enables the setting; false disables it. ### Returns No value. ### Example ```lua Bloom.Draw.SetMouseDraw(true) ``` ### Related APIs - https://docs.bloomclient.net/reference/input/mouse-pos - https://docs.bloomclient.net/reference/input/is-mouse-pressed --- ## Bloom.Draw.Color Source: https://docs.bloomclient.net/reference/drawing/color Category: Drawing Create a named RGBA color table for your own helpers. ### Syntax ```lua Bloom.Draw.Color(r, g, b, a?) → { r, g, b, a } ``` ### Behavior The helper stores the supplied channels and defaults alpha to 255. ### Parameters - `r, g, b` (number): Red, green, and blue channels from 0 to 255. - `a` (number?): Alpha from 0 to 255. Defaults to 255. ### Returns A table with r, g, b, and a fields. ### Example ```lua local rose = Bloom.Draw.Color(239, 128, 180) print(rose.r, rose.a) ``` ### Notes - Drawing calls accept numeric channels directly. This table is useful for your own palettes. ### Related APIs - https://docs.bloomclient.net/reference/drawing/rect-filled - https://docs.bloomclient.net/reference/drawing/rect-multi-color --- ## Bloom.Draw.LoadFont Source: https://docs.bloomclient.net/reference/drawing/load-font Category: Drawing Register a TTF or OTF font from its raw bytes. ### Syntax ```lua Bloom.Draw.LoadFont(bytes, size, iconMin?, iconMax?) → font ``` ### Behavior The font is registered and becomes available after the font atlas is rebuilt. ### Parameters - `bytes` (string): Raw font file bytes. - `size` (number): Requested font size. - `iconMin, iconMax` (number?): Optional icon glyph range. ### Returns A Bloom font object. ### Example ```lua local font = Bloom.Draw.LoadFont(fontBytes, 18) print(font:IsLoaded()) ``` ### Notes - IsLoaded may remain false for one frame after registration. ### Related APIs - https://docs.bloomclient.net/reference/drawing/font-object - https://docs.bloomclient.net/reference/drawing/text --- ## Bloom.Draw font object Source: https://docs.bloomclient.net/reference/drawing/font-object Category: Drawing Measure, draw, and activate a font returned by Bloom.Draw.LoadFont. ### Syntax ```lua font:IsLoaded() / Draw(...) / GetSize(...) / Push(...) / Pop(...) ``` ### Behavior IsLoaded reports readiness; Draw uses the font directly; GetSize measures text; Push and Pop select it for Bloom.Draw.Text at one priority. ### Returns Each method returns its documented status or measurement. Draw, Push, and Pop return no value. ### Example ```lua local font = Bloom.Draw.LoadFont(fontBytes, 18) if font:IsLoaded() then local w, h = font:GetSize("Bloom") font:Draw(48, 48, "Bloom", 18, 255, 255, 255, 255, 1) end ``` ### Notes - font:GetSizePx is an alias of font:GetSize. - Pair font:Push(priority) with font:Pop(priority). ### Related APIs - https://docs.bloomclient.net/reference/drawing/load-font - https://docs.bloomclient.net/reference/drawing/text --- ## Bloom.Draw.LoadImage Source: https://docs.bloomclient.net/reference/drawing/load-image Category: Drawing Register an image from encoded bytes or a Bloom image filename. ### Syntax ```lua Bloom.Draw.LoadImage(bytesOrName) → image ``` ### Behavior The image begins loading and reports its state through the returned object. ### Parameters - `bytesOrName` (string): Encoded image bytes or a filename in the Bloom Images folder. ### Returns A Bloom image object. ### Example ```lua local image = Bloom.Draw.LoadImage("logo.png") print(image:State()) ``` ### Notes - PNG, JPG, BMP, TGA, and WEBP data are supported by the loader. ### Related APIs - https://docs.bloomclient.net/reference/drawing/image-object - https://docs.bloomclient.net/reference/drawing/image --- ## Bloom.Draw image object Source: https://docs.bloomclient.net/reference/drawing/image-object Category: Drawing Inspect, draw, and release an image returned by Bloom.Draw.LoadImage. ### Syntax ```lua image:State() / IsLoaded() / GetSize() / Draw(...) / DrawUV(...) / Unload(...) ``` ### Behavior State reports pending, loaded, failed, or unloaded. Draw methods queue the image; Unload releases it. ### Returns Each method returns its documented state, size, or unload result. Draw methods return no value. ### Example ```lua local image = Bloom.Draw.LoadImage("logo.png") if image:IsLoaded() then local w, h = image:GetSize() image:Draw(40, 40, w, h) end ``` ### Notes - image:Free is an alias of image:Unload. ### Related APIs - https://docs.bloomclient.net/reference/drawing/load-image - https://docs.bloomclient.net/reference/drawing/image-uv --- ## Bloom.Draw.Image Source: https://docs.bloomclient.net/reference/drawing/image Category: Drawing Draw a loaded image with optional size and tint. ### Syntax ```lua Bloom.Draw.Image(imageOrId, x, y, w?, h?, r?, g?, b?, a?, priority?) ``` ### Behavior The image is queued with full UV coverage. ### Parameters - `imageOrId` (image | number): Bloom image object or image identifier. - `x, y` (number): Top-left position. - `w, h` (number?): Draw size. Omit both for the natural size. - `r, g, b, a` (number?): Tint channels. - `priority` (number?): Layer order. ### Returns No value. ### Example ```lua local image = Bloom.Draw.LoadImage("logo.png") Bloom.Draw.Image(image, 40, 40, 96, 96, 255, 255, 255, 255, 1) ``` ### Related APIs - https://docs.bloomclient.net/reference/drawing/load-image - https://docs.bloomclient.net/reference/drawing/image-uv --- ## Bloom.Draw.ImageUV Source: https://docs.bloomclient.net/reference/drawing/image-uv Category: Drawing Draw a selected UV region from a loaded image. ### Syntax ```lua Bloom.Draw.ImageUV(imageOrId, x, y, w, h, u0, v0, u1, v1, r?, g?, b?, a?, priority?) ``` ### Behavior Only the selected normalized region is queued for drawing. ### Parameters - `imageOrId` (image | number): Bloom image object or image identifier. - `x, y, w, h` (number): Destination rectangle. - `u0, v0, u1, v1` (number): Normalized UV rectangle. - `r, g, b, a` (number?): Tint channels. - `priority` (number?): Layer order. ### Returns No value. ### Example ```lua Bloom.Draw.ImageUV(image, 40, 40, 96, 96, 0, 0, 0.5, 0.5, 255, 255, 255, 255, 1) ``` ### Related APIs - https://docs.bloomclient.net/reference/drawing/image - https://docs.bloomclient.net/reference/drawing/image-object --- ## Bloom.Draw.ImageSize Source: https://docs.bloomclient.net/reference/drawing/image-size Category: Drawing Read the natural dimensions of a loaded image. ### Syntax ```lua Bloom.Draw.ImageSize(imageOrId) → width, height ``` ### Behavior Bloom reads the dimensions currently known by the image loader. ### Parameters - `imageOrId` (image | number): Bloom image object or image identifier. ### Returns The image width and height, or 0, 0 when unavailable. ### Example ```lua local width, height = Bloom.Draw.ImageSize(image) print(width, height) ``` ### Related APIs - https://docs.bloomclient.net/reference/drawing/load-image - https://docs.bloomclient.net/reference/drawing/image --- ## Bloom.Draw.UnloadImage Source: https://docs.bloomclient.net/reference/drawing/unload-image Category: Drawing Release a loaded image. ### Syntax ```lua Bloom.Draw.UnloadImage(imageOrId, force?) → boolean ``` ### Behavior Bloom removes the image from the loader and renderer. ### Parameters - `imageOrId` (image | number): Bloom image object or image identifier. - `force` (boolean?): Force release when supported. ### Returns true when the unload request succeeds; otherwise false. ### Example ```lua local released = Bloom.Draw.UnloadImage(image) print(released) ``` ### Related APIs - https://docs.bloomclient.net/reference/drawing/load-image - https://docs.bloomclient.net/reference/drawing/image-object --- # Input Source: https://docs.bloomclient.net/?section=input Read mouse, keyboard, text-entry, and clipboard state. ## Bloom.Input.MousePos Source: https://docs.bloomclient.net/reference/input/mouse-pos Category: Input Read the current client-relative mouse position. ### Syntax ```lua Bloom.Input.MousePos() → x, y ``` ### Behavior The coordinates come from Bloom input state for the current frame. ### Returns The mouse x and y position in pixels. ### Example ```lua local x, y = Bloom.Input.MousePos() print(x, y) ``` ### Related APIs - https://docs.bloomclient.net/reference/input/point-in-rect - https://docs.bloomclient.net/reference/drawing/screen-size --- ## Bloom.Input.IsMouseDown Source: https://docs.bloomclient.net/reference/input/is-mouse-down Category: Input Check whether a mouse button is currently held. ### Syntax ```lua Bloom.Input.IsMouseDown(button) → boolean ``` ### Behavior The result reflects the current frame state. ### Parameters - `button` (number): Mouse button number or Bloom.Input.Mouse* constant. ### Returns true while the button is held. ### Example ```lua if Bloom.Input.IsMouseDown(Bloom.Input.MouseLeft) then print("held") end ``` ### Related APIs - https://docs.bloomclient.net/reference/input/is-mouse-pressed - https://docs.bloomclient.net/reference/input/constants --- ## Bloom.Input.IsMousePressed Source: https://docs.bloomclient.net/reference/input/is-mouse-pressed Category: Input Detect the frame a mouse button becomes pressed. ### Syntax ```lua Bloom.Input.IsMousePressed(button) → boolean ``` ### Behavior The edge fires once when the button changes from up to down. ### Parameters - `button` (number): Mouse button number or Bloom.Input.Mouse* constant. ### Returns true only on the press edge. ### Example ```lua if Bloom.Input.IsMousePressed(Bloom.Input.MouseLeft) then print("clicked") end ``` ### Related APIs - https://docs.bloomclient.net/reference/input/is-mouse-down - https://docs.bloomclient.net/reference/input/is-mouse-released --- ## Bloom.Input.IsMouseReleased Source: https://docs.bloomclient.net/reference/input/is-mouse-released Category: Input Detect the frame a mouse button is released. ### Syntax ```lua Bloom.Input.IsMouseReleased(button) → boolean ``` ### Behavior The edge fires once when the button changes from down to up. ### Parameters - `button` (number): Mouse button number or Bloom.Input.Mouse* constant. ### Returns true only on the release edge. ### Example ```lua if Bloom.Input.IsMouseReleased(Bloom.Input.MouseLeft) then print("released") end ``` ### Related APIs - https://docs.bloomclient.net/reference/input/is-mouse-pressed - https://docs.bloomclient.net/reference/input/constants --- ## Bloom.Input.IsKeyDown Source: https://docs.bloomclient.net/reference/input/is-key-down Category: Input Check whether a virtual key is currently held. ### Syntax ```lua Bloom.Input.IsKeyDown(vk) → boolean ``` ### Behavior The result reflects the current frame state. ### Parameters - `vk` (number): Windows virtual-key code or Bloom.Input.VK_* constant. ### Returns true while the key is held. ### Example ```lua if Bloom.Input.IsKeyDown(Bloom.Input.VK_CONTROL) then print("control held") end ``` ### Related APIs - https://docs.bloomclient.net/reference/input/is-key-pressed - https://docs.bloomclient.net/reference/input/constants --- ## Bloom.Input.IsKeyPressed Source: https://docs.bloomclient.net/reference/input/is-key-pressed Category: Input Detect the frame a virtual key becomes pressed. ### Syntax ```lua Bloom.Input.IsKeyPressed(vk) → boolean ``` ### Behavior The edge fires once when the key changes from up to down. ### Parameters - `vk` (number): Windows virtual-key code or Bloom.Input.VK_* constant. ### Returns true only on the press edge. ### Example ```lua if Bloom.Input.IsKeyPressed(Bloom.Input.VK_F6) then print("pressed") end ``` ### Related APIs - https://docs.bloomclient.net/reference/input/is-key-down - https://docs.bloomclient.net/reference/input/is-key-released --- ## Bloom.Input.IsKeyReleased Source: https://docs.bloomclient.net/reference/input/is-key-released Category: Input Detect the frame a virtual key is released. ### Syntax ```lua Bloom.Input.IsKeyReleased(vk) → boolean ``` ### Behavior The edge fires once when the key changes from down to up. ### Parameters - `vk` (number): Windows virtual-key code or Bloom.Input.VK_* constant. ### Returns true only on the release edge. ### Example ```lua if Bloom.Input.IsKeyReleased(Bloom.Input.VK_F6) then print("released") end ``` ### Related APIs - https://docs.bloomclient.net/reference/input/is-key-pressed - https://docs.bloomclient.net/reference/input/constants --- ## Bloom.Input.PointInRect Source: https://docs.bloomclient.net/reference/input/point-in-rect Category: Input Check whether a point falls inside a rectangle. ### Syntax ```lua Bloom.Input.PointInRect(px, py, x, y, w, h) → boolean ``` ### Behavior The left and top edges are included; the right and bottom edges are excluded. ### Parameters - `px, py` (number): Point to test. - `x, y, w, h` (number): Rectangle position and size. ### Returns true when the point is inside the rectangle. ### Example ```lua local mx, my = Bloom.Input.MousePos() local hovered = Bloom.Input.PointInRect(mx, my, 40, 40, 220, 44) ``` ### Related APIs - https://docs.bloomclient.net/reference/input/mouse-pos - https://docs.bloomclient.net/reference/input/is-mouse-pressed --- ## Bloom.Input.BeginTextInput Source: https://docs.bloomclient.net/reference/input/begin-text-input Category: Input Start a fresh text-input session. ### Syntax ```lua Bloom.Input.BeginTextInput() → success, reason? ``` ### Behavior Bloom arms text collection and clears stale queued input. ### Returns true on success; otherwise false and a reason string. ### Example ```lua local ok, reason = Bloom.Input.BeginTextInput() if not ok then print(reason) end ``` ### Notes - Calling it again resets the current text-input queue. ### Related APIs - https://docs.bloomclient.net/reference/input/read-text-input - https://docs.bloomclient.net/reference/input/end-text-input --- ## Bloom.Input.ReadTextInput Source: https://docs.bloomclient.net/reference/input/read-text-input Category: Input Drain characters and control keys collected for the active text session. ### Syntax ```lua Bloom.Input.ReadTextInput() → { text, keys } ``` ### Behavior The call returns all queued input and clears the queue. ### Returns A table containing a UTF-8 text string and an array of virtual-key codes. ### Example ```lua local input = Bloom.Input.ReadTextInput() if input.text ~= "" then print(input.text) end for _, vk in ipairs(input.keys) do print(vk) end ``` ### Notes - When nothing is queued, text is an empty string and keys is an empty array. ### Related APIs - https://docs.bloomclient.net/reference/input/begin-text-input - https://docs.bloomclient.net/reference/input/constants --- ## Bloom.Input.EndTextInput Source: https://docs.bloomclient.net/reference/input/end-text-input Category: Input Stop text collection and clear the input queue. ### Syntax ```lua Bloom.Input.EndTextInput() → success, reason? ``` ### Behavior Bloom disarms text input and discards any queued text or keys. ### Returns true on success; otherwise false and a reason string. ### Example ```lua local ok, reason = Bloom.Input.EndTextInput() if not ok then print(reason) end ``` ### Notes - The method is safe to call when text input is already inactive. ### Related APIs - https://docs.bloomclient.net/reference/input/begin-text-input - https://docs.bloomclient.net/reference/input/is-text-input-active --- ## Bloom.Input.IsTextInputActive Source: https://docs.bloomclient.net/reference/input/is-text-input-active Category: Input Check whether text input is currently armed. ### Syntax ```lua Bloom.Input.IsTextInputActive() → boolean ``` ### Behavior The value changes after BeginTextInput or EndTextInput. ### Returns true while a text-input session is active. ### Example ```lua if Bloom.Input.IsTextInputActive() then print("typing") end ``` ### Related APIs - https://docs.bloomclient.net/reference/input/begin-text-input - https://docs.bloomclient.net/reference/input/end-text-input --- ## Bloom.Input.GetClipboardText Source: https://docs.bloomclient.net/reference/input/get-clipboard-text Category: Input Read UTF-8 text from the Windows clipboard. ### Syntax ```lua Bloom.Input.GetClipboardText() → text | nil, reason? ``` ### Behavior Bloom reads Unicode clipboard text and converts it to UTF-8. ### Returns Clipboard text, or nil and a reason string when it cannot be read. ### Example ```lua local text, reason = Bloom.Input.GetClipboardText() if text then print(text) else print(reason) end ``` ### Related APIs - https://docs.bloomclient.net/reference/input/set-clipboard-text - https://docs.bloomclient.net/reference/input/read-text-input --- ## Bloom.Input.SetClipboardText Source: https://docs.bloomclient.net/reference/input/set-clipboard-text Category: Input Write UTF-8 text to the Windows clipboard. ### Syntax ```lua Bloom.Input.SetClipboardText(text) → success, reason? ``` ### Behavior Bloom converts the value to Unicode clipboard text. ### Parameters - `text` (string): Valid UTF-8 text. ### Returns true on success; otherwise false and a reason string. ### Example ```lua local ok, reason = Bloom.Input.SetClipboardText("Bloom") if not ok then print(reason) end ``` ### Related APIs - https://docs.bloomclient.net/reference/input/get-clipboard-text - https://docs.bloomclient.net/reference/input/read-text-input --- ## Bloom.Input constants Source: https://docs.bloomclient.net/reference/input/constants Category: Input Use readable constants for mouse buttons and virtual keys. ### Syntax ```lua Bloom.Input.Mouse* / Bloom.Input.VK_* → number ``` ### Behavior Mouse constants cover left, right, middle, X1, and X2. Key constants cover letters, digits, F1 through F24, modifiers, navigation, and editing keys. ### Returns A numeric mouse-button or Windows virtual-key code. ### Example ```lua local leftMouse = Bloom.Input.MouseLeft local pasteKey = Bloom.Input.VK_V print(leftMouse, pasteKey) ``` ### Notes - Letters use Bloom.Input.VK_A through Bloom.Input.VK_Z. - Digits use Bloom.Input.VK_0 through Bloom.Input.VK_9. - Function keys use Bloom.Input.VK_F1 through Bloom.Input.VK_F24. ### Related APIs - https://docs.bloomclient.net/reference/input/is-key-down - https://docs.bloomclient.net/reference/input/is-mouse-down --- # Events Source: https://docs.bloomclient.net/?section=events Register local handlers and observe exact-name FiveM events. ## Bloom.InstrumentEvents Source: https://docs.bloomclient.net/reference/events/instrument-events Category: Events Enable Bloom event instrumentation in the current targeted resource. ### Syntax ```lua Bloom.InstrumentEvents() → enabled, status ``` ### Behavior The targeted resource begins reporting supported event calls to Bloom event tooling. ### Returns An enabled boolean and a numeric status value. ### Example ```lua local output = Bloom.InjectResource( "my_resource", "return Bloom.InstrumentEvents()" ) print(output) ``` ### Notes - Call this from the resource scope you want to inspect. ### Related APIs - https://docs.bloomclient.net/reference/resources/inject-resource - https://docs.bloomclient.net/reference/events/add-event-handler --- ## Bloom.AddEventHandler Source: https://docs.bloomclient.net/reference/events/add-event-handler Category: Events Register a callback for an event in the isolated state. ### Syntax ```lua Bloom.AddEventHandler(eventName, callback) → handler ``` ### Behavior Bloom registers the event name and invokes callback whenever that event reaches the current state. ### Parameters - `eventName` (string): Event name to register. - `callback` (function): Function called with the event arguments. ### Returns A handler reference accepted by Bloom.RemoveEventHandler. ### Example ```lua local handler = Bloom.AddEventHandler("docs:updated", function(version) print(version) end) ``` ### Related APIs - https://docs.bloomclient.net/reference/events/remove-event-handler - https://docs.bloomclient.net/reference/events/register-net-event --- ## Bloom.RemoveEventHandler Source: https://docs.bloomclient.net/reference/events/remove-event-handler Category: Events Remove a previously registered event callback. ### Syntax ```lua Bloom.RemoveEventHandler(handler) ``` ### Behavior Matching callbacks are removed from the current state event registry. ### Parameters - `handler` (table | function): Handler reference or callback to remove. ### Returns No value. ### Example ```lua local handler = Bloom.AddEventHandler("docs:updated", function() end) Bloom.RemoveEventHandler(handler) ``` ### Related APIs - https://docs.bloomclient.net/reference/events/add-event-handler - https://docs.bloomclient.net/reference/events/register-net-event --- ## Bloom.RegisterNetEvent Source: https://docs.bloomclient.net/reference/events/register-net-event Category: Events Register a network event name with an optional callback. ### Syntax ```lua Bloom.RegisterNetEvent(eventName, callback?) → handler? ``` ### Behavior Bloom marks the event for delivery to the current state and optionally registers its callback. ### Parameters - `eventName` (string): Network event name to register. - `callback` (function?): Optional callback for the event. ### Returns A handler reference when callback is supplied; otherwise no value. ### Example ```lua Bloom.RegisterNetEvent("docs:updated", function(version) print(version) end) ``` ### Related APIs - https://docs.bloomclient.net/reference/events/add-event-handler - https://docs.bloomclient.net/reference/events/remove-event-handler --- ## Bloom.Events.AddLocalCallback Source: https://docs.bloomclient.net/reference/events/add-local-callback Category: Events Run a synchronous callback for one Bloom-local event name on FiveM. ### Syntax ```lua Bloom.Events.AddLocalCallback(name, callback) → handle | nil, reason ``` ### Behavior A true return skips Bloom's isolated AddEventHandler callbacks for that local dispatch. The ordinary Cfx event dispatch still runs. ### Parameters - `name` (string): Exact local event name, up to 256 bytes without wildcard characters. - `callback` (function): Receives one event table with name, origin, source, isNetwork, and packed args. ### Returns A handle table, or nil and a reason if the callback limit is reached. ### Example ```lua local handle = Bloom.Events.AddLocalCallback("docs:updated", function(event) print(event.args[1]) return true end) -- Later, remove this callback: Bloom.Events.RemoveLocalCallback(handle) ``` ### Notes - Only Bloom's own local event helper invokes this callback. Inbound, server-bound, and other-resource events do not enter it. - Callbacks must finish without yielding. Errors and yields leave Bloom's ordinary local handlers enabled. - Bloom.Events.ListLocalCallbacks() returns sorted id and name snapshots. RemoveLocalCallback(handle) returns true once for an active handle. - This does not cancel events for other resources or provide a process-wide event callback. ### Related APIs - https://docs.bloomclient.net/reference/events/add-event-handler - https://docs.bloomclient.net/reference/events/observe-deferred --- ## Bloom.Events.ObserveDeferred Source: https://docs.bloomclient.net/reference/events/observe-deferred Category: Events Observe one exact inbound Cfx event name through a copied, deferred FiveM callback. ### Syntax ```lua Bloom.Events.ObserveDeferred(name, callback, opts?) → handle | nil, reason ``` ### Behavior Bloom copies the event payload at Cfx ingress, then calls the observer later. The observer cannot cancel or rewrite ordinary event delivery. ### Parameters - `name` (string): Exact inbound event name, up to 256 bytes without wildcard characters. - `callback` (function): Receives a copied event snapshot on Bloom's isolated Lua tick. - `opts` (table?): Set network = true to receive network-sourced events. ### Returns A handle table, or nil and a reason when copied ingress is unavailable or full. ### Example ```lua local handle = Bloom.Events.ObserveDeferred("docs:status", function(event) print(event.name, event.args[1]) end, { network = true }) -- Later, remove this observer: Bloom.Events.RemoveDeferred(handle) ``` ### Notes - Only names that reach Bloom's late Cfx ingress subscription can be observed. An earlier handler can stop delivery before Bloom sees an event. - A callback receives name, source, isNetwork, origin, payload, packed args, registrationEpoch, and ingressSequence. Source or target resource identity is not authenticated. - Bloom.Events.ListDeferred() returns sorted entries and a callback-drop count. RemoveDeferred(handle) returns true once. IngressLosses() reports a separate native ingress-loss count when available. - The deferred observer has 32 active and 32 pending callback limits, with 64 KiB and 128-argument limits per callback. - This is read-only observation. It does not provide synchronous process-wide event cancellation. ### Related APIs - https://docs.bloomclient.net/reference/events/add-local-callback - https://docs.bloomclient.net/reference/events/add-event-handler --- # Resources & Files Source: https://docs.bloomclient.net/?section=resources Run resource-scoped code and work with resource or local files. ## Bloom.InjectResource Source: https://docs.bloomclient.net/reference/resources/inject-resource Category: Resources & Files Run Lua source inside a named resource and capture its output. ### Syntax ```lua Bloom.InjectResource(name, code) → output ``` ### Behavior Bloom executes the supplied source in the selected resource state. ### Parameters - `name` (string): Target resource name. - `code` (string): Lua source to run in the resource. ### Returns Captured output or an error description. ### Example ```lua local output = Bloom.InjectResource( "my_resource", "return Docs.GetVersion()" ) print(output) ``` ### Notes - Use a resource name returned by Bloom.ListResources. ### Related APIs - https://docs.bloomclient.net/reference/resources/inject-resource-raw - https://docs.bloomclient.net/reference/resources/call-function --- ## Bloom.InjectResourceRaw Source: https://docs.bloomclient.net/reference/resources/inject-resource-raw Category: Resources & Files Call the explicit raw alias of Bloom.InjectResource. ### Syntax ```lua Bloom.InjectResourceRaw(name, code) → output ``` ### Behavior This alias currently points to the same resource execution function as Bloom.InjectResource. ### Parameters - `name` (string): Target resource name. - `code` (string): Lua source to run in the resource. ### Returns The same output as Bloom.InjectResource. ### Example ```lua local output = Bloom.InjectResourceRaw( "my_resource", "return Docs.GetVersion()" ) print(output) ``` ### Related APIs - https://docs.bloomclient.net/reference/resources/inject-resource - https://docs.bloomclient.net/reference/resources/call-function --- ## Bloom.CallFunction Source: https://docs.bloomclient.net/reference/resources/call-function Category: Resources & Files Call a global or dotted-path function inside a named resource. ### Syntax ```lua Bloom.CallFunction(resource, functionName, ...) → output ``` ### Behavior Bloom serializes the arguments and calls the selected function in the resource state. ### Parameters - `resource` (string): Target resource name. - `functionName` (string): Global or dotted function path. - `...` (any): Serializable arguments for the function. ### Returns Captured function output or an error description. ### Example ```lua local version = Bloom.CallFunction( "my_resource", "Docs.GetVersion" ) print(version) ``` ### Notes - Arguments may contain nil, booleans, numbers, strings, and nested tables. ### Related APIs - https://docs.bloomclient.net/reference/resources/inject-resource - https://docs.bloomclient.net/reference/resources/list-resources --- ## Bloom.ListResources Source: https://docs.bloomclient.net/reference/resources/list-resources Category: Resources & Files List the resources visible to the active Cfx runtime. ### Syntax ```lua Bloom.ListResources() → { string, ... } ``` ### Behavior Bloom enumerates each resource known by the active runtime. ### Returns An array of resource names. ### Example ```lua for _, name in ipairs(Bloom.ListResources()) do print(name) end ``` ### Notes - Bloom.cfxReady must be true. ### Related APIs - https://docs.bloomclient.net/reference/resources/list-resource-files - https://docs.bloomclient.net/reference/utilities/capability-state --- ## Bloom.ListResourceFiles Source: https://docs.bloomclient.net/reference/resources/list-resource-files Category: Resources & Files Read the concrete file listing for a resource. ### Syntax ```lua Bloom.ListResourceFiles(name) → listing | nil ``` ### Behavior Bloom returns the resource files currently present in its downloaded file list. ### Parameters - `name` (string): Resource name. ### Returns A delimited file listing, or nil when the resource has no readable listing. ### Example ```lua local listing = Bloom.ListResourceFiles("my_resource") if listing then print(listing) end ``` ### Notes - Bloom.ResourceFiles is the resource-scope alias. ### Related APIs - https://docs.bloomclient.net/reference/resources/list-resources - https://docs.bloomclient.net/reference/resources/read-resource-file --- ## Bloom.ReadResourceFile Source: https://docs.bloomclient.net/reference/resources/read-resource-file Category: Resources & Files Read one file from a resource by relative path. ### Syntax ```lua Bloom.ReadResourceFile(name, relativePath) → contents | nil, reason? ``` ### Behavior Bloom finds a matching path in the resource listing and reads the file as bytes. ### Parameters - `name` (string): Resource name. - `relativePath` (string): File path relative to the resource. ### Returns File contents, or nil and a reason string. ### Example ```lua local contents, reason = Bloom.ReadResourceFile( "my_resource", "fxmanifest.lua" ) if contents then print(contents) else print(reason) end ``` ### Related APIs - https://docs.bloomclient.net/reference/resources/list-resource-files - https://docs.bloomclient.net/reference/resources/write-file --- ## Bloom.WriteFile Source: https://docs.bloomclient.net/reference/resources/write-file Category: Resources & Files Write text or binary data to an absolute local path. ### Syntax ```lua Bloom.WriteFile(absolutePath, data, length?) → bytesWritten | nil ``` ### Behavior Bloom opens the destination, writes the requested byte count, and closes the file. ### Parameters - `absolutePath` (string): Absolute destination path. - `data` (string): Text or binary data to write. - `length` (number?): Number of bytes to write. Defaults to the string length. ### Returns The number of bytes written, or nil when the write fails. ### Example ```lua local written = Bloom.WriteFile( "C:/Bloom Dumps/report.txt", "done" ) print(written) ``` ### Notes - Create missing parent folders first with Bloom.MkDirs. ### Related APIs - https://docs.bloomclient.net/reference/resources/make-directories - https://docs.bloomclient.net/reference/resources/read-resource-file --- ## Bloom.MkDirs Source: https://docs.bloomclient.net/reference/resources/make-directories Category: Resources & Files Create an absolute directory tree. ### Syntax ```lua Bloom.MkDirs(absolutePath) → boolean ``` ### Behavior Bloom creates each missing directory in the supplied path. ### Parameters - `absolutePath` (string): Absolute directory path. ### Returns true when the directory exists after the call; otherwise false. ### Example ```lua local ok = Bloom.MkDirs("C:/Bloom Dumps/session") print(ok) ``` ### Notes - Bloom.MakeDirectories is the resource-scope alias. ### Related APIs - https://docs.bloomclient.net/reference/resources/write-file - https://docs.bloomclient.net/reference/resources/list-resource-files --- ## Bloom.OnReset Source: https://docs.bloomclient.net/reference/resources/on-reset Category: Resources & Files Register cleanup work for a Bloom-owned resource session. ### Syntax ```lua Bloom.OnReset(callback) → boolean ``` ### Behavior Bloom keeps the callback and runs it when the associated Bloom-owned resource work is reset. ### Parameters - `callback` (function): Cleanup function to register. ### Returns true when the callback is accepted; otherwise false. ### Example ```lua Bloom.OnReset(function() print("Bloom cleanup complete") end) ``` ### Related APIs - https://docs.bloomclient.net/reference/resources/reset-hijack - https://docs.bloomclient.net/reference/resources/inject-resource --- ## Bloom.ResetHijack Source: https://docs.bloomclient.net/reference/resources/reset-hijack Category: Resources & Files Reset Bloom-owned work for the current or selected resource. ### Syntax ```lua Bloom.ResetHijack(resourceName?) → count | nil, output? ``` ### Behavior Bloom requests cleanup for the selected resource and returns the result. ### Parameters - `resourceName` (string?): Resource to reset when called from the isolated workspace. ### Returns A reset count or nil, plus optional captured output. ### Example ```lua local count, output = Bloom.ResetHijack("my_resource") print(count, output) ``` ### Notes - Inside a resource-scoped call, omit the name to reset that resource. ### Related APIs - https://docs.bloomclient.net/reference/resources/on-reset - https://docs.bloomclient.net/reference/resources/inject-resource --- # Tick Routines Source: https://docs.bloomclient.net/?section=tick-routines Run one persistent callback from the isolated workspace. ## Bloom.SetTickRoutine Source: https://docs.bloomclient.net/reference/tick-routines/set-tick-routine Category: Tick Routines Set the callback Bloom runs on each game script tick. ### Syntax ```lua Bloom.SetTickRoutine(callback | nil) ``` ### Behavior Bloom stores one callback and invokes it on each script tick. ### Parameters - `callback` (function | nil): Function to run each tick, or nil to clear it. ### Returns No value. ### Example ```lua Bloom.SetTickRoutine(function() Bloom.Draw.Text(40, 40, "Bloom", 20, 255, 255, 255, 255, 1) end) ``` ### Notes - Keep the callback short and avoid blocking work. - Three consecutive callback errors clear the routine automatically. ### Related APIs - https://docs.bloomclient.net/reference/tick-routines/clear-tick-routine - https://docs.bloomclient.net/reference/drawing/text --- ## Bloom.ClearTickRoutine Source: https://docs.bloomclient.net/reference/tick-routines/clear-tick-routine Category: Tick Routines Stop the active Bloom tick callback. ### Syntax ```lua Bloom.ClearTickRoutine() ``` ### Behavior The stored tick callback is removed before the next invocation. ### Returns No value. ### Example ```lua Bloom.ClearTickRoutine() ``` ### Related APIs - https://docs.bloomclient.net/reference/tick-routines/set-tick-routine - https://docs.bloomclient.net/reference/utilities/scheduler-active --- # ESP Source: https://docs.bloomclient.net/?section=esp Configure Bloom ESP visibility, measurements, and colors. ## Bloom.Esp.SetEnabled Source: https://docs.bloomclient.net/reference/esp/set-enabled Category: ESP Enable or disable Bloom ESP as a whole. ### Syntax ```lua Bloom.Esp.SetEnabled(enabled) ``` ### Behavior All individual ESP settings remain stored, while this switch controls whether ESP is active. ### Parameters - `enabled` (boolean): true enables the setting; false disables it. ### Returns No value. ### Example ```lua Bloom.Esp.SetEnabled(true) ``` ### Notes - Configure individual fields before enabling ESP when you want the first frame to use the complete setup. ### Related APIs - https://docs.bloomclient.net/reference/esp/set-box - https://docs.bloomclient.net/reference/esp/set-max-distance --- ## Bloom.Esp.SetToggle Source: https://docs.bloomclient.net/reference/esp/set-toggle Category: ESP Set a supported ESP boolean field by its raw field name. ### Syntax ```lua Bloom.Esp.SetToggle(fieldName, enabled) ``` ### Behavior Bloom writes the selected boolean setting. Named setters are easier to read for common fields. ### Parameters - `fieldName` (string): Supported ESP toggle field. - `enabled` (boolean): New toggle value. ### Returns No value. ### Example ```lua Bloom.Esp.SetToggle("box", true) ``` ### Related APIs - https://docs.bloomclient.net/reference/esp/set-enabled - https://docs.bloomclient.net/reference/esp/set-box --- ## Bloom.Esp.SetNumber Source: https://docs.bloomclient.net/reference/esp/set-number Category: ESP Set a supported ESP numeric field by its raw field name. ### Syntax ```lua Bloom.Esp.SetNumber(fieldName, value) ``` ### Behavior Bloom writes the selected numeric setting. Named setters are easier to read for common fields. ### Parameters - `fieldName` (string): Supported ESP numeric field. - `value` (number): New numeric value. ### Returns No value. ### Example ```lua Bloom.Esp.SetNumber("distanceInt", 250) ``` ### Related APIs - https://docs.bloomclient.net/reference/esp/set-max-distance - https://docs.bloomclient.net/reference/esp/set-box-thickness --- ## Bloom.Esp.SetColor Source: https://docs.bloomclient.net/reference/esp/set-color Category: ESP Set a supported ESP color field by its raw field name. ### Syntax ```lua Bloom.Esp.SetColor(fieldName, r, g, b, a?) ``` ### Behavior Bloom writes the selected RGBA setting. Named color setters are easier to read for common fields. ### Parameters - `fieldName` (string): Supported ESP color field. - `r, g, b` (number): Red, green, and blue channels from 0 to 255. - `a` (number?): Alpha from 0 to 255. Defaults to 255. ### Returns No value. ### Example ```lua Bloom.Esp.SetColor("boxOutlineColor", 239, 128, 180, 255) ``` ### Related APIs - https://docs.bloomclient.net/reference/esp/set-box-color - https://docs.bloomclient.net/reference/esp/set-box-outline-color --- ## Bloom.Esp.SetBox Source: https://docs.bloomclient.net/reference/esp/set-box Category: ESP Show or hide full box outlines. ### Syntax ```lua Bloom.Esp.SetBox(enabled) ``` ### Behavior Show or hide full box outlines. The change is applied to Bloom's RedM ESP output. ### Parameters - `enabled` (boolean): true enables the setting; false disables it. ### Returns No value. ### Example ```lua Bloom.Esp.SetBox(true) ``` ### Related APIs - https://docs.bloomclient.net/reference/esp/set-enabled - https://docs.bloomclient.net/reference/esp/set-toggle --- ## Bloom.Esp.SetCornerBox Source: https://docs.bloomclient.net/reference/esp/set-corner-box Category: ESP Show or hide corner-style boxes. ### Syntax ```lua Bloom.Esp.SetCornerBox(enabled) ``` ### Behavior Show or hide corner-style boxes. The change is applied to Bloom's RedM ESP output. ### Parameters - `enabled` (boolean): true enables the setting; false disables it. ### Returns No value. ### Example ```lua Bloom.Esp.SetCornerBox(true) ``` ### Related APIs - https://docs.bloomclient.net/reference/esp/set-enabled - https://docs.bloomclient.net/reference/esp/set-toggle --- ## Bloom.Esp.SetName Source: https://docs.bloomclient.net/reference/esp/set-name Category: ESP Show or hide player name labels. ### Syntax ```lua Bloom.Esp.SetName(enabled) ``` ### Behavior Show or hide player name labels. The change is applied to Bloom's RedM ESP output. ### Parameters - `enabled` (boolean): true enables the setting; false disables it. ### Returns No value. ### Example ```lua Bloom.Esp.SetName(true) ``` ### Related APIs - https://docs.bloomclient.net/reference/esp/set-enabled - https://docs.bloomclient.net/reference/esp/set-toggle --- ## Bloom.Esp.SetDistance Source: https://docs.bloomclient.net/reference/esp/set-distance Category: ESP Show or hide distance labels. ### Syntax ```lua Bloom.Esp.SetDistance(enabled) ``` ### Behavior Show or hide distance labels. The change is applied to Bloom's RedM ESP output. ### Parameters - `enabled` (boolean): true enables the setting; false disables it. ### Returns No value. ### Example ```lua Bloom.Esp.SetDistance(true) ``` ### Related APIs - https://docs.bloomclient.net/reference/esp/set-enabled - https://docs.bloomclient.net/reference/esp/set-toggle --- ## Bloom.Esp.SetWeapon Source: https://docs.bloomclient.net/reference/esp/set-weapon Category: ESP Show or hide weapon labels. ### Syntax ```lua Bloom.Esp.SetWeapon(enabled) ``` ### Behavior Show or hide weapon labels. The change is applied to Bloom's RedM ESP output. ### Parameters - `enabled` (boolean): true enables the setting; false disables it. ### Returns No value. ### Example ```lua Bloom.Esp.SetWeapon(true) ``` ### Related APIs - https://docs.bloomclient.net/reference/esp/set-enabled - https://docs.bloomclient.net/reference/esp/set-toggle --- ## Bloom.Esp.SetSkeleton Source: https://docs.bloomclient.net/reference/esp/set-skeleton Category: ESP Show or hide skeleton lines. ### Syntax ```lua Bloom.Esp.SetSkeleton(enabled) ``` ### Behavior Show or hide skeleton lines. The change is applied to Bloom's RedM ESP output. ### Parameters - `enabled` (boolean): true enables the setting; false disables it. ### Returns No value. ### Example ```lua Bloom.Esp.SetSkeleton(true) ``` ### Related APIs - https://docs.bloomclient.net/reference/esp/set-enabled - https://docs.bloomclient.net/reference/esp/set-toggle --- ## Bloom.Esp.SetSkeletonOutline Source: https://docs.bloomclient.net/reference/esp/set-skeleton-outline Category: ESP Show or hide the skeleton outline. ### Syntax ```lua Bloom.Esp.SetSkeletonOutline(enabled) ``` ### Behavior Show or hide the skeleton outline. The change is applied to Bloom's RedM ESP output. ### Parameters - `enabled` (boolean): true enables the setting; false disables it. ### Returns No value. ### Example ```lua Bloom.Esp.SetSkeletonOutline(true) ``` ### Related APIs - https://docs.bloomclient.net/reference/esp/set-enabled - https://docs.bloomclient.net/reference/esp/set-toggle --- ## Bloom.Esp.SetHealthBar Source: https://docs.bloomclient.net/reference/esp/set-health-bar Category: ESP Show or hide health bars. ### Syntax ```lua Bloom.Esp.SetHealthBar(enabled) ``` ### Behavior Show or hide health bars. The change is applied to Bloom's RedM ESP output. ### Parameters - `enabled` (boolean): true enables the setting; false disables it. ### Returns No value. ### Example ```lua Bloom.Esp.SetHealthBar(true) ``` ### Related APIs - https://docs.bloomclient.net/reference/esp/set-enabled - https://docs.bloomclient.net/reference/esp/set-toggle --- ## Bloom.Esp.SetHealthDynamicColor Source: https://docs.bloomclient.net/reference/esp/set-health-dynamic-color Category: ESP Use health-dependent coloring for health bars. ### Syntax ```lua Bloom.Esp.SetHealthDynamicColor(enabled) ``` ### Behavior Use health-dependent coloring for health bars. The change is applied to Bloom's RedM ESP output. ### Parameters - `enabled` (boolean): true enables the setting; false disables it. ### Returns No value. ### Example ```lua Bloom.Esp.SetHealthDynamicColor(true) ``` ### Related APIs - https://docs.bloomclient.net/reference/esp/set-enabled - https://docs.bloomclient.net/reference/esp/set-toggle --- ## Bloom.Esp.SetPlayerId Source: https://docs.bloomclient.net/reference/esp/set-player-id Category: ESP Show or hide player ID labels. ### Syntax ```lua Bloom.Esp.SetPlayerId(enabled) ``` ### Behavior Show or hide player ID labels. The change is applied to Bloom's RedM ESP output. ### Parameters - `enabled` (boolean): true enables the setting; false disables it. ### Returns No value. ### Example ```lua Bloom.Esp.SetPlayerId(true) ``` ### Related APIs - https://docs.bloomclient.net/reference/esp/set-enabled - https://docs.bloomclient.net/reference/esp/set-toggle --- ## Bloom.Esp.SetArmorBar Source: https://docs.bloomclient.net/reference/esp/set-armor-bar Category: ESP Show or hide armor bars. ### Syntax ```lua Bloom.Esp.SetArmorBar(enabled) ``` ### Behavior Show or hide armor bars. The change is applied to Bloom's RedM ESP output. ### Parameters - `enabled` (boolean): true enables the setting; false disables it. ### Returns No value. ### Example ```lua Bloom.Esp.SetArmorBar(true) ``` ### Related APIs - https://docs.bloomclient.net/reference/esp/set-enabled - https://docs.bloomclient.net/reference/esp/set-toggle --- ## Bloom.Esp.SetLines Source: https://docs.bloomclient.net/reference/esp/set-lines Category: ESP Show or hide tracer lines. ### Syntax ```lua Bloom.Esp.SetLines(enabled) ``` ### Behavior Show or hide tracer lines. The change is applied to Bloom's RedM ESP output. ### Parameters - `enabled` (boolean): true enables the setting; false disables it. ### Returns No value. ### Example ```lua Bloom.Esp.SetLines(true) ``` ### Related APIs - https://docs.bloomclient.net/reference/esp/set-enabled - https://docs.bloomclient.net/reference/esp/set-toggle --- ## Bloom.Esp.SetIgnoreLocalPlayer Source: https://docs.bloomclient.net/reference/esp/set-ignore-local-player Category: ESP Exclude or include the local player. ### Syntax ```lua Bloom.Esp.SetIgnoreLocalPlayer(enabled) ``` ### Behavior Exclude or include the local player. The change is applied to Bloom's RedM ESP output. ### Parameters - `enabled` (boolean): true enables the setting; false disables it. ### Returns No value. ### Example ```lua Bloom.Esp.SetIgnoreLocalPlayer(true) ``` ### Related APIs - https://docs.bloomclient.net/reference/esp/set-enabled - https://docs.bloomclient.net/reference/esp/set-toggle --- ## Bloom.Esp.SetIgnorePed Source: https://docs.bloomclient.net/reference/esp/set-ignore-ped Category: ESP Exclude or include non-player peds. ### Syntax ```lua Bloom.Esp.SetIgnorePed(enabled) ``` ### Behavior Exclude or include non-player peds. The change is applied to Bloom's RedM ESP output. ### Parameters - `enabled` (boolean): true enables the setting; false disables it. ### Returns No value. ### Example ```lua Bloom.Esp.SetIgnorePed(true) ``` ### Notes - Keep this enabled when you only want player ESP. ### Related APIs - https://docs.bloomclient.net/reference/esp/set-enabled - https://docs.bloomclient.net/reference/esp/set-toggle --- ## Bloom.Esp.SetMaxDistance Source: https://docs.bloomclient.net/reference/esp/set-max-distance Category: ESP Set the maximum ESP draw distance. ### Syntax ```lua Bloom.Esp.SetMaxDistance(value) ``` ### Behavior Set the maximum ESP draw distance. The new value is used on the next rendered frame. ### Parameters - `value` (number): The new numeric value. ### Returns No value. ### Example ```lua Bloom.Esp.SetMaxDistance(300) ``` ### Notes - Use 0 to remove the distance limit. ### Related APIs - https://docs.bloomclient.net/reference/esp/set-enabled - https://docs.bloomclient.net/reference/esp/set-number --- ## Bloom.Esp.SetBoxThickness Source: https://docs.bloomclient.net/reference/esp/set-box-thickness Category: ESP Set the box outline thickness. ### Syntax ```lua Bloom.Esp.SetBoxThickness(value) ``` ### Behavior Set the box outline thickness. The new value is used on the next rendered frame. ### Parameters - `value` (number): The new numeric value. ### Returns No value. ### Example ```lua Bloom.Esp.SetBoxThickness(1.5) ``` ### Related APIs - https://docs.bloomclient.net/reference/esp/set-enabled - https://docs.bloomclient.net/reference/esp/set-number --- ## Bloom.Esp.SetLabelSize Source: https://docs.bloomclient.net/reference/esp/set-label-size Category: ESP Set the ESP label text size. ### Syntax ```lua Bloom.Esp.SetLabelSize(value) ``` ### Behavior Set the ESP label text size. The new value is used on the next rendered frame. ### Parameters - `value` (number): The new numeric value. ### Returns No value. ### Example ```lua Bloom.Esp.SetLabelSize(16) ``` ### Related APIs - https://docs.bloomclient.net/reference/esp/set-enabled - https://docs.bloomclient.net/reference/esp/set-number --- ## Bloom.Esp.SetSkeletonThickness Source: https://docs.bloomclient.net/reference/esp/set-skeleton-thickness Category: ESP Set the skeleton line thickness. ### Syntax ```lua Bloom.Esp.SetSkeletonThickness(value) ``` ### Behavior Set the skeleton line thickness. The new value is used on the next rendered frame. ### Parameters - `value` (number): The new numeric value. ### Returns No value. ### Example ```lua Bloom.Esp.SetSkeletonThickness(1.5) ``` ### Related APIs - https://docs.bloomclient.net/reference/esp/set-enabled - https://docs.bloomclient.net/reference/esp/set-number --- ## Bloom.Esp.SetBoxRounding Source: https://docs.bloomclient.net/reference/esp/set-box-rounding Category: ESP Set the box corner radius. ### Syntax ```lua Bloom.Esp.SetBoxRounding(value) ``` ### Behavior Set the box corner radius. The new value is used on the next rendered frame. ### Parameters - `value` (number): The new numeric value. ### Returns No value. ### Example ```lua Bloom.Esp.SetBoxRounding(4) ``` ### Related APIs - https://docs.bloomclient.net/reference/esp/set-enabled - https://docs.bloomclient.net/reference/esp/set-number --- ## Bloom.Esp.SetBoxColor Source: https://docs.bloomclient.net/reference/esp/set-box-color Category: ESP Set the box fill color. ### Syntax ```lua Bloom.Esp.SetBoxColor(r, g, b, a?) ``` ### Behavior Set the box fill color. Omitted channels fall back to opaque white. ### Parameters - `r, g, b` (number): Red, green, and blue channels from 0 to 255. - `a` (number?): Alpha from 0 to 255. Defaults to 255. ### Returns No value. ### Example ```lua Bloom.Esp.SetBoxColor(0, 0, 0, 60) ``` ### Related APIs - https://docs.bloomclient.net/reference/esp/set-enabled - https://docs.bloomclient.net/reference/esp/set-color --- ## Bloom.Esp.SetBoxOutlineColor Source: https://docs.bloomclient.net/reference/esp/set-box-outline-color Category: ESP Set the box outline color. ### Syntax ```lua Bloom.Esp.SetBoxOutlineColor(r, g, b, a?) ``` ### Behavior Set the box outline color. Omitted channels fall back to opaque white. ### Parameters - `r, g, b` (number): Red, green, and blue channels from 0 to 255. - `a` (number?): Alpha from 0 to 255. Defaults to 255. ### Returns No value. ### Example ```lua Bloom.Esp.SetBoxOutlineColor(239, 128, 180, 255) ``` ### Related APIs - https://docs.bloomclient.net/reference/esp/set-enabled - https://docs.bloomclient.net/reference/esp/set-color --- ## Bloom.Esp.SetNameColor Source: https://docs.bloomclient.net/reference/esp/set-name-color Category: ESP Set the player name color. ### Syntax ```lua Bloom.Esp.SetNameColor(r, g, b, a?) ``` ### Behavior Set the player name color. Omitted channels fall back to opaque white. ### Parameters - `r, g, b` (number): Red, green, and blue channels from 0 to 255. - `a` (number?): Alpha from 0 to 255. Defaults to 255. ### Returns No value. ### Example ```lua Bloom.Esp.SetNameColor(255, 255, 255, 255) ``` ### Related APIs - https://docs.bloomclient.net/reference/esp/set-enabled - https://docs.bloomclient.net/reference/esp/set-color --- ## Bloom.Esp.SetDistanceColor Source: https://docs.bloomclient.net/reference/esp/set-distance-color Category: ESP Set the distance label color. ### Syntax ```lua Bloom.Esp.SetDistanceColor(r, g, b, a?) ``` ### Behavior Set the distance label color. Omitted channels fall back to opaque white. ### Parameters - `r, g, b` (number): Red, green, and blue channels from 0 to 255. - `a` (number?): Alpha from 0 to 255. Defaults to 255. ### Returns No value. ### Example ```lua Bloom.Esp.SetDistanceColor(210, 200, 214, 255) ``` ### Related APIs - https://docs.bloomclient.net/reference/esp/set-enabled - https://docs.bloomclient.net/reference/esp/set-color --- ## Bloom.Esp.SetWeaponColor Source: https://docs.bloomclient.net/reference/esp/set-weapon-color Category: ESP Set the weapon label color. ### Syntax ```lua Bloom.Esp.SetWeaponColor(r, g, b, a?) ``` ### Behavior Set the weapon label color. Omitted channels fall back to opaque white. ### Parameters - `r, g, b` (number): Red, green, and blue channels from 0 to 255. - `a` (number?): Alpha from 0 to 255. Defaults to 255. ### Returns No value. ### Example ```lua Bloom.Esp.SetWeaponColor(239, 128, 180, 255) ``` ### Related APIs - https://docs.bloomclient.net/reference/esp/set-enabled - https://docs.bloomclient.net/reference/esp/set-color --- ## Bloom.Esp.SetSkeletonColor Source: https://docs.bloomclient.net/reference/esp/set-skeleton-color Category: ESP Set the skeleton line color. ### Syntax ```lua Bloom.Esp.SetSkeletonColor(r, g, b, a?) ``` ### Behavior Set the skeleton line color. Omitted channels fall back to opaque white. ### Parameters - `r, g, b` (number): Red, green, and blue channels from 0 to 255. - `a` (number?): Alpha from 0 to 255. Defaults to 255. ### Returns No value. ### Example ```lua Bloom.Esp.SetSkeletonColor(255, 255, 255, 255) ``` ### Related APIs - https://docs.bloomclient.net/reference/esp/set-enabled - https://docs.bloomclient.net/reference/esp/set-color --- ## Bloom.Esp.SetLineColor Source: https://docs.bloomclient.net/reference/esp/set-line-color Category: ESP Set the tracer line color. ### Syntax ```lua Bloom.Esp.SetLineColor(r, g, b, a?) ``` ### Behavior Set the tracer line color. Omitted channels fall back to opaque white. ### Parameters - `r, g, b` (number): Red, green, and blue channels from 0 to 255. - `a` (number?): Alpha from 0 to 255. Defaults to 255. ### Returns No value. ### Example ```lua Bloom.Esp.SetLineColor(239, 128, 180, 255) ``` ### Related APIs - https://docs.bloomclient.net/reference/esp/set-enabled - https://docs.bloomclient.net/reference/esp/set-color