Garry's Mod Wiki

DSlider:SetLockX

DSlider:SetLockX( number lockX = nil )

Description

Sets the lock on the X axis.

For example the value 0.5 will lock the draggable panel to half the width of the slider's panel.

Arguments

1 number lockX = nil
Set to nil to reset lock.

The value range is from 0 to 1.

Example

Example of a slider that can be dragged on the X and Y axis.

local frame = vgui.Create( "DFrame" ) frame:SetSize( 500, 300 ) frame:Center() frame:MakePopup() local Slider = vgui.Create( "DSlider", frame ) Slider:SetPos( 50, 50 ) Slider:SetSize( 100, 100 ) Slider:SetLockX() Slider:SetLockY()

Page Links


Special Pages


Wikis

?

Render Time: 35ms

DB GetPage 6
Generate Html 2
SaveChanges (1) 12
Render Body 0
Render Sidebar 11