Mercurial > wow > prospect-me
view ProspectMe_Aurora.lua @ 29:54c10e47c9e0 Prospect Me 2
TOC version for Prospect Me v2
author | Vynn <mischivin@gmail.com> |
---|---|
date | Tue, 08 Nov 2016 02:30:38 -0500 |
parents | 69b46322ff1b |
children |
line wrap: on
line source
--To Do --Create Item Frame --Layout Item Frame (Icon, name, value, cost to prospect, prospect into) --Create Scroll Frame/Child --ability to remove items/results --Ability to set prices of components. --Prospect from the frame? local DebugID = "52183" local FWIDTH = 1000 local FHEIGHT = 1000 local xOffset = 0 local yOffset = 0 local function CreateEntry (EntryID) local FRAMEID = EntryID.."_Frame" local ICONID = EntryID.."_Icon" local NAMEID = EntryID.."_Name" local COSTID = EntryID.."_Cost" local VALUEID = EntryID.."_Value" --if PM_ResultsTable[EntryID] then local frame = CreateFrame("Frame", FRAMEID, UIParent) frame:SetPoint("CENTER", xOffset, yOffset) frame:SetSize(FWIDTH, FHEIGHT) local icon = CreateFrame("Button", ICONID, frame, "SecureActionButtonTemplate") print(PM_ItemTable[EntryID].texture) icon:SetPoint("TOP", 0,0) icon:SetTexture(0,0,1) local name = frame:CreateFontString( NAMEID, nil, "GameFontNormal" ) name:SetPoint("TOP", 0, 32) name:SetText(PM_ItemTable[EntryID].name) local cost = frame:CreateFontString( COSTID, nil, "GameFontNormal" ) cost:SetPoint("TOP", 16, 32) cost:SetText(PM_FormatPrice(PM_ItemTable[EntryID].price * 5)) local value = frame:CreateFontString( VALUEID, nil, "GameFontNormal" ) value:SetPoint("TOP", 16, 64) value:SetText(PM_FormatPrice(PM_GetReturn(EntryID))) for i, k in pairs(PM_ResultsTable[EntryID]) do local off = 128 if i ~= timesProspected then local RESULTID = i.."_Result" local result = CreateFrame("Button", RESULTID, frame, "SecureActionButtonTemplate") result:SetPoint("TOP",0, off) result:Settexture(0,1,0) result:SetText(PM_FormatPrice(PM_ItemTable[i].price)) off = off + 32 end end frame:Show() frame:SetToplevel(true) frame:SetFrameLevel(100) --end end function PM_Debug() print("Preparing to Create Entry") CreateEntry(DebugID) print("Entry Created!") end