summaryrefslogtreecommitdiff
path: root/gamemode/vgui/vgui_panelbase.lua
diff options
context:
space:
mode:
Diffstat (limited to 'gamemode/vgui/vgui_panelbase.lua')
-rw-r--r--gamemode/vgui/vgui_panelbase.lua18
1 files changed, 9 insertions, 9 deletions
diff --git a/gamemode/vgui/vgui_panelbase.lua b/gamemode/vgui/vgui_panelbase.lua
index b7a4d19..83bbc0b 100644
--- a/gamemode/vgui/vgui_panelbase.lua
+++ b/gamemode/vgui/vgui_panelbase.lua
@@ -4,11 +4,11 @@ function PANEL:Init()
//self:SetTitle( "" )
self:ChooseParent()
-
+
end
function PANEL:ChooseParent()
-
+
end
function PANEL:OnMousePressed( mc )
@@ -21,15 +21,15 @@ end
function PANEL:Think()
if self.Dragging then
-
+
local x = gui.MouseX() - self.Dragging[1]
local y = gui.MouseY() - self.Dragging[2]
-
+
x = math.Clamp( x, 0, ScrW() - self:GetWide() )
y = math.Clamp( y, 0, ScrH() - self:GetTall() )
-
+
self:SetPos( x, y )
-
+
end
end
@@ -66,11 +66,11 @@ function PANEL:Paint()
draw.RoundedBox( 4, 0, 0, self:GetWide(), self:GetTall(), Color( 0, 0, 0, 255 ) )
draw.RoundedBox( 4, 1, 1, self:GetWide() - 2, self:GetTall() - 2, Color( 150, 150, 150, 150 ) )
-
+
if self.Title then
-
+
draw.SimpleText( self.Title, "ItemDisplayFont", 5, 5, Color( 255, 255, 255, 255 ), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER )
-
+
end
end