Go to most recent revision |
Compare with Previous |
Blame |
View Log
DW={}
Width=500
Height=500
Col=5
--Make the window
DW.Window = Turbine.UI.Lotro.Window()
DW.Window:SetPosition( 100,0 )
DW.Window:SetSize(Width,Height)
DW.Window:SetVisible(false)
DW.Window:SetText( "Debug Window")
DW.Window:SetZOrder(1000)
DW.Frame={}
DW.Frame=Frame()
DW.Frame:SetParent(DW.Window)
DW.Frame:SetSize(Width-10,Height-60)
DW.Frame:SetTop(40)
DW.Frame.ScrollBar=Turbine.UI.Lotro.ScrollBar()
DW.Frame.ScrollBar:SetOrientation( Turbine.UI.Orientation.Vertical )
DW.Frame.ListBox = Turbine.UI.ListBox()
DW.Frame.ListBox:SetParent( DW.Frame )
DW.Frame.ListBox:SetPosition( 10, 2 )
DW.Frame.ListBox:SetSize( Width-20, Height-64)
DW.Frame.ListBox:SetMaxItemsPerLine(Col)
DW.Frame.ListBox:SetOrientation( Turbine.UI.Orientation.Horizontal )
DW.Frame.ListBox:SetVerticalScrollBar( DW.Frame.ScrollBar )
DW.Frame.ScrollBar:SetParent(DW.Frame)
DW.Frame.ScrollBar:SetPosition(0,2)
DW.Frame.ScrollBar:SetHeight(Height-64)
DW.Frame.ScrollBar:SetWidth(10)
function Debug()
local w1=20
local w2=230
local w3=30
local w4=100
local w5=30
local function label(w,s)
if s==nil then s="-" end
Geoff=Turbine.UI.Label()
Geoff:SetFont(Font)
Geoff:SetText(s)
Geoff:SetMouseVisible(false)
Geoff:SetSize(w,16)
DW.Frame.ListBox:AddItem(Geoff)
end
DW.Window:SetVisible(true)
DW.Frame.ListBox:ClearItems()
label(w1,"id")
label(w2,"Name")
label(w3,"Cat")
label(w4,"CategoryText")
label(w5,"Quality")
local Category
local Quality
local CategoryText
local Name
for i=1,backpack:GetSize() do
local item = backpack:GetItem(i)
if item~=nil then
Category=item:GetCategory()
Quality=item:GetQuality()
CategoryText=ItemCategory[item:GetCategory()]
Name=item:GetName()
else
Category=nil
Quality=nil
CategoryText=nil
Name=nil
end
label(w1,i)
label(w2,Name)
label(w3,Category)
label(w4,CategoryText)
label(w5,Quality)
end
end
Go to most recent revision |
Compare with Previous |
Blame
All times are GMT -5. The time now is 06:01 PM.