RiftButton Frame

From Riftui Wiki

Jump to: navigation, search

A RiftButton is a special type of Frame that introduces new functions for rendering buttons. The button acts like a native Rift UI button.

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 button
local button = UI.CreateFrame("RiftButton", "SampleButton", context)
-- Set some text
button:SetText("Click Me!")
-- Put the button in the middle of the screen
button:SetPoint("CENTER", UIParent, "CENTER")
-- Run a function when the button is pressed
function button.Event:LeftPress ()
  print("Click!")
end
Personal tools
Namespaces
Variants
Actions
Menu
Wiki
Toolbox