lotrointerface.com
Search Downloads

LoTROInterface SVN SortPack

[/] [trunk/] [JackdawPlugins/] [SortPack/] [Debug.lua] - Blame information for rev 111

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 102 MrJackdaw-1942
DW={}
2 MrJackdaw-1942
 
3 MrJackdaw-1942
Width=500
4 MrJackdaw-1942
Height=500
5 MrJackdaw-1942
Col=5
6 MrJackdaw-1942
 
7 MrJackdaw-1942
        --Make the window
8 MrJackdaw-1942
        DW.Window = Turbine.UI.Lotro.Window()
9 MrJackdaw-1942
        DW.Window:SetPosition( 100,0 )
10 MrJackdaw-1942
        DW.Window:SetSize(Width,Height)
11 MrJackdaw-1942
        DW.Window:SetVisible(false)
12 MrJackdaw-1942
 
13 MrJackdaw-1942
        DW.Window:SetText( "Debug Window")
14 MrJackdaw-1942
        DW.Window:SetZOrder(1000)
15 MrJackdaw-1942
 
16 MrJackdaw-1942
        DW.Frame={}
17 MrJackdaw-1942
 
18 MrJackdaw-1942
                DW.Frame=Frame()
19 MrJackdaw-1942
                DW.Frame:SetParent(DW.Window)
20 MrJackdaw-1942
                DW.Frame:SetSize(Width-10,Height-60)
21 MrJackdaw-1942
                DW.Frame:SetTop(40)
22 MrJackdaw-1942
 
23 MrJackdaw-1942
                DW.Frame.ScrollBar=Turbine.UI.Lotro.ScrollBar()
24 MrJackdaw-1942
                DW.Frame.ScrollBar:SetOrientation( Turbine.UI.Orientation.Vertical )
25 MrJackdaw-1942
 
26 MrJackdaw-1942
                DW.Frame.ListBox = Turbine.UI.ListBox()
27 MrJackdaw-1942
                DW.Frame.ListBox:SetParent( DW.Frame )
28 MrJackdaw-1942
                DW.Frame.ListBox:SetPosition( 10, 2 )
29 MrJackdaw-1942
                DW.Frame.ListBox:SetSize( Width-20, Height-64)
30 MrJackdaw-1942
                DW.Frame.ListBox:SetMaxItemsPerLine(Col)
31 MrJackdaw-1942
                DW.Frame.ListBox:SetOrientation( Turbine.UI.Orientation.Horizontal )
32 MrJackdaw-1942
                DW.Frame.ListBox:SetVerticalScrollBar( DW.Frame.ScrollBar )
33 MrJackdaw-1942
                DW.Frame.ScrollBar:SetParent(DW.Frame)
34 MrJackdaw-1942
                DW.Frame.ScrollBar:SetPosition(0,2)
35 MrJackdaw-1942
                DW.Frame.ScrollBar:SetHeight(Height-64)
36 MrJackdaw-1942
                DW.Frame.ScrollBar:SetWidth(10)
37 MrJackdaw-1942
 
38 MrJackdaw-1942
 
39 MrJackdaw-1942
function Debug()
40 MrJackdaw-1942
 
41 MrJackdaw-1942
local w1=20
42 107 MrJackdaw-1942
local w2=230
43 102 MrJackdaw-1942
local w3=30
44 MrJackdaw-1942
local w4=100
45 MrJackdaw-1942
local w5=30
46 MrJackdaw-1942
 
47 MrJackdaw-1942
local function label(w,s)
48 103 MrJackdaw-1942
        if s==nil then s="-" end
49 102 MrJackdaw-1942
        Geoff=Turbine.UI.Label()
50 MrJackdaw-1942
        Geoff:SetFont(Font)
51 MrJackdaw-1942
        Geoff:SetText(s)
52 MrJackdaw-1942
        Geoff:SetMouseVisible(false)
53 MrJackdaw-1942
        Geoff:SetSize(w,16)
54 MrJackdaw-1942
        DW.Frame.ListBox:AddItem(Geoff)
55 MrJackdaw-1942
end
56 MrJackdaw-1942
 
57 MrJackdaw-1942
                DW.Window:SetVisible(true)
58 MrJackdaw-1942
 
59 MrJackdaw-1942
                DW.Frame.ListBox:ClearItems()
60 MrJackdaw-1942
                        label(w1,"id")
61 MrJackdaw-1942
                        label(w2,"Name")
62 MrJackdaw-1942
                        label(w3,"Cat")
63 MrJackdaw-1942
                        label(w4,"CategoryText")
64 MrJackdaw-1942
                        label(w5,"Quality")
65 MrJackdaw-1942
 
66 103 MrJackdaw-1942
                local Category
67 MrJackdaw-1942
                local Quality
68 MrJackdaw-1942
                local CategoryText
69 MrJackdaw-1942
                local Name
70 MrJackdaw-1942
 
71 102 MrJackdaw-1942
        for i=1,backpack:GetSize() do
72 MrJackdaw-1942
                        local item = backpack:GetItem(i)
73 103 MrJackdaw-1942
                        if item~=nil then
74 MrJackdaw-1942
                                Category=item:GetCategory()
75 MrJackdaw-1942
                                Quality=item:GetQuality()
76 MrJackdaw-1942
                                CategoryText=ItemCategory[item:GetCategory()]
77 MrJackdaw-1942
                                Name=item:GetName()
78 MrJackdaw-1942
                        else
79 MrJackdaw-1942
                                Category=nil
80 MrJackdaw-1942
                                Quality=nil
81 MrJackdaw-1942
                                CategoryText=nil
82 MrJackdaw-1942
                                Name=nil
83 MrJackdaw-1942
                        end
84 102 MrJackdaw-1942
 
85 MrJackdaw-1942
                        label(w1,i)
86 MrJackdaw-1942
                        label(w2,Name)
87 MrJackdaw-1942
                        label(w3,Category)
88 MrJackdaw-1942
                        label(w4,CategoryText)
89 MrJackdaw-1942
                        label(w5,Quality)
90 MrJackdaw-1942
                end
91 MrJackdaw-1942
 
92 MrJackdaw-1942
end
93 MrJackdaw-1942
 

All times are GMT -5. The time now is 05:57 PM.


Our Network
EQInterface | EQ2Interface | Minion | WoWInterface | ESOUI | LoTROInterface | MMOUI | Swtorui