OnClientGUIScroll: Difference between revisions
Jump to navigation
Jump to search
ThePiotrek (talk | contribs) mNo edit summary |
m (→Parameters) |
||
Line 5: | Line 5: | ||
==Parameters== | ==Parameters== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
element | element scrolled | ||
</syntaxhighlight> | </syntaxhighlight> | ||
* ''' | * '''scrolled''': the [[Element/GUI/Scrollbar|scrollbar]] element that was scrolled. | ||
==Source== | ==Source== |
Revision as of 22:33, 2 April 2018
This event is fired when a GUI scrollbar is scrolled.
Parameters
element scrolled
- scrolled: the scrollbar element that was scrolled.
Source
The source of this event is the scrollbar element that got scrolled.
Example
This example outputs a message with the new scroll position when a scrollbar is scrolled.
function OnScroll(Scrolled) outputChatBox("The new scroll position is "..guiScrollBarGetScrollPosition(Scrolled)) end addEventHandler("onClientGUIScroll",getRootElement(),OnScroll)
See Also
GUI events
Input
GUI
- onClientGUIAccepted
- onClientGUIBlur
- onClientGUIChanged
- onClientGUIClick
- onClientGUIComboBoxAccepted
- onClientGUIDoubleClick
- onClientGUIFocus
- onClientGUIMouseDown
- onClientGUIMouseUp
- onClientGUIMove
- onClientGUIScroll
- onClientGUISize
- onClientGUITabSwitched
- onClientMouseEnter
- onClientMouseLeave
- onClientMouseMove
- onClientMouseWheel
Client event functions
- triggerLatentServerEvent
- triggerServerEvent
- Shared
- addEvent
- addEventHandler
- cancelEvent
- cancelLatentEvent
- getEventHandlers
- getLatentEventHandles
- getLatentEventStatus
- removeEventHandler
- triggerEvent
- wasEventCancelled