This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function CreateTestFrame(parent, text, color) | |
local frame = CreateFrame("Frame", nil, parent) | |
frame.Bg = frame:CreateTexture() | |
frame.Bg:SetAllPoints(frame) | |
frame.Bg:SetColorTexture(color:GetRGBA()) | |
frame.Text = frame:CreateFontString(nil, nil, "GameFontNormalHuge") | |
frame.Text:SetAllPoints(frame) | |
frame.Text:SetText(text) | |
frame:SetCollapsesLayout(true) | |
return frame |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local ScrollChild = CreateFrame("Frame") | |
ScrollChild:SetSize(750, 750) | |
local ScrollChildTexture = ScrollChild:CreateTexture() | |
ScrollChildTexture:SetPoint("CENTER") | |
ScrollChildTexture:SetTexture([[Interface\ICONS\TEMP]]) | |
local ScrollFrame = CreateFrame("ScrollFrame") | |
ScrollFrame:SetPoint("CENTER") | |
ScrollFrame:SetSize(500, 500) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local ScrollBox = CreateFrame("Frame", nil, UIParent, "WowScrollBox") | |
ScrollBox:SetPoint("CENTER") | |
ScrollBox:SetSize(300, 300) | |
ScrollBox:SetInterpolateScroll(true) | |
local ScrollBar = CreateFrame("EventFrame", nil, UIParent, "MinimalScrollBar") | |
ScrollBar:SetPoint("TOPLEFT", ScrollBox, "TOPRIGHT") | |
ScrollBar:SetPoint("BOTTOMLEFT", ScrollBox, "BOTTOMRIGHT") | |
ScrollBar:SetInterpolateScroll(true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LoadAddOn("Blizzard_RadialWheel") | |
local EmoteWedges = | |
{ | |
{ | |
type = "ROAR", | |
icon = "Ping_Wheel_Icon_OnMyWay", | |
text = "Test Wedge 1", | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local SettingsCategory = Settings.RegisterVerticalLayoutCategory("My AddOn") | |
local ParentSetting; | |
local ParentInitializer; | |
local function IsParentSelected() | |
return ParentSetting:GetValue() | |
end | |
do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- This example will configure an anchor to display the first private aura that | |
-- gets applied to the player. | |
-- | |
-- Multiple calls for the same aura index can be made. This will in effect | |
-- create multiple distinct displays for the same aura index. | |
local AuraFrame1 = CreateFrame("Frame", UIParent); | |
AuraFrame1:SetPoint("CENTER"); | |
AuraFrame1:SetSize(48, 48); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MyAddon_TabSystemDemoFrameMixin = {} | |
function MyAddon_TabSystemDemoFrameMixin:OnLoad() | |
TabSystemOwnerMixin.OnLoad(self) | |
self:SetTabSystem(self.TabSystem) | |
self.tabIndexPage1 = self:AddNamedTab("Page 1", self.TabPage1) | |
self.tabIndexPage2 = self:AddNamedTab("Page 2 (with truncated text)", self.TabPage2) | |
self.tabIndexPage3 = self:AddNamedTab("Page 3", self.TabPage3) | |
self:SetTab(self.tabIndexPage2) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local TextureParent = CreateFrame("Frame") | |
TextureParent:SetPoint("BOTTOMRIGHT", nil, "TOPLEFT") | |
TextureParent:SetSize(1, 1) | |
local TexturePool = CreateTexturePool(TextureParent) | |
local WatcherPool = CreateFramePool("Frame", TextureParent) | |
function ContinueOnTextureLoad(path, callback) | |
local texture = TexturePool:Acquire() | |
local watcher |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ScrollableTreeFrameMixin = {}; | |
function ScrollableTreeFrameMixin:OnLoad() | |
self.DataProvider = CreateTreeListDataProvider(); | |
for i = 1, 10 do | |
-- The data supplied to the insert calls is arbitrary; it can be accessed | |
-- from the 'node:GetData()' call later in the element initializer. | |
local level1 = self.DataProvider:Insert(format("Node %d", i)); | |
for j = 1, fastrandom(3, 6) do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Requires -Version 7.1 | |
<# | |
.SYNOPSIS | |
Generates an output document of atlases pulled from WoW client databases | |
suitable for use with the Texture Atlas Viewer addon. | |
#> | |
[CmdletBinding()] | |
param ( | |
# Client version to generate atlases for, eg. "9.2.0.42069". |
NewerOlder