local w, h = ScrW()/2, ScrH()/2 local PANEL = {} function PANEL:Paint(w, h) draw.RoundedBox(0, 0, 0, w, h, Color(255,255,255,255)) end --[[ local data = { pages = {}, title = "", subtitle = "" } ]]-- function PANEL:Draw(dta) local data = dta if !data then data = {} end if !data.pages then data.pages = {""} end if !data.title then data.title = "" end if !data.subtitle then data.subtitle = "" end local content = "" for i = 2, #data.pages, 2 do content = content .. string.format([[

%s

%s

]], data.pages[i], data.pages[i+1] || "") end self.page = vgui.Create("DHTML", self) self.page:Dock(FILL) self.page:SetHTML(string.format([[

%s%s

%s

]], data.title, data.subtitle, data.pages[1]) .. content .. [[
]]) end function PANEL:Init() self:SetSize(w , h) self:SetPos(w/2, h/2) self:SetTitle("") self:MakePopup() end vgui.Register("Book", PANEL, "DFrame")