Arkadaşlar dosyasyı buraya bırakıyorum:
--
-- The default font used by everything derma.
--
İf ( System. Islinux() ) then.
Surface. Createfont( "dermadefault", {
Font = "dejavu sans",
Size = 14,
Weight = 500,
Extended = true.
} )
Surface. Createfont( "dermadefaultbold", {
Font = "dejavu sans",
Size = 14,
Weight = 800,
Extended = true.
} )
Else.
Surface. Createfont( "dermadefault", {
Font = "tahoma",
Size = 13,
Weight = 500,
Extended = true.
} )
Surface. Createfont( "dermadefaultbold", {
Font = "tahoma",
Size = 13,
Weight = 800,
Extended = true.
} )
End.
Surface. Createfont( "dermalarge", {
Font = "roboto",
Size = 32,
Weight = 500,
Extended = true.
} )
İnclude( "derma. Lua" )
İnclude( "derma_example. Lua" )
İnclude( "derma_menus. Lua" )
İnclude( "derma_animation. Lua" )
İnclude( "derma_utils. Lua" )
İnclude( "derma_gwen. Lua" )
Function derma_hook( panel, functionname, hookname, typename )
Panel[ functionname ] = function ( self, A, B, C, D )
Return derma. Skinhook( hookname, typename, self, A, B, C, D )
End.
End.
--[[
ConVar Functions.
To associate controls with convars. The controls automatically.
update from the value of the control, and automatically update.
the value of the convar from the control.
Controls must:
Call ConVarStringThink or ConVarNumberThink from the.
Think function to get any changes from the ConVars.
Have SetValue( value ) implemented, to receive the.
value.
--]]
Function derma_ınstall_convar_functions( panel )
Function panel: Setconvar( strconvar )
Self. M_strconvar = strconvar.
End.
Function panel: Convarchanged( strnewvalue )
İf (!self. M_strconvar || #self. M_strconvar < 2 ) then return end.
Runconsolecommand( self. M_strconvar, tostring( strnewvalue ) )
End.
-- Todo: Think only every 0.1 seconds?
Function PANEL:ConVarStringThink()
İf (!self. M_strconvar || #self. M_strconvar < 2 ) then return end.
Local strvalue = getconvarstring( self. M_strconvar )
İf ( self. M_strconvarvalue == strvalue ) then return end.
Self. M_strconvarvalue = strvalue.
Self: Setvalue( self. M_strconvarvalue )
End.
Function PANEL:ConVarNumberThink()
İf (!self. M_strconvar || #self. M_strconvar < 2 ) then return end.
Local numvalue = getconvarnumber( self. M_strconvar )
-- In case the convar is a "nan"
İf ( numvalue!= numvalue ) then return end.
İf ( self. M_strconvarvalue == numvalue ) then return end.
Self. M_strconvarvalue = numvalue.
Self: Setvalue( self. M_strconvarvalue )
End.
End.