OnClientGUIScroll: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
Line 10: Line 10:


==Source==
==Source==
The [[event system#Event source|source]] of this event is root element.
The [[event system#Event source|source]] of this event is the scrollbar element that got scrolled.


==Example==  
==Example==  

Revision as of 17:25, 24 August 2010

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


Client event functions