Mercurial > wow > prospect-me
diff ProspectMe_Aurora.lua @ 0:69b46322ff1b v1.2.1-Alpha
Updated Prospect me for initial client v6.0.3 support. Warning, there may be bugs!
author | Vynn |
---|---|
date | Mon, 15 Dec 2014 22:51:49 -0500 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ProspectMe_Aurora.lua Mon Dec 15 22:51:49 2014 -0500 @@ -0,0 +1,68 @@ +--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 +