SFX Info - SFX-WoW/AceGUI-3.0_SFX-Widgets GitHub Wiki

Contents

The SFX-Info widget adds a two-column row that can be used to display simple, tabular data. Each instance of the widget produces a single row.

The SFX-Info widget can be used as a standard AceGUI-3.0 widget or can be referenced in an AceConfig-3.0 options table.

To use this widget with AceGUI-3.0, reference it as you would any other widget.

Example

local row = AceGUI:Create("SFX-Info")
row:SetLabel("Left Text")
row:SetText("Right Text")
frame:AddChild(row)

Note

Reference: AceGUI-3.0 Tutorial

Methods

The SFX-Info widget supports the following widget methods.

Method Return Default Description
:GetText string "" Returns the right text.
Method Parameter Default Description
:SetColon string ":" Sets the column separator.
:SetDisabled boolean nil Sets the disabled state.
:SetLabel string "" Sets the left text.
:SetText string "" Sets the right text.

Notes

  • The column separator's width is limited to a single character.
  • When enabled, the widget will display a tooltip. Disabling the widget disables the tooltip.

To use this widget with AceConfigDialog-3.0, you'll need to pass "SFX-Info" to the dialogControl field of a control entry in your options table and specify the type as "input".

Example

-- Get Function
local function getFunc(Info)
   return Info.arg
end

-- Set Function
local function setFunc() end

-- Options Table
local Options = {
   type = "group",
   name = "Options",
   args = {
      Row1 = {
         type = "input",
         name = "Left Text",
         --desc = "Tooltip",
         arg = "Right Text",
         get = getFunc,
         set = setFunc,
         order = 1,
         disabled = true,
         dialogControl = "SFX-Info",
      },
   },
}

Fields

The SFX-Info widget supports the standard input control fields.

Field Type Value Description
arg variable - Optional. See the notes for details.
desc string "Tooltip" Optional. The text that appears in the body of the tooltip, if enabled.
dialogControl string "SFX-Info" Sets the widget type. This must be set to "SFX-Info".
disabled boolean nil Optional. Sets the disabled state.
get function getFunc A function reference for getting the right text.
name string "Left Text" The text that appears on the left.
set function setFunc A function reference for setting the right text.
type string "input" Sets the control type. This must be set to "input".

Notes

  • When enabled, the widget will display a tooltip. Disabling the widget disables the tooltip.
  • In order for the right text to be set properly, a function must be assigned to the get field. This can be a custom function that returns the text or it can just be a simple, reusable function that returns the value of arg, which can be assigned the value of the right text.
  • The set field is generally used with a function that saves user input. Since this widget doesn't support user input, its recommended to assign a no-op function to this field, if only to prevent an error.
⚠️ **GitHub.com Fallback** ⚠️