mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-17 05:43:46 +03:00
Upload
This commit is contained in:
31
lua/vgui/dsizetocontents.lua
Normal file
31
lua/vgui/dsizetocontents.lua
Normal file
@@ -0,0 +1,31 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
|
||||
local PANEL = {}
|
||||
AccessorFunc( PANEL, "m_bSizeX", "SizeX", FORCE_BOOL )
|
||||
AccessorFunc( PANEL, "m_bSizeY", "SizeY", FORCE_BOOL )
|
||||
|
||||
function PANEL:Init()
|
||||
|
||||
self:SetMouseInputEnabled( true )
|
||||
|
||||
self:SetSizeX( true )
|
||||
self:SetSizeY( true )
|
||||
|
||||
end
|
||||
|
||||
function PANEL:PerformLayout()
|
||||
|
||||
self:SizeToChildren( self.m_bSizeX, self.m_bSizeY )
|
||||
|
||||
end
|
||||
|
||||
derma.DefineControl( "DSizeToContents", "", PANEL, "Panel" )
|
||||
Reference in New Issue
Block a user