Skip to content

Derma

Clientside Derma helpers for Lilia menu creation, request dialogs, rounded drawing, blur, shadows, text rendering, and UI animation.


Overview

The derma library centralizes reusable clientside interface helpers under `lia.derma`. It provides menu builders, request windows, player selectors, table displays, rounded primitive rendering, blur and shadow drawing, text helpers, entity label rendering, and small animation/math utilities used by Lilia panels.

lia.derma.dermaMenu()View Source

Purpose

Creates a `liaDermaMenu` at the current cursor position, closes any existing tracked Derma menu, clamps it to the screen, and stores it in `lia.gui.menuDermaMenu`.

Realm

Client

Returns

Panel The newly created `liaDermaMenu` panel.

Example Usage

  local menu = lia.derma.dermaMenu()
  menu:AddOption(L("close"), function() end)

lia.derma.optionsMenu(rawOptions, config)View Source

Purpose

Builds an options menu from raw option data. Custom menus are drawn as a panel list, while interaction and action modes are delegated to `lia.derma.interactionTooltip`.

Realm

Client

Parameters

table rawOptions Option definitions to display. Sequential and keyed tables are supported.

table config optional Optional menu configuration such as `mode`, `entity`, `title`, `netMsg`, positioning, sizing, close behavior, and hook emission.

Returns

Panel|nil The created menu panel, or nil when there is no valid local player or no visible option.

Example Usage

  lia.derma.optionsMenu({
      inspect = {label = L("inspect"), callback = function() end}
  }, {title = L("options")})

lia.derma.interactionTooltip(rawOptions, config)View Source

Purpose

Creates the compact interaction/action tooltip menu, filters available options for the current context, runs local callbacks, and optionally sends selected server-only options over the configured net message.

Realm

Client

Parameters

table rawOptions Option definitions to filter and display.

table config optional Optional tooltip configuration such as `mode`, `entity`, `title`, `netMsg`, `closeKey`, `autoCloseDelay`, and registry key.

Returns

Panel|nil The created tooltip panel, or nil when there is no valid local player, target, or visible option.

Example Usage

  lia.derma.interactionTooltip(options, {mode = "interaction", entity = target})

lia.derma.requestColorPicker(func, colorStandard)View Source

Purpose

Opens a color picker window with saturation/value and hue controls, then passes the chosen color to a callback or passes false when cancelled.

Realm

Client

Parameters

function func Callback called with the selected Color, or false when the picker is cancelled.

Color colorStandard optional Optional initial color. Defaults to white.

Returns

nil This function does not return a value.

Example Usage

  lia.derma.requestColorPicker(function(color)
      if color then panel:SetColor(color) end
  end, Color(255, 255, 255))

lia.derma.radialMenu(options)View Source

Purpose

Creates a `liaRadialPanel`, initializes it with the supplied options, removes any existing tracked radial menu, and stores it in `lia.gui.menu_radial`.

Realm

Client

Parameters

table options Options passed to the radial panel initializer.

Returns

Panel The created `liaRadialPanel`.

Example Usage

  local radial = lia.derma.radialMenu(options)

lia.derma.requestPlayerSelector(doClick)View Source

Purpose

Opens a player selector window that lists current players with avatar, group, ping, and bot status, then calls a callback with the chosen player.

Realm

Client

Parameters

function doClick Callback called with the selected Player.

Returns

nil This function does not return a value.

Example Usage

  lia.derma.requestPlayerSelector(function(client)
      print(client:Name())
  end)

lia.derma.draw(radius, x, y, w, h, col, flags)View Source

Purpose

Draws a rounded rectangle using the shader-backed rounded renderer.

Realm

Client

Parameters

number radius Corner radius applied to every corner.

number x Left screen coordinate.

number y Top screen coordinate.

number w Rectangle width.

number h Rectangle height.

Color col optional Draw color. Defaults to white unless manual color mode is enabled.

number flags optional Optional bit flags such as `lia.derma.SHAPE_IOS`, `lia.derma.BLUR`, or corner-disable flags.

Returns

nil This function does not return a value.

Example Usage

  lia.derma.draw(8, 20, 20, 160, 40, Color(25, 28, 35, 240), lia.derma.SHAPE_IOS)

lia.derma.drawOutlined(radius, x, y, w, h, col, thickness, flags)View Source

Purpose

Draws an outlined rounded rectangle using the shader-backed rounded renderer.

Realm

Client

Parameters

number radius Corner radius applied to every corner.

number x Left screen coordinate.

number y Top screen coordinate.

number w Rectangle width.

number h Rectangle height.

Color col optional Outline color.

number thickness optional Outline thickness. Defaults to 1.

number flags optional Optional shape and corner flags.

Returns

nil This function does not return a value.

Example Usage

  lia.derma.drawOutlined(8, 20, 20, 160, 40, color_white, 2)

lia.derma.drawTexture(radius, x, y, w, h, col, texture, flags)View Source

Purpose

Draws a rounded rectangle filled with a texture.

Realm

Client

Parameters

number radius Corner radius applied to every corner.

number x Left screen coordinate.

number y Top screen coordinate.

number w Rectangle width.

number h Rectangle height.

Color col optional Tint color for the texture.

ITexture texture Texture used as the base texture.

number flags optional Optional shape and corner flags.

Returns

nil This function does not return a value.

Example Usage

  lia.derma.drawTexture(8, x, y, w, h, color_white, material:GetTexture("$basetexture"))

lia.derma.drawMaterial(radius, x, y, w, h, col, mat, flags)View Source

Purpose

Draws a rounded rectangle from a material by using the material base texture when available.

Realm

Client

Parameters

number radius Corner radius applied to every corner.

number x Left screen coordinate.

number y Top screen coordinate.

number w Rectangle width.

number h Rectangle height.

Color col optional Tint color for the material texture.

IMaterial mat Material whose `$basetexture` is drawn.

number flags optional Optional shape and corner flags.

Returns

nil This function does not return a value.

Example Usage

  lia.derma.drawMaterial(6, x, y, w, h, color_white, Material("vgui/gradient_down"))

lia.derma.drawCircle(x, y, radius, col, flags)View Source

Purpose

Draws a filled circle through the rounded renderer.

Realm

Client

Parameters

number x Circle center X coordinate.

number y Circle center Y coordinate.

number radius Circle diameter used by the renderer.

Color col optional Circle color.

number flags optional Optional flags combined with the circle shape flag.

Returns

nil This function does not return a value.

Example Usage

  lia.derma.drawCircle(100, 100, 32, Color(255, 255, 255))

lia.derma.drawCircleOutlined(x, y, radius, col, thickness, flags)View Source

Purpose

Draws an outlined circle through the rounded renderer.

Realm

Client

Parameters

number x Circle center X coordinate.

number y Circle center Y coordinate.

number radius Circle diameter used by the renderer.

Color col optional Outline color.

number thickness optional Outline thickness.

number flags optional Optional flags combined with the circle shape flag.

Returns

nil This function does not return a value.

Example Usage

  lia.derma.drawCircleOutlined(100, 100, 32, color_white, 2)

lia.derma.drawCircleTexture(x, y, radius, col, texture, flags)View Source

Purpose

Draws a textured circle through the rounded renderer.

Realm

Client

Parameters

number x Circle center X coordinate.

number y Circle center Y coordinate.

number radius Circle diameter used by the renderer.

Color col optional Texture tint color.

ITexture texture Texture used as the base texture.

number flags optional Optional flags combined with the circle shape flag.

Returns

nil This function does not return a value.

Example Usage

  lia.derma.drawCircleTexture(100, 100, 32, color_white, tex)

lia.derma.drawCircleMaterial(x, y, radius, col, mat, flags)View Source

Purpose

Draws a circular material by using the material base texture when available.

Realm

Client

Parameters

number x Circle center X coordinate.

number y Circle center Y coordinate.

number radius Circle diameter used by the renderer.

Color col optional Texture tint color.

IMaterial mat Material whose `$basetexture` is drawn.

number flags optional Optional flags combined with the circle shape flag.

Returns

nil This function does not return a value.

Example Usage

  lia.derma.drawCircleMaterial(100, 100, 32, color_white, Material("icon16/star.png"))

lia.derma.drawBlur(x, y, w, h, flags, tl, Top, Top, tr, Top, Top, bl, Bottom, Bottom, br, Bottom, Bottom, thickness)View Source

Purpose

Draws a rounded shader blur region. This lower-level renderer is used by rounded draw flags before the later panel blur helper redefines `lia.derma.drawBlur`.

Realm

Client

Parameters

number x Left screen coordinate.

number y Top screen coordinate.

number w Blur region width.

number h Blur region height.

number flags optional Optional shape and corner flags.

number tl Top-left radius.

unknown Top left radius.

unknown Top left radius.

number tr Top-right radius.

unknown Top right radius.

unknown Top right radius.

number bl Bottom-left radius.

unknown Bottom left radius.

unknown Bottom left radius.

number br Bottom-right radius.

unknown Bottom right radius.

unknown Bottom right radius.

number thickness optional Optional outline thickness for the shader parameters.

Returns

nil This function does not return a value.

Example Usage

  lia.derma.drawBlur(x, y, w, h, lia.derma.SHAPE_IOS, 8, 8, 8, 8)

lia.derma.drawShadowsEx(x, y, w, h, col, flags, tl, Top, Top, tr, Top, Top, bl, Bottom, Bottom, br, Bottom, Bottom, spread, intensity, thickness)View Source

Purpose

Draws a rounded shadow with independent corner radii, spread, intensity, optional blur, and optional outline thickness.

Realm

Client

Parameters

number x Left screen coordinate.

number y Top screen coordinate.

number w Shadow source width.

number h Shadow source height.

Color col optional Shadow color.

number flags optional Optional shape, blur, manual color, and corner flags.

number tl Top-left radius.

unknown Top left radius.

unknown Top left radius.

number tr Top-right radius.

unknown Top right radius.

unknown Top right radius.

number bl Bottom-left radius.

unknown Bottom left radius.

unknown Bottom left radius.

number br Bottom-right radius.

unknown Bottom right radius.

unknown Bottom right radius.

number spread optional Shadow spread. Defaults to 30.

number intensity optional Shadow intensity. Defaults to spread multiplied by 1.2.

number thickness optional Optional outline thickness for the shader parameters.

Returns

nil This function does not return a value.

Example Usage

  lia.derma.drawShadowsEx(x, y, w, h, Color(0, 0, 0, 180), lia.derma.SHAPE_IOS, 8, 8, 8, 8, 20, 24)

lia.derma.drawShadows(radius, x, y, w, h, col, spread, intensity, flags)View Source

Purpose

Draws a rounded shadow using the same radius on every corner.

Realm

Client

Parameters

number radius Corner radius applied to every corner.

number x Left screen coordinate.

number y Top screen coordinate.

number w Shadow source width.

number h Shadow source height.

Color col optional Shadow color.

number spread optional Shadow spread.

number intensity optional Shadow intensity.

number flags optional Optional shape and blur flags.

Returns

nil This function does not return a value.

Example Usage

  lia.derma.drawShadows(10, x, y, w, h, Color(0, 0, 0, 180), 20, 24)

lia.derma.drawShadowsOutlined(radius, x, y, w, h, col, thickness, spread, intensity, flags)View Source

Purpose

Draws an outlined rounded shadow using the same radius on every corner.

Realm

Client

Parameters

number radius Corner radius applied to every corner.

number x Left screen coordinate.

number y Top screen coordinate.

number w Shadow source width.

number h Shadow source height.

Color col optional Shadow color.

number thickness optional Outline thickness. Defaults to 1.

number spread optional Shadow spread.

number intensity optional Shadow intensity.

number flags optional Optional shape and blur flags.

Returns

nil This function does not return a value.

Example Usage

  lia.derma.drawShadowsOutlined(10, x, y, w, h, Color(0, 0, 0, 180), 2, 20, 24)

lia.derma.rect(x, y, w, h)View Source

Purpose

Creates a chainable rounded rectangle draw builder.

Realm

Client

Parameters

number x Left screen coordinate.

number y Top screen coordinate.

number w Rectangle width.

number h Rectangle height.

Returns

table A `lia.derma.Rect` builder with chainable draw configuration methods.

Example Usage

  lia.derma.rect(20, 20, 160, 40):Rad(8):Color(Color(25, 28, 35, 240)):Draw()

lia.derma.circle(x, y, r)View Source

Purpose

Creates a chainable circle draw builder.

Realm

Client

Parameters

number x Circle center X coordinate.

number y Circle center Y coordinate.

number r Circle diameter used by the renderer.

Returns

table A `lia.derma.Circle` builder with chainable draw configuration methods.

Example Usage

  lia.derma.circle(100, 100, 32):Color(color_white):Draw()

lia.derma.setFlag(flags, flag, bool)View Source

Purpose

Adds or removes a bit flag from an existing flag mask. String flag names are resolved from `lia.derma` constants when present.

Realm

Client

Parameters

number flags Existing flag mask.

number|string flag Flag value or `lia.derma` flag name.

any bool Truthy value adds the flag; falsey value removes it.

Returns

number The updated flag mask.

Example Usage

  flags = lia.derma.setFlag(flags or 0, "BLUR", true)

lia.derma.setDefaultShape(shape)View Source

Purpose

Sets the default rounded shape flag used when draw calls do not supply an explicit shape.

Realm

Client

Parameters

number shape optional Shape flag to use by default. Defaults to `lia.derma.SHAPE_FIGMA` when nil.

Returns

nil This function does not return a value.

Example Usage

  lia.derma.setDefaultShape(lia.derma.SHAPE_IOS)

lia.derma.shadowText(text, font, x, y, colortext, colorshadow, dist, xalign, yalign)View Source

Purpose

Draws text once as a shadow offset and once as foreground text, with vertical alignment adjustment.

Realm

Client

Parameters

string text Text to draw.

string font Font name.

number x Text X coordinate.

number y Text Y coordinate.

Color colortext Foreground text color.

Color colorshadow Shadow text color.

number dist Shadow offset distance.

number xalign Horizontal alignment.

number yalign Vertical alignment.

Returns

nil This function does not return a value.

Example Usage

  lia.derma.shadowText("Title", "LiliaFont.20", x, y, color_white, Color(0, 0, 0, 200), 1, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)

lia.derma.drawTextOutlined(text, font, x, y, colour, xalign, outlinewidth, outlinecolour)View Source

Purpose

Draws text with an outline by drawing offset copies before the foreground text.

Realm

Client

Parameters

string text Text to draw.

string font Font name.

number x Text X coordinate.

number y Text Y coordinate.

Color colour Foreground text color.

number xalign Horizontal alignment.

number outlinewidth Outline width.

Color outlinecolour Outline color.

Returns

number|nil The width returned by `draw.DrawText`, when provided by Garry's Mod.

Example Usage

  lia.derma.drawTextOutlined("Name", "LiliaFont.18", x, y, color_white, TEXT_ALIGN_CENTER, 2, color_black)

lia.derma.drawTip(x, y, w, h, text, font, textCol, outlineCol)View Source

Purpose

Draws a speech-bubble or tooltip polygon with a centered text label.

Realm

Client

Parameters

number x Left screen coordinate.

number y Top screen coordinate.

number w Tip width.

number h Tip height.

string text Text to draw inside the tip.

string font Font name.

Color textCol Text color.

Color outlineCol Polygon fill or outline color.

Returns

nil This function does not return a value.

Example Usage

  lia.derma.drawTip(x, y, 120, 42, L("use"), "LiliaFont.16", color_white, Color(0, 0, 0, 220))

lia.derma.drawText(text, x, y, color, alignX, alignY, font, alpha)View Source

Purpose

Draws text with Garry's Mod text shadow helper and default Lilia font/color fallbacks.

Realm

Client

Parameters

string text Text to draw.

number x Text X coordinate.

number y Text Y coordinate.

Color color optional Text color. Defaults to white.

number alignX optional Horizontal alignment. Defaults to 0.

number alignY optional Vertical alignment. Defaults to 0.

string font optional Font name. Defaults to `LiliaFont.16`.

number alpha optional Shadow alpha. Defaults to a fraction of the text color alpha.

Returns

nil This function does not return a value.

Example Usage

  lia.derma.drawText("Hello", x, y, color_white, TEXT_ALIGN_CENTER, TEXT_ALIGN_TOP, "LiliaFont.16")

lia.derma.drawBoxWithText(text, x, y, options)View Source

Purpose

Draws a styled text box with optional auto-sizing, blur, shadow, border, accent border, alignment, and per-frame overlap avoidance.

Realm

Client

Parameters

string|table text Text, or a table of text lines, to render inside the box.

number x Anchor X coordinate.

number y Anchor Y coordinate.

table options optional Optional styling and layout settings such as font, colors, padding, alignment, blur, shadow, size, and border values.

Returns

number, number The final box width and height.

Example Usage

  local boxW, boxH = lia.derma.drawBoxWithText({"Line one", "Line two"}, x, y, {textAlignX = TEXT_ALIGN_CENTER})

lia.derma.drawSurfaceTexture(material, color, x, y, w, h)View Source

Purpose

Draws a material or material path at the given rectangle using `surface.DrawTexturedRect`.

Realm

Client

Parameters

IMaterial|string material Material instance or material path resolved through `lia.util.getMaterial`.

Color color optional Draw color. Defaults to white.

number x Left screen coordinate.

number y Top screen coordinate.

number w Texture width.

number h Texture height.

Returns

nil This function does not return a value.

Example Usage

  lia.derma.drawSurfaceTexture("vgui/white", color_white, x, y, w, h)

lia.derma.skinFunc(name, panel)View Source

Purpose

Calls a named function on a panel skin, or on the default Derma skin when the panel is invalid.

Realm

Client

Parameters

string name Skin function name.

Panel panel optional Panel whose skin should be used.

Returns

any Whatever the skin function returns, or nil when no matching skin function exists.

Example Usage

  lia.derma.skinFunc("PaintFrame", panel, w, h)

lia.derma.approachExp(current, target, speed, dt)View Source

Purpose

Moves a value toward a target using exponential smoothing.

Realm

Client

Parameters

number current Current value.

number target Target value.

number speed Smoothing speed.

number dt Delta time.

Returns

number The interpolated value.

Example Usage

  value = lia.derma.approachExp(value, 1, 12, FrameTime())

lia.derma.easeOutCubic(t)View Source

Purpose

Applies cubic ease-out interpolation to a normalized value.

Realm

Client

Parameters

number t Normalized value from 0 to 1.

Returns

number The eased value.

Example Usage

  local eased = lia.derma.easeOutCubic(t)

lia.derma.easeInOutCubic(t)View Source

Purpose

Applies cubic ease-in-out interpolation to a normalized value.

Realm

Client

Parameters

number t Normalized value from 0 to 1.

Returns

number The eased value.

Example Usage

  local eased = lia.derma.easeInOutCubic(t)

lia.derma.animateAppearance(panel, targetWidth, targetHeight, duration, alphaDuration, callback, scaleFactor)View Source

Purpose

Animates a valid panel from a scaled, transparent state to its target size, position, and full opacity, then optionally calls a callback.

Realm

Client

Parameters

Panel panel Panel to animate.

number targetWidth Final panel width.

number targetHeight Final panel height.

number duration optional Size and position animation duration. Defaults to 0.18.

number alphaDuration optional Alpha animation duration. Defaults to `duration`.

function callback optional Optional callback called with the panel when the animation finishes.

number scaleFactor optional Initial scale factor. Defaults to 0.8.

Returns

nil This function does not return a value.

Example Usage

  lia.derma.animateAppearance(panel, 300, 200, 0.2, 0.2, function(donePanel) end, 0.85)

lia.derma.clampMenuPosition(panel)View Source

Purpose

Moves a panel so it stays inside the visible screen area with a small margin.

Realm

Client

Parameters

Panel panel Panel to clamp.

Returns

nil This function does not return a value.

Example Usage

  lia.derma.clampMenuPosition(menu)

lia.derma.drawGradient(x, y, w, h, direction, colorShadow, radius, flags)View Source

Purpose

Draws one of the built-in VGUI gradient materials with rounded-corner support.

Realm

Client

Parameters

number x Left screen coordinate.

number y Top screen coordinate.

number w Gradient width.

number h Gradient height.

number direction Gradient material index: up, down, left, or right.

Color colorShadow Gradient tint color.

number radius optional Corner radius. Defaults to 0.

number flags optional Optional rounded draw flags.

Returns

nil This function does not return a value.

Example Usage

  lia.derma.drawGradient(x, y, w, h, 1, Color(0, 0, 0, 120), 8)

lia.derma.wrapText(text, width, font)View Source

Purpose

Splits text into lines that fit within a target width for the selected font.

Realm

Client

Parameters

string text Text to wrap.

number width Maximum line width.

string font optional Font name. Defaults to `LiliaFont.16`.

Returns

table, number A table of wrapped lines and the measured maximum width.

Example Usage

  local lines, maxW = lia.derma.wrapText(description, 240, "LiliaFont.16")

lia.derma.drawBlur(panel, amount, passes, alpha)View Source

Purpose

Draws a screen-space blur behind a panel by using the panel's local-to-screen origin.

Realm

Client

Parameters

Panel panel Panel whose area receives the blur.

number amount optional Blur amount. Defaults to 5.

number passes optional Initial blur pass value. Defaults to 0.2.

number alpha optional Blur draw alpha. Defaults to 255.

Returns

nil This function does not return a value.

Example Usage

  function PANEL:Paint(w, h)
      lia.derma.drawBlur(self, 5, 0.2, 255)
  end

lia.derma.drawBlackBlur(panel, amount, passes, alpha, darkAlpha)View Source

Purpose

Draws a screen-space blur behind a panel and overlays a dark translucent rectangle over the panel bounds.

Realm

Client

Parameters

Panel panel Panel whose area receives blur and darkening.

number amount optional Blur amount. Defaults to 6.

number passes optional Number of blur passes. Defaults to 5.

number alpha optional Blur draw alpha. Defaults to 255.

number darkAlpha optional Black overlay alpha. Defaults to 220.

Returns

nil This function does not return a value.

Example Usage

  function PANEL:Paint(w, h)
      lia.derma.drawBlackBlur(self, 6, 5, 255, 180)
  end

lia.derma.drawBlurAt(x, y, w, h, amount, passes, alpha)View Source

Purpose

Draws a screen-space blur inside an explicit rectangle.

Realm

Client

Parameters

number x Left screen coordinate.

number y Top screen coordinate.

number w Blur width.

number h Blur height.

number amount optional Blur amount. Defaults to 5.

number passes optional Initial blur pass value. Defaults to 0.2.

number alpha optional Blur draw alpha. Defaults to 255.

Returns

nil This function does not return a value.

Example Usage

  lia.derma.drawBlurAt(x, y, w, h, 5, 0.2, 255)

lia.derma.requestArguments(title, argTypes, onSubmit, defaults)View Source

Purpose

Opens a modal argument-entry window, creates controls from the requested argument types, validates input, and submits typed values through a callback.

Realm

Client

Parameters

string title optional Window title. Defaults to the localized enter-arguments text.

table argTypes Argument definitions. Supports ordered entries or keyed definitions using types such as string, table, boolean, number, int, and player.

function onSubmit optional Callback called with the result table, or false when cancelled.

table defaults optional Default values keyed by argument name.

Returns

Panel The created request frame.

Example Usage

  lia.derma.requestArguments(L("settings"), {name = "string", amount = "number"}, function(values) end)

lia.derma.createTableUI(title, columns, data, options, charID)View Source

Purpose

Creates a framed list-view table with columns, row data, optional right-click row actions, copy-row support, and optional net submission for row actions.

Realm

Client

Parameters

string title Frame title.

table columns Column definitions. Entries may be strings or tables with `name`, `field`, and optional `width`.

table data Rows to display.

table options optional Optional right-click actions for rows.

number charID optional Character ID sent with row action net messages.

Returns

Panel, Panel The created frame and `DListView` panel.

Example Usage

  local frame, list = lia.derma.createTableUI(L("players"), columns, rows, actions, charID)

lia.derma.openOptionsMenu(title, options)View Source

Purpose

Opens a simple centered options window from keyed callbacks or sequential option tables.

Realm

Client

Parameters

string title optional Title localization key or text. Defaults to options.

table options Either keyed callback functions or sequential tables containing `name` and `callback`.

Returns

Panel|nil The created frame, or nil when no valid options are supplied.

Example Usage

  lia.derma.openOptionsMenu("options", {reload = function() end})

lia.derma.drawEntText(ent, text, posY, alphaOverride)View Source

Purpose

Draws animated floating text above an entity when the viewer is within range.

Realm

Client

Parameters

Entity ent Entity above which text should be drawn.

string text Text to display.

number posY optional Additional screen-space Y offset.

number alphaOverride optional Optional alpha multiplier or 0-255 alpha value.

Returns

nil This function does not return a value.

Example Usage

  lia.derma.drawEntText(entity, L("vendor"), 0)

lia.derma.requestDropdown(title, options, callback, defaultValue)View Source

Purpose

Opens a dropdown selection dialog and calls a callback with the selected text and data when submitted.

Realm

Client

Parameters

string|table title optional Window title. Supports request-text localization helpers.

table options Options to add to the dropdown. Table entries may be `{text, data}` pairs.

function callback optional Callback called with selected text and selected data, or false when cancelled.

any|table defaultValue optional Optional default selection text or `{text, data}` pair.

Returns

Panel The created request frame.

Example Usage

  lia.derma.requestDropdown(L("select"), {{"One", 1}, {"Two", 2}}, function(text, data) end)

lia.derma.requestString(title, description, callback, defaultValue, maxLength)View Source

Purpose

Opens a text-entry dialog and calls a callback with the submitted string, or false when cancelled.

Realm

Client

Parameters

string|table title optional Window title. Supports request-text localization helpers.

string|table description optional Description shown above the entry.

function callback optional Callback called with the entered string or false.

string defaultValue optional Initial entry value.

number maxLength optional Optional maximum entry length.

Returns

Panel The created request frame.

Example Usage

  lia.derma.requestString(L("name"), L("enterName"), function(value) end, "", 32)

lia.derma.requestOptions(title, subTitle, options, callback, onCancel)View Source

Purpose

Opens an options-selection dialog that renders checkboxes and combo boxes from the supplied option definitions.

Realm

Client

Parameters

string|table title optional Window title. Supports request-text localization helpers.

string|table subTitle optional Optional subtitle or description.

table options Option definitions rendered as selectable controls.

function callback optional Callback called with selected options when submitted.

function onCancel optional Callback called when cancelled.

Returns

Panel The created request frame.

Example Usage

  lia.derma.requestOptions(L("options"), L("chooseOptions"), options, function(selected) end)

lia.derma.requestBinaryQuestion(title, question, callback, yesText, noText)View Source

Purpose

Opens a yes/no confirmation dialog and calls a callback with true or false.

Realm

Client

Parameters

string|table title optional Window title. Defaults to the localized question text.

string|table question optional Question text. Defaults to the localized confirmation text.

function callback optional Callback called with true for yes or false for no.

string|table yesText optional Custom yes button text.

string|table noText optional Custom no button text.

Returns

Panel The created request frame.

Example Usage

  lia.derma.requestBinaryQuestion(L("confirm"), L("areYouSure"), function(answer) end)

lia.derma.requestButtons(title, buttons, callback, description)View Source

Purpose

Opens a dialog containing a custom list of buttons and optional description text.

Realm

Client

Parameters

string|table title optional Window title. Defaults to select-option text.

table buttons Button definitions as strings or tables with text/callback/icon values.

function callback optional Fallback callback called with the selected index and text, or false when closed.

string|table description optional Optional description shown above the buttons.

Returns

Panel, table The created request frame and an array of created button panels.

Example Usage

  lia.derma.requestButtons(L("choose"), {"A", "B"}, function(index, text) end, L("pickOne"))

lia.derma.requestPopupQuestion(question, buttons)View Source

Purpose

Opens a compact question popup with custom buttons and per-button callbacks.

Realm

Client

Parameters

string|table question optional Question text. Defaults to the localized confirmation text.

table buttons Button definitions as strings or `{text, callback}` pairs.

Returns

Panel The created request frame.

Example Usage

  lia.derma.requestPopupQuestion(L("continue"), {{L("yes"), function() end}, L("no")})

Hooks

Library-specific hooks documented for this library.


InteractionMenuClosed()View Source

Purpose

Runs when an interaction or action menu panel is removed when hook emission is enabled.

Realm

Client


InteractionMenuOpened(panel)View Source

Purpose

Runs after an interaction or action menu panel is created when hook emission is enabled.

Realm

Client

Parameters

Panel panel The menu or tooltip panel that was opened.