This file contains hidden or 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 hidden or 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 hidden or 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 |
This file contains hidden or 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 BattlePetTrackerMixin = {}; | |
function BattlePetTrackerMixin:OnLoad() | |
self:RegisterUnitEvent("UNIT_SPELLCAST_SUCCEEDED", "player", ""); | |
self:RegisterEvent("COMPANION_UPDATE"); | |
self:SetScript("OnEvent", function(_, ...) self:OnEvent(...) end); | |
self.currentServerId = nil; | |
self.currentInstanceId = nil; | |
self.currentZoneUid = nil; |
This file contains hidden or 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 co_pool = {}; | |
local function co_main(fn, ...) | |
-- Main loop for a thread pool coroutine. Each resumption of the coroutine | |
-- as acquired from the pool should pass in a function and arguments to be | |
-- invoked. | |
-- | |
-- The function is expected to return either true or false as its first | |
-- return value; if true then the thread will stay alive, otherwise it | |
-- will die. A dead thread should not be released into the pool. |
This file contains hidden or 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 VertexCorner = tInvert({ | |
"TopLeft", | |
"BottomLeft", | |
"TopRight", | |
"BottomRight", | |
}); | |
local function CreateLinePool(parent, layer, subLayer) | |
local function CreateLine() | |
return parent:CreateLine(nil, layer, nil, subLayer); |
This file contains hidden or 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
-- | |
-- Creature GUID Inspector | |
-- | |
function GTT_CreatureInspect(self) | |
local _, unit = self:GetUnit(); | |
local guid = UnitGUID(unit or "none"); | |
local prefix = string.match(guid, "^([CVP][^l][^-]+)"); | |
if not guid or not prefix then |
This file contains hidden or 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
return { | |
"OnAnimFinished", | |
"OnAnimStarted", | |
"OnArrowPressed", | |
"OnAttributeChanged", | |
"OnButtonUpdate", | |
"OnChar", | |
"OnCharComposition", | |
"OnClick", | |
"OnColorSelect", |
This file contains hidden or 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
-- Set a user waypoint and begin tracking it, then run the below script and | |
-- enter any portal that will trigger a loading screen transition. | |
-- | |
-- Enjoy your new super-minimalistic user interface. | |
local ScriptHandlers = { | |
"OnLoad", | |
"OnAttributeChanged", | |
"OnSizeChanged", | |
"OnEvent", |
This file contains hidden or 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 function CreateSelectionModel(entries) | |
local selections = {}; | |
for i = 1, entries do | |
selections[i] = { | |
-- `name` is the only required key. There is color swatch support too, but that's | |
-- probably not needed. | |
name = "Item " .. i, | |
-- Other keys can be created as needed and made available to OnEntryClick. |