Mercurial > wow > prospect-me
comparison 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 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:69b46322ff1b |
---|---|
1 --To Do | |
2 --Create Item Frame | |
3 --Layout Item Frame (Icon, name, value, cost to prospect, prospect into) | |
4 --Create Scroll Frame/Child | |
5 --ability to remove items/results | |
6 --Ability to set prices of components. | |
7 --Prospect from the frame? | |
8 | |
9 local DebugID = "52183" | |
10 local FWIDTH = 1000 | |
11 local FHEIGHT = 1000 | |
12 local xOffset = 0 | |
13 local yOffset = 0 | |
14 | |
15 | |
16 local function CreateEntry (EntryID) | |
17 local FRAMEID = EntryID.."_Frame" | |
18 local ICONID = EntryID.."_Icon" | |
19 local NAMEID = EntryID.."_Name" | |
20 local COSTID = EntryID.."_Cost" | |
21 local VALUEID = EntryID.."_Value" | |
22 | |
23 --if PM_ResultsTable[EntryID] then | |
24 | |
25 local frame = CreateFrame("Frame", FRAMEID, UIParent) | |
26 frame:SetPoint("CENTER", xOffset, yOffset) | |
27 frame:SetSize(FWIDTH, FHEIGHT) | |
28 | |
29 local icon = CreateFrame("Button", ICONID, frame, "SecureActionButtonTemplate") | |
30 print(PM_ItemTable[EntryID].texture) | |
31 icon:SetPoint("TOP", 0,0) | |
32 icon:SetTexture(0,0,1) | |
33 | |
34 local name = frame:CreateFontString( NAMEID, nil, "GameFontNormal" ) | |
35 name:SetPoint("TOP", 0, 32) | |
36 name:SetText(PM_ItemTable[EntryID].name) | |
37 | |
38 local cost = frame:CreateFontString( COSTID, nil, "GameFontNormal" ) | |
39 cost:SetPoint("TOP", 16, 32) | |
40 cost:SetText(PM_FormatPrice(PM_ItemTable[EntryID].price * 5)) | |
41 | |
42 local value = frame:CreateFontString( VALUEID, nil, "GameFontNormal" ) | |
43 value:SetPoint("TOP", 16, 64) | |
44 value:SetText(PM_FormatPrice(PM_GetReturn(EntryID))) | |
45 | |
46 for i, k in pairs(PM_ResultsTable[EntryID]) do | |
47 local off = 128 | |
48 if i ~= timesProspected then | |
49 local RESULTID = i.."_Result" | |
50 local result = CreateFrame("Button", RESULTID, frame, "SecureActionButtonTemplate") | |
51 result:SetPoint("TOP",0, off) | |
52 result:Settexture(0,1,0) | |
53 result:SetText(PM_FormatPrice(PM_ItemTable[i].price)) | |
54 off = off + 32 | |
55 end | |
56 end | |
57 frame:Show() | |
58 frame:SetToplevel(true) | |
59 frame:SetFrameLevel(100) | |
60 --end | |
61 end | |
62 | |
63 function PM_Debug() | |
64 print("Preparing to Create Entry") | |
65 CreateEntry(DebugID) | |
66 print("Entry Created!") | |
67 end | |
68 |