mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-17 21:53:46 +03:00
Upload
This commit is contained in:
47
lua/vgui/dtree_node_button.lua
Normal file
47
lua/vgui/dtree_node_button.lua
Normal file
@@ -0,0 +1,47 @@
|
||||
--[[
|
||||
| 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 = {}
|
||||
|
||||
function PANEL:Init()
|
||||
|
||||
self:SetTextInset( 32, 0 )
|
||||
self:SetContentAlignment( 4 )
|
||||
|
||||
end
|
||||
|
||||
function PANEL:Paint( w, h )
|
||||
|
||||
derma.SkinHook( "Paint", "TreeNodeButton", self, w, h )
|
||||
|
||||
--
|
||||
-- Draw the button text
|
||||
--
|
||||
return false
|
||||
|
||||
end
|
||||
|
||||
function PANEL:UpdateColours( skin )
|
||||
|
||||
if ( self:IsSelected() ) then return self:SetTextStyleColor( skin.Colours.Tree.Selected ) end
|
||||
if ( self.Hovered ) then return self:SetTextStyleColor( skin.Colours.Tree.Hover ) end
|
||||
|
||||
return self:SetTextStyleColor( skin.Colours.Tree.Normal )
|
||||
|
||||
end
|
||||
|
||||
function PANEL:GenerateExample()
|
||||
|
||||
-- Do nothing!
|
||||
|
||||
end
|
||||
|
||||
derma.DefineControl( "DTree_Node_Button", "Tree Node Button", PANEL, "DButton" )
|
||||
Reference in New Issue
Block a user