OnClientGUIScroll: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
Line 24: Line 24:


==See Also==
==See Also==
===GUI events===
{{GUI_events}}
{{GUI_events}}
===Client event functions===
===Client event functions===
{{Client_event_functions}}
{{Client_event_functions}}

Revision as of 14:31, 20 May 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

Input

GUI


Client event functions