RiftCheckbox Frame

From Riftui Wiki

Jump to: navigation, search

A RiftCheckbox is a special type of Frame that introduces a method for creating checkboxes,

Contents

Creation

See UI.CreateFrame()

Methods

Inherits all functions from Frame and includes new methods:


Events

Inherits all Events from Frame and includes a new event:

Example

-- Create our context
local context = UI.CreateContext("SampleContext")
-- Create our checkbox
local check = UI.CreateFrame("RiftCheckbox", "SampleCheckBox", context)
-- Put the checkbox in the middle of the screen
check:SetPoint("CENTER", UIParent, "CENTER")
-- When the state is changed, see whether the checkbox is checked or uchecked and respond accordingly.
function check.Event:CheckboxChange ()
 if check:GetChecked() then
  print("Checked!")
 else
  print("Unchecked!")
 end
end
Personal tools
Namespaces
Variants
Actions
Menu
Wiki
Toolbox