Initial commit
This commit is contained in:
80
addons/f4/lua/smooth-f4menu/client/cl_smooth-f4menu-site.lua
Normal file
80
addons/f4/lua/smooth-f4menu/client/cl_smooth-f4menu-site.lua
Normal file
@@ -0,0 +1,80 @@
|
||||
local PANEL = {}
|
||||
function PANEL:Init()
|
||||
|
||||
SmoothSiteDPanel = vgui.Create( "DPanel", SmoothF4MenuFrame )
|
||||
SmoothSiteDPanel:SetPos( 50, 35 )
|
||||
SmoothSiteDPanel:SetSize( 950, 615 )
|
||||
SmoothSiteDPanel.Paint = function()
|
||||
draw.SimpleText(SmoothF4MenuFrame_Loading,"SmoothF4menuFontButton",SmoothSiteDPanel:GetWide()/2,SmoothSiteDPanel:GetTall()/2,Color(255,255,255),TEXT_ALIGN_CENTER,TEXT_ALIGN_CENTER)
|
||||
end
|
||||
|
||||
local SmoothOpenHtml = vgui.Create( "HTML", SmoothSiteDPanel )
|
||||
SmoothOpenHtml:SetSize(SmoothSiteDPanel:GetWide()-10, 570)
|
||||
SmoothOpenHtml:SetPos(5,0)
|
||||
SmoothOpenHtml:OpenURL( SmoothF4MenuFrame_SiteURL )
|
||||
SmoothOpenHtml.Think = function()
|
||||
SmoothOpenHtml:SetSize(SmoothSiteDPanel:GetWide()-10, 570)
|
||||
end
|
||||
|
||||
local OpenBtn = vgui.Create("DButton", SmoothSiteDPanel)
|
||||
OpenBtn:SetText("Открыть в браузере")
|
||||
OpenBtn:SetFont("SmoothF4menuFontButton")
|
||||
OpenBtn:SetPos(5, 575)
|
||||
OpenBtn:SetSize(SmoothSiteDPanel:GetWide()-10, 35)
|
||||
OpenBtn.Paint = function(self, w, h)
|
||||
if self:IsHovered() then
|
||||
draw.RoundedBox(0, 0, 0, w, h, Color(40, 40, 40, 255))
|
||||
self:SetTextColor(Color(255, 255, 255, 255))
|
||||
else
|
||||
draw.RoundedBox(0, 0, 0, w, h, Color(20, 20, 20, 255))
|
||||
self:SetTextColor(Color(200, 200, 200, 255))
|
||||
end
|
||||
end
|
||||
OpenBtn.DoClick = function()
|
||||
gui.OpenURL(SmoothF4MenuFrame_SiteURL)
|
||||
end
|
||||
|
||||
end
|
||||
vgui.Register( "SmoothSitePanel", PANEL, "Panel" )
|
||||
|
||||
|
||||
|
||||
|
||||
local PANEL = {}
|
||||
function PANEL:Init()
|
||||
|
||||
SmoothDonateDPanel = vgui.Create( "DPanel", SmoothF4MenuFrame )
|
||||
SmoothDonateDPanel:SetPos( 50, 35 )
|
||||
SmoothDonateDPanel:SetSize( 950, 615 )
|
||||
SmoothDonateDPanel.Paint = function()
|
||||
draw.SimpleText(SmoothF4MenuFrame_Loading,"SmoothF4menuFontButton",SmoothDonateDPanel:GetWide()/2,SmoothDonateDPanel:GetTall()/2,Color(255,255,255),TEXT_ALIGN_CENTER,TEXT_ALIGN_CENTER)
|
||||
end
|
||||
|
||||
local SmoothOpenHtml = vgui.Create( "HTML", SmoothDonateDPanel )
|
||||
SmoothOpenHtml:SetSize(SmoothDonateDPanel:GetWide()-10, 570)
|
||||
SmoothOpenHtml:SetPos(5,0)
|
||||
SmoothOpenHtml:OpenURL( SmoothF4MenuFrame_DonateURL )
|
||||
SmoothOpenHtml.Think = function()
|
||||
SmoothOpenHtml:SetSize(SmoothDonateDPanel:GetWide()-10, 570)
|
||||
end
|
||||
|
||||
local OpenBtn = vgui.Create("DButton", SmoothDonateDPanel)
|
||||
OpenBtn:SetText("Открыть в браузере")
|
||||
OpenBtn:SetFont("SmoothF4menuFontButton")
|
||||
OpenBtn:SetPos(5, 575)
|
||||
OpenBtn:SetSize(SmoothDonateDPanel:GetWide()-10, 35)
|
||||
OpenBtn.Paint = function(self, w, h)
|
||||
if self:IsHovered() then
|
||||
draw.RoundedBox(0, 0, 0, w, h, Color(40, 40, 40, 255))
|
||||
self:SetTextColor(Color(255, 255, 255, 255))
|
||||
else
|
||||
draw.RoundedBox(0, 0, 0, w, h, Color(20, 20, 20, 255))
|
||||
self:SetTextColor(Color(200, 200, 200, 255))
|
||||
end
|
||||
end
|
||||
OpenBtn.DoClick = function()
|
||||
gui.OpenURL(SmoothF4MenuFrame_DonateURL)
|
||||
end
|
||||
|
||||
end
|
||||
vgui.Register( "SmoothDonatePanel", PANEL, "Panel" )
|
||||
Reference in New Issue
Block a user