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

Contents

The SFX-Info-URL widget adds a two-column row that can be used to display simple, table-like data with selectable text on the right. Each instance of the widget produces a single row.

The SFX-Info-URL 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-URL")
row:SetLabel("Left Text")
row:SetText("Right Text")
frame:AddChild(row)

Note

Reference: AceGUI-3.0 Tutorial

Methods

The SFX-Info-URL 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 right text will be selectable and colored blue. When disabled, the widget functions the same as SFX-Info.
  • This widget handles its own tooltip.

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

-- 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-URL",
      },
   },
}

Fields

The SFX-Info-URL widget supports the standard input 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-URL".
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** ⚠️