Skip to content

Instantly share code, notes, and snippets.

@mooreatv
mooreatv / problem.lua
Created October 20, 2020 05:00
issue with SecureFrameTemplate and MODIFIER_STATE_CHANGED (world of warcraft. wow api issue)
-- local f = CreateFrame("Frame", "TestFrame1", UIParent) -- works
local f = CreateFrame("Frame", "TestFrame1", UIParent, "SecureFrameTemplate") -- doesn't work with key/up/down
f:SetSize(100,100)
f:SetPoint("CENTER")
f:SetFrameStrata("FULLSCREEN")
f.bg = f:CreateTexture(nil, "BACKGROUND")
f.bg:SetAllPoints()
f.bg:SetColorTexture(.7, .2, .2)
f:SetAlpha(0.5)
f:SetScript("OnEnter", function()
@mooreatv
mooreatv / HybridScrollDemo.lua
Created October 10, 2019 23:36 — forked from Meorawr/HybridScrollDemo.lua
HybridScrollFrame Demo
local function CreateDemoModel(numItems)
local listModel = {};
for index = 1, numItems do
table.insert(listModel, {
text = string.format("List Item %1$d", index),
icon = string.format([[Interface\Icons\INV_Sword_%1$d]],
30 + (index % 30)),
});
end
[{"id":336518,"name":"Auction House DataBase aka AHDB","authors":[{"name":"MooreaTV","url":"https://www.curseforge.com/members/2060530-mooreatv?username=mooreatv","projectId":336518,"id":240201,"projectTitleId":null,"projectTitleTitle":null,"userId":2060530,"twitchId":7042637}],"attachments":[{"id":220132,"projectId":336518,"description":"","isDefault":false,"thumbnailUrl":"https://media.forgecdn.net/avatars/thumbnails/220/132/256/256/637018715370073161.png","title":"637018715370073161.png","url":"https://media.forgecdn.net/avatars/220/132/637018715370073161.png","status":1},{"id":220133,"projectId":336518,"description":"","isDefault":false,"thumbnailUrl":"https://media.forgecdn.net/avatars/thumbnails/220/133/256/256/637018726925502000.png","title":"637018726925502000.png","url":"https://media.forgecdn.net/avatars/220/133/637018726925502000.png","status":1},{"id":220137,"projectId":336518,"description":"","isDefault":true,"thumbnailUrl":"https://media.forgecdn.net/avatars/thumbnails/220/137/256/256/6370187315
@mooreatv
mooreatv / ahscan1.txt
Created August 22, 2019 16:06
AH db sample scan 1
This file has been truncated, but you can view the full file.
i168312,5,1199380,1249355,Maxmajere i168312,5,1199380,1249355,Maxmajere i168312,10,2398760,2498710,Maxmajere i168312,5,1199380,1249355,Maxmajere i168312,10,2398760,2498710,Maxmajere i168312,10,2398760,2498710,Maxmajere i168312,10,2398760,2498710,Maxmajere i168312,5,1199380,1249355,Maxmajere i168312,5,1199380,1249355,Maxmajere i168312,10,2398760,2498710,Maxmajere i169400::::::512::2:4796:1716:120,1,64856063,81070078,Benjidunn b2438:1:3:155:12:10,1,12987438,14079000,Benjidunn i13067:::::::11,1,4581500,5390000,Tinytino i31218::::::512::2:1706:3763:80,1,76500000,90000000,Tinytino i52489,1,1351449000,1589940000,Tinytino i58480,1,18606500,21890000,Tinytino i7528::::::512:54:2:1680:4277:120,1,6561232,7719097,Tinytino i128315,5,364957920,365032745,Gobtastic i128315,5,364957920,365032745,Gobtastic i128315,5,364957920,365032745,Gobtastic i128315,5,364957920,365032745,Gobtastic i164341:::::::11,1,34765000,40900000,Xuroy i159519::::::512::2:4796:1714:120,1,5865816,6900960,Xuroy i158743,1,602437242,2008124140,Xuroy i17011
@mooreatv
mooreatv / ahdump.lua
Created August 12, 2019 08:15
Wow classic stress test dump of AH
AHSaved = {
["ah"] = {
{
["char"] = "Mooreatv",
["ts"] = 1565597097,
["data"] = {
{
["info"] = {
"Short Bastard Sword of the Eagle", -- [1]
@mooreatv
mooreatv / minimal_scroll.lua
Created August 6, 2019 22:11
Minimal Scrolling Editbox (wow addon / lua)
local s = CreateFrame("ScrollFrame", nil, UIParent, "UIPanelScrollFrameTemplate") -- or your actual parent instead
s:SetSize(300,200)
s:SetPoint("CENTER")
local e = CreateFrame("EditBox", nil, s)
e:SetMultiLine(true)
e:SetFontObject(ChatFontNormal)
e:SetWidth(300)
s:SetScrollChild(e)
local text = ""
for i=1,100 do
@mooreatv
mooreatv / bindings.csv
Last active July 30, 2019 06:18
Dynamic Boxer Keybinds export example
Binding First key Second key
--- Movement Keys ---
MOVEANDSTEER BUTTON3
MOVEFORWARD W UP
MOVEBACKWARD S DOWN
TURNLEFT A LEFT
TURNRIGHT D RIGHT
STRAFELEFT Q
STRAFERIGHT E
JUMP SPACE NUMPAD0
@mooreatv
mooreatv / animation.lua
Created July 13, 2019 00:54
Sample glowing animation
if TST then
TST:Hide()
end
TST = CreateFrame("Frame")
local f = TST
f:SetSize(1,1)
f:SetScale(0.5) -- show pixels / zoom
local tg = f:CreateTexture()
@mooreatv
mooreatv / animation.lua
Created July 12, 2019 23:37
Sample animation... showing SetFromAlpha and SetToAlpha apparently backward
if TST then
TST:Hide()
end
TST = CreateFrame("Frame")
local f = TST
f:SetSize(1,1)
f:SetScale(2) -- show pixels / zoom
local tg = f:CreateTexture()
------------------------------------------------------------------------------
-- DevToolsFrameStack.lua
--
-- Frame stacking monitor
--
-- Globals: DevTools, SLASH_DEVTOOLS_FRAMESTACK1
-- Globals: BINDING_HEADER_DEVTOOLS
-- Globals: BINDING_NAME_DEVTOOLS_FRAMESTACK_*
---------------------------------------------------------------------------