1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Sign up for news, events and more!

    You're currently visiting the official DarkRP Forums as a guest. Sign up now to participate in our community and we'll let you know when we have news.

Не работает кнопка

Discussion in 'DarkRP Modding Questions & Help' started by Alved, Oct 12, 2019.

Tags:
Thread Status:
Not open for further replies.
  1. Alved

    Alved New Member

    Не работает кнопка, может кто подсказать, в чем проблема. Заранее спасибо.
    Code (Text):
    PANEL = {}

    function PANEL:init()
    self:SetSize(600,400)
    self:SetPos(150,50)
    end

    function PANEL:Paint(w,h)
    draw.RoundedBox(0,50,50,w,h, Color(0,0,0,255))
    end

    vgui.Register("PlayerPanel", PANEL, "Panel")
    Code (Text):
    local MenuButton = vgui.Create('DButton')
    MenuButton:SetParent(Panel)
    MenuButton:SetText('')
    MenuButton:SetSize(170,60)
    MenuButton:SetPos(0,195)
    MenuButton.Paint = function()
    surface.SetDrawColor(35,35,35)
    surface.DrawRect(0,0,MenuButton:GetWide(),MenuButton:GetTall())
    draw.RoundedBox(0,0,0,6,Panel:GetTall(), Color(255,0,55))
    draw.SimpleText("Профессии",'Derma-Font_2', MenuButton:GetWide()/2,18, Color(250,13,68,255), TEXT_ALIGN_CENTER)
    end
    function MenuButton:DoClick()
    local playerPanel = Panel:Add("PlayerPanel")
    end
     
Thread Status:
Not open for further replies.

Share This Page