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 Button = CreateFrame("Button", nil, UIParent, "UIPanelButtonTemplate"); | |
Button:SetPoint("CENTER"); | |
Button:SetText("Resistances"); | |
local ButtonFontString = Button:GetFontString(); | |
ButtonFontString:ClearAllPoints(); | |
ButtonFontString:SetPoint("CENTER", -5, -10); | |
-- FontStrings can't be rotated like textures, but you can fake it with | |
-- an animation that either infinitely repeats or just never ends. |
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 ContinuationRegistry = Mixin(CreateFrame("Frame"), CallbackRegistryMixin); | |
local function ProcessContinuations(registry, event) | |
ContinuationRegistry:UnregisterEvent(event); | |
ContinuationRegistry:TriggerEvent(event); | |
end | |
local function InvokeContinuation(func, event) | |
ContinuationRegistry:UnregisterCallback(event, func); | |
func(); -- May error, this is fine. |
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 ContentFrameMixin = CreateFromMixins(ResizeLayoutMixin); | |
function ContentFrameMixin:OnLoad() | |
self.texturePool = CreateTexturePool(self, "OVERLAY"); | |
end | |
function ContentFrameMixin:GeneratePage() | |
self.texturePool:ReleaseAll(); | |
local MIN_TEXTURE_HEIGHT = 20; |
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 SelectionDemoListItemMixin = CreateFromMixins(CallbackRegistryMixin); | |
SelectionDemoListItemMixin:GenerateCallbackEvents( | |
{ | |
"OnClick", | |
} | |
); | |
function SelectionDemoListItemMixin:OnLoad() | |
CallbackRegistryMixin.OnLoad(self); | |
self:SetScript("OnClick", self.OnClick); |
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 ScrollableListButtonMixin = CreateFromMixins(CallbackRegistryMixin); | |
ScrollableListButtonMixin:GenerateCallbackEvents( | |
{ | |
"OnClickThreeTimes", | |
} | |
); | |
function ScrollableListButtonMixin:OnLoad() | |
CallbackRegistryMixin.OnLoad(self); | |
self:SetScript("OnClick", self.OnClick); |
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_MacroUI"); | |
local function OnMacroPopupDialogAccepted() | |
local macroIndex = MacroFrame.selectedMacro; | |
local macroIcon = GetSpellorMacroIconInfo(MacroPopupFrame.selectedIcon); | |
if type(macroIcon) == "string" then | |
macroIcon = GetFileIDFromPath([[Interface\Icons\]] .. macroIcon); | |
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
ScrollableListItemMixin = {}; | |
function ScrollableListItemMixin:Init(elementData) | |
self.Background:SetColorTexture(elementData.color:GetRGBA()); | |
self.Text:SetText(elementData.text); | |
end | |
ScrollableListMixin = {}; | |
function ScrollableListMixin:OnLoad() |
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 WindowFrame = CreateFrame("Frame", nil, UIParent, "ButtonFrameTemplate") | |
WindowFrame:SetPoint("CENTER"); | |
WindowFrame:SetSize(640, 480); | |
ButtonFrameTemplate_HidePortrait(WindowFrame); | |
local ScrollBar = CreateFrame("EventFrame", nil, WindowFrame, "WowTrimScrollBar"); | |
ScrollBar:SetPoint("TOPRIGHT", -4, -60); | |
ScrollBar:SetPoint("BOTTOMRIGHT", -4, 28); | |
local EditFrame = CreateFrame("Frame", nil, WindowFrame, "ScrollingEditBoxTemplate"); |
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
AcceptSockets | |
C_AchievementInfo.GetRewardItemID | |
C_AchievementInfo.GetSupercedingAchievements | |
C_AchievementInfo.IsValidAchievement | |
C_AchievementInfo.SetPortraitTexture | |
C_EquipmentSet.AssignSpecToEquipmentSet | |
C_EquipmentSet.CanUseEquipmentSets | |
C_EquipmentSet.ClearIgnoredSlotsForSave | |
C_EquipmentSet.CreateEquipmentSet | |
C_EquipmentSet.DeleteEquipmentSet |