ActionWheelAPI

A global API which is used for customizing your player's Action Wheel

ActionWheelAPI.execute

Example by ChloeSpacedOut:
examplePage = action_wheel:createPage()
action_wheel:setPage(examplePage)
examplePage:newAction(1):onRightClick(function() log('chat spam :3') end)

events.TICK:register(function()
action_wheel:execute(1,true)
end)
-- this will only run if the action wheel is open
Executes the action of the given index
If the index is null,
it will execute the last selected action
A second parameter can be given to specify if it should be executed the left or right action
overload 1:
action_wheel:execute()
Method Property Fluent Description Representation
Return Value nil
overload 2:
action_wheel:execute(index)
Method Property Fluent Description Representation
index accepts an Integer
Return Value nil
overload 3:
action_wheel:execute(index, rightClick)
Method Property Fluent Description Representation
index accepts an Integer
rightClick accepts a Boolean
Return Value nil

ActionWheelAPI.newAction

Creates a new Action that is not automatically assigned to a Page
overload 1:
action_wheel:newAction()
Method Property Fluent Description Representation
Return Value an Action

ActionWheelAPI.isEnabled

Example by ChloeSpacedOut:
examplePage = action_wheel:createPage()
action_wheel:setPage(examplePage)

events.TICK:register(function()
if action_wheel:isEnabled() then
log("action wheel's is open!")
end
end)
Returns if the Action Wheel is being currently rendered or not
overload 1:
action_wheel:isEnabled()
Method Property Fluent Description Representation
Return Value a Boolean

ActionWheelAPI.setPage

Example by ChloeSpacedOut:
examplePage = action_wheel:createPage()
action_wheel:setPage(examplePage)
Sets the Page of the action wheel to the given Title or Page
overload 1:
action_wheel:setPage(pageTitle)
Method Property Fluent Description Representation
pageTitle accepts a String
Return Value nil
overload 2:
action_wheel:setPage(page)
Method Property Fluent Description Representation
page accepts a Page
Return Value nil

ActionWheelAPI.getCurrentPage

Returns the current set Page from the Action Wheel, or NIL if no Page has been set
overload 1:
action_wheel:getCurrentPage()
Method Property Fluent Description Representation
Return Value either a Page or nil

ActionWheelAPI.getPage

Example by ChloeSpacedOut:
Returns a stored Page by the given title
If no title is given,
returns a table with all registered Pages
overload 1:
action_wheel:getPage(pageTitle)
Method Property Fluent Description Representation
pageTitle accepts a String
Return Value either a Page or nil

ActionWheelAPI.newPage

Example by ChloeSpacedOut:
Creates a new Page for the action wheel
A Title can be given to store this page internally
If no Title is given,
the Page will just be returned from this function
overload 1:
action_wheel:newPage()
Method Property Fluent Description Representation
Return Value a Page
overload 2:
action_wheel:newPage(title)
Method Property Fluent Description Representation
title accepts a String
Return Value a Page

ActionWheelAPI.getSelected

Example by ChloeSpacedOut:
examplePage = action_wheel:createPage()
action_wheel:setPage(examplePage)
for slot = 1,8 do
examplePage:newAction(slot)
end

events.TICK:register(function()
log(action_wheel:getSelected())
end)
-- returns even if the action wheel is closed
Returns the index of the currently selected action
overload 1:
action_wheel:getSelected()
Method Property Fluent Description Representation
Return Value an Integer

ActionWheelAPI.leftClick

Example by ChloeSpacedOut:
examplePage = action_wheel:createPage('pageName')
action_wheel:setPage(examplePage)

function action_wheel.leftClick()
log('you just left clicked while in the action wheel!')
end
Function that is executed when the left mouse button is clicked
field signature:
leftClick
Method Property Fluent Description Representation
Field Type a function that takes nothing and will return anything
() -> AnyType

ActionWheelAPI.rightClick

Example by ChloeSpacedOut:
examplePage = action_wheel:createPage('pageName')
action_wheel:setPage(examplePage)

function action_wheel.rightClick()
log('you just left clicked while in the action wheel!')
end
Function that is executed when the right mouse button is clicked
field signature:
rightClick
Method Property Fluent Description Representation
Field Type a function that takes nothing and will return anything
() -> AnyType

ActionWheelAPI.scroll

Example by ChloeSpacedOut:
examplePage = action_wheel:createPage('pageName')
action_wheel:setPage(examplePage)

function action_wheel.scroll(direction)
log(direction)
end
Function that is executed when the mouse is scrolled
field signature:
scroll
Method Property Fluent Description Representation
Field Type a function that takes a Number and will return anything
a a