aboutsummaryrefslogtreecommitdiff
path: root/gamemode/client/qpanels/quests.lua
blob: 1ca723bd63a6adc4c2ddb60540dd89d657dbfc02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
ART.RegisterInventorySheet(function()

    local width = ScrW()
    local height = ScrH()

    local questsheet = vgui.Create( "DPanel")
    questsheet.Paint = function(self,w,h) end

    --Display quests
    local questselector = vgui.Create( "DScrollPanel", questsheet )
    questselector:SetSize((width / 4) - 20, (height / 2) - 40)
    questselector:SetPos(0,0)
    local questinfo = vgui.Create("DScrollPanel", questsheet)
    questinfo:SetSize(width / 4, height / 2)
    questinfo:SetPos(0,height / 2)
    for k,v in pairs(LocalPlayer().Quests or {}) do
        print("Displaying quest:" .. k)
        local questbutton = vgui.Create( "DButton" , questselector )
        questbutton:Dock(TOP)
        questbutton:SetText(k)
        questbutton.DoClick = function()
            print("At point of clicking, art is:")
            PrintTable(ART)
            ART.GetQuest(k).DrawQuestInfo(questinfo,v)
        end
    end

    return "Quests", questsheet, "icon16/house.png"
end)