- 
                Notifications
    You must be signed in to change notification settings 
- Fork 0
Home
Welcome to the Figura-ActionLists documentation
Action lists are a powerful, practical and convenient tool that allows you to reduce the amount of code and time spent searching for the desired action among a huge pile of other actions. This is also a completely new element of the action wheel. Actions in them are performed either by scrolling, pressing the left mouse button or the right mouse button.
Any action list, like a regular action, is created and placed on any page of the action wheel
local myPage = action_wheel:newPage() -- Creating an Action Wheel Page
local myActionList = myPage:newActionList() -- Creating an Action listYou can customize the appearance of the action list in quite a lot of detail.
Sets the background color of the Action List
setColor()Parameters:
| Name | Type | Is required | Description | Default | 
|---|---|---|---|---|
| color | Vector3 | Reqired | The RGB value of the background, with each value between 0 and 1 | vec(0,0,0) | 
| shouldntMakeNewTitle | Boolean | Optional | If there is too much init instructions you can choose to don't update title | false | 
Returns:
| Type | Description | 
|---|---|
| table | Returns self for chaining | 
Example:
myActionList:setColor(vec(1, 0.5, 0,5)) -- Background is pink nowGets this Action List's background color
getColor()Returns:
| Type | Description | 
|---|---|
| Vector3 | The RGB background color for this Action List | 
Example:
myActionList:getColor()Sets the background color of the Action List when it is being hovered
setHoverColor()Parameters:
| Name | Type | Is required | Description | Default | 
|---|---|---|---|---|
| color | Vector3 | Reqired | The RGB value of the background, with each value between 0 and 1 | vec(0,0,0) | 
| shouldntMakeNewTitle | Boolean | Optional | If there is too much init instructions you can choose to don't update title | false | 
Returns:
| Type | Description | 
|---|---|
| table | Returns self for chaining | 
Example:
myActionList:setHoverColor(vec(1, 0.5, 0,5)) -- Background is pink when action list is being hoveredGets this Action List background hover color
getHoverColor()Returns:
| Type | Description | 
|---|---|
| Vector3 | The RGB background hover color for this action list | 
Example:
myActionList:getHoverColor()Sets the item of the Action List
setItem()Parameters:
| Name | Type | Is required | Description | Default | 
|---|---|---|---|---|
| item | String | Reqired | The item id for the item to be set | "minecraft:air" | 
| shouldntMakeNewTitle | Boolean | Optional | If there is too much init instructions you can choose to don't update title | false | 
Returns:
| Type | Description | 
|---|---|
| table | Returns self for chaining | 
Example:
myActionList:setItem("minecraft:stone")Sets the item of the Action List when it is being hovered
setHoverItem()Parameters:
| Name | Type | Is required | Description | Default | 
|---|---|---|---|---|
| item | String | Reqired | The item id for the item to be set | "minecraft:air" | 
| shouldntMakeNewTitle | Boolean | Optional | If there is too much init instructions you can choose to don't update title | false | 
Returns:
| Type | Description | 
|---|---|
| table | Returns self for chaining | 
Example:
myActionList:setHoverItem("minecraft:stone")Sets a Custom Texture to render in this Action List
setTexture()Parameters:
| Name | Type | Is required | Description | Default | 
|---|---|---|---|---|
| texture | Texture | Reqired | The texture that's shown in the Action List | nil | 
| shouldntMakeNewTitle | Boolean | Optional | If there is too much init instructions you can choose to don't update title | false | 
Returns:
| Type | Description | 
|---|---|
| table | Returns self for chaining | 
Example:
-- basic
myActionList:setTexture(textures["myTexture"])
-- advanced
-- Not available now :(Sets a Custom Texture to render while this Action List is being hovered
setHoverTexture()Parameters:
| Name | Type | Is required | Description | Default | 
|---|---|---|---|---|
| texture | Texture | Reqired | The texture that's shown in the Action List | nil | 
| shouldntMakeNewTitle | Boolean | Optional | If there is too much init instructions you can choose to don't update title | false | 
Returns:
| Type | Description | 
|---|---|
| table | Returns self for chaining | 
Example:
-- basic
myActionList:setHoverTexture(textures["myTexture"])
-- advanced
-- Not available now :(Sets the title of the Action List
setTitle()Parameters:
| Name | Type | Is required | Description | Default | 
|---|---|---|---|---|
| title | string | Reqired | The title of the Action List, shown when the Action List is hovered over | nil | 
| shouldntMakeNewTitle | Boolean | Optional | If there is too much init instructions you can choose to don't update title | false | 
Returns:
| Type | Description | 
|---|---|
| table | Returns self for chaining | 
Example:
myActionList:setTitle("Features")Gets this Action List title
getTitle()Returns:
| Type | Description | 
|---|---|
| string | The title of the Action List, shown when the Action List is hovered over | 
Example:
myActionList:getTitle()Sets the color of the Action List
setActionListColor()Parameters:
| Name | Type | Is required | Description | Default | 
|---|---|---|---|---|
| color | Vector3 | Reqired | The color of the Action List | vec(0.75, 0.75, 0.75) | 
| shouldntMakeNewTitle | Boolean | Optional | If there is too much init instructions you can choose to don't update title | false | 
Returns:
| Type | Description | 
|---|---|
| table | Returns self for chaining | 
Example:
myActionList:setActionListColor(vec(1, 0.5, 0.5))Gets the list's color of this Action List
getActionListColor()Returns:
| Type | Description | 
|---|---|
| Vector3 | The color of the Action List | 
Example:
myActionList:getActionListColor()Sets the color of Selected Action
setSelectedActionColor()Parameters:
| Name | Type | Is required | Description | Default | 
|---|---|---|---|---|
| color | Vector3 | Reqired | The color of selected Action in Action List | vec(1, 1, 1) | 
| shouldntMakeNewTitle | Boolean | Optional | If there is too much init instructions you can choose to don't update title | false | 
Returns:
| Type | Description | 
|---|---|
| table | Returns self for chaining | 
Example:
myActionList:setSelectedActionColor(vec(1, 0, 1))Gets the selected action's color of this Action List
getSelectedActionColor()Returns:
| Type | Description | 
|---|---|
| Vector3 | The color of selected Action in Action List | 
Example:
myActionList:getSelectedActionColor()Sets the length of the visible part on the screen
setVisualSize()Parameters:
| Name | Type | Is required | Description | Default | 
|---|---|---|---|---|
| size | number | Reqired | The length of the visible part of the list on the screen | 7 | 
| shouldntMakeNewTitle | Boolean | Optional | If there is too much init instructions you can choose to don't update title | false | 
Returns:
| Type | Description | 
|---|---|
| table | Returns self for chaining | 
Example:
myActionList:setVisualSize(15)Gets the length of the visible part of this Action List on the screen
getVisualSize()Returns:
| Type | Description | 
|---|---|
| number | The length of the visible part of the list on the screen | 
Example:
myActionList:getVisualSize()Set the Action List
setActionList()Parameters:
| Name | Type | Is required | Description | Default | 
|---|---|---|---|---|
| actionList | table | Reqired | The list of actions itself | {{title = "This action list is empty..."}} | 
| shouldntMakeNewTitle | Boolean | Optional | If there is too much init instructions you can choose to don't update title | false | 
Returns:
| Type | Description | 
|---|---|
| table | Returns self for chaining | 
Example:
myActionList:setActionList(table)Gets the Action List
getActionList()Returns:
| Type | Description | 
|---|---|
| table | The action list itself | 
Example:
myActionList:getActionList()Sets the index of the selected action
setSelectedActionIndex()Parameters:
| Name | Type | Is required | Description | Default | 
|---|---|---|---|---|
| index | number | Reqired | The index of the selected action | 1 | 
| shouldntMakeNewTitle | Boolean | Optional | If there is too much init instructions you can choose to don't update title | false | 
Returns:
| Type | Description | 
|---|---|
| table | Returns self for chaining | 
Example:
myActionList:setSelectedActionIndex(4)Gets the index of the selected action
getSelectedActionIndex()Returns:
| Type | Description | 
|---|---|
| number | The index of the selected action | 
Example:
myActionList:getSelectedActionIndex()It will give you a button(userdata) with which the list of actions is implemented.
Be careful, otherwise you will break everything. This is ONLY for debugging and advanced users.
getUserdata()Returns:
| Type | Description | 
|---|---|
| userdata | The button(userdata) with which the Action List is implemented | 
Example:
myActionList:getUserdata()An Action List itself is a table made up of other tables.
Each second-order table is an "action" within which the following tags are written
| Name | Type | Description | 
|---|---|---|
| title | string or table | The title of the Action List, shown when the Action List is hovered over. May be a table for future JSON transformation | 
| color | Vector3 | The color that will replace the default background color of the button when the action is selected | 
| hoverColor | Vector3 | The color that will replace the default background hover color of the button when the action is selected | 
| item | string | The item that will replace the default item of the button when the action is selected | 
| hoverItem | string | The item that will replace the default hover item of the button when the action is selected | 
| texture | Texture | The texture that will replace the default texture of the button when the action is selected | 
| hoverTexture | Texture | The texture that will replace the default hover texture color of the button when the action is selected | 
| onLeftClick | function | A function that will be executed when the action is selected and the user left-clicks on the button | 
| onRightClick | function | A function that will be executed when the action is selected and the user right-clicks on the button | 
| onScroll | function | A function that will be executed when the user selects this action by scrolling the list | 
Tip
The onScroll function has a scrollDirection parameter
actionList = {
}