GHI_SetSelectItemCursor

Pilus edited this page Aug 11, 2015 · 1 revision
Clone this wiki locally

Syntax:

GHI_SetSelectItemCursor(clickFunction, clearFunction, identifier)

Arguments:

GHI_SetCursor has 3 optional arguments.

clickFunction
''Function''
This is a function to happen when the UI is clicked by the user while the cursor is active.
clearFunction
''Function''
This is a function declared to happen if the user right clicks to clear the cursor.
identifier
''string''
An additional argument passed to the cursor.

Internal Arguments:

GHI_SetCursor() has 2 arguments that passed to the cursor's functions automatically.

GUID
''String''
This is the selected item's GUID.
frame
''table''
This is the frame in which the selected item is located.

Example:

local iconFind = function(id)

local name ,icon = GHI_GetItemInfo(id);

print(icon)

end

GHI_SetSelectItemCursor(iconFind)

This script sets the cursor to select an item and when clicked prints the item's icon path to the chat window.