mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2025-05-12 21:11:05 +00:00
Buyable and clickable trees
This commit is contained in:
parent
d015d0177c
commit
ff2fc625f7
6 changed files with 45 additions and 10 deletions
|
@ -77,4 +77,8 @@ You can use these features along with it:
|
|||
|
||||
- showRespec(): **optional**. A function determining whether or not to show the button, if respecBuyables is defined. Defaults to true if absent.
|
||||
|
||||
- respecMessage: **optional**. A custom confirmation message on respec, in place of the default one.
|
||||
- respecMessage: **optional**. A custom confirmation message on respec, in place of the default one.
|
||||
|
||||
|
||||
|
||||
- branches: **optional**, This is primarially useful for buyable trees. An array of buyable ids. A line will appear from this buyable to all of the buyables in the list. Alternatively, an entry in the array can be a 2-element array consisting of the buyable id and a color value. The color value can either be a string with a hex color code, or a number from 1-3 (theme-affected colors). A third element in the array optionally specifies line width.
|
|
@ -55,3 +55,7 @@ You can also use these features on the clickables object to add a button above a
|
|||
- masterButtonText: **optional**. Text to display on the Master Button.
|
||||
|
||||
- showMasterButton(): **optional**. A function determining whether or not to show the button, if masterButtonPress is defined. Defaults to true if absent.
|
||||
|
||||
|
||||
|
||||
- branches: **optional**, This is primarially useful for clickable trees. An array of clickable ids. A line will appear from this clickable to all of the clickables in the list. Alternatively, an entry in the array can be a 2-element array consisting of the clickable id and a color value. The color value can either be a string with a hex color code, or a number from 1-3 (theme-affected colors). A third element in the array optionally specifies line width.
|
|
@ -62,7 +62,7 @@ These are the existing components, but you can create more in [components.js](/j
|
|||
- tree: Displays a tree. The argument is an array of arrays containing the names of the nodes in the tree (first by row, then by column)
|
||||
[See here for more information on tree layouts and nodes!](trees-and-tree-customization.md)
|
||||
|
||||
- upgrade-tree: Displays a of upgrades from this layer. The argument is an array of arrays containing the ids of the upgrades in the tree (first by row, then by column)
|
||||
- upgrade-tree, buyable-tree, clickable-tree: Displays a tree of upgrades/buyables/clickables from this layer. The argument is an array of arrays containing the ids of the upgrade/etc in the tree (first by row, then by column). A tree can only have one type of component in it.
|
||||
|
||||
- toggle: A toggle button that toggles a bool value. The argument is a pair that identifies the location in player of the bool to toggle, e.g. `[layer, id]`. 'layer' also affects the color of the toggle.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue