Im making a simple gui with some sliders that control server stuff so i can have super powers and stuff but i get huge fps drop.
This is how i make my menu
local function AddSlider(Parent, Text, X, Y, W, H, Min, Max, Decimals)
local Slider = vgui.Create("DSlider", Parent)
Slider:SetPos( X, Y )
Slider:SetSize( W, H )
Slider:SetText( Text )
Slider:SetMin( Min )
Slider:SetMax( Max )
Slider:SetDecimals( Decimals )
end
local function DrawFrame()
local Frame = vgui.Create( "DFrame" )
Frame:SetPos( 100, 100 )
Frame:SetSize( 300, 200 )
Frame:SetTitle( "My new Derma frame" )
Frame:SetDraggable( true )
Frame:MakePopup()
AddSlider(Frame, "Slider", 20, 20, 140, 10, 0, 100, 2)
//AddSlider(Parent, Text, X, Y, W, H, Min, Max, Decimals)
//I have like 30 of these on my dframe and i get fps drop when its opened
end
DrawFrame()
Sorry, you need to Log In to post a reply to this thread.