Profectus / data/common / ResetButtonOptions
Interface: ResetButtonOptions ​
An object that configures a ResetButton
Extends ​
Properties ​
canClick? ​
optionalcanClick:MaybeRefOrGetter<boolean>
Whether or not this button can currently be clicked. Defaults to checking the current gain amount is greater than minimumGain
Overrides ​
Defined in ​
profectus/src/data/common.tsx:51
classes? ​
optionalclasses:MaybeRefOrGetter<Record<string,boolean>>
Dictionary of CSS classes to apply to this feature.
Inherited from ​
Defined in ​
conversion ​
conversion:
Conversion
The conversion the button uses to calculate how much resources will be gained on click
Defined in ​
profectus/src/data/common.tsx:30
display? ​
optionaldisplay:MaybeGetter<Renderable>
The content to display on the button. By default, this includes the reset description, and amount of currency to be gained.
Overrides ​
Defined in ​
profectus/src/data/common.tsx:46
minimumGain? ​
optionalminimumGain:MaybeRefOrGetter<DecimalSource>
When canClick is left to its default, minimumGain is used to only enable the reset button when a sufficient amount of currency to gain is available.
Defined in ​
profectus/src/data/common.tsx:55
onClick()? ​
optionalonClick: (e?) =>void
A function that is called when the clickable is clicked.
Parameters ​
e? ​
Returns ​
void
Inherited from ​
Defined in ​
profectus/src/features/clickables/clickable.tsx:50
onHold? ​
optionalonHold:VoidFunction
A function that is called when the clickable is held down.
Inherited from ​
Defined in ​
profectus/src/features/clickables/clickable.tsx:52
resetDescription? ​
optionalresetDescription:MaybeRefOrGetter<string>
Text to display on low conversion amounts, describing what "resetting" is in this context. Defaults to "Reset for ".
Defined in ​
profectus/src/data/common.tsx:39
resetTime? ​
optionalresetTime:Persistent<DecimalSource>
A persistent ref to track how much time has passed since the last time this tree node was reset.
Defined in ​
profectus/src/data/common.tsx:57
showNextAt? ​
optionalshowNextAt:MaybeRefOrGetter<boolean>
Whether or not to show how much currency would be required to make the gain amount increase.
Defined in ​
profectus/src/data/common.tsx:41
style? ​
optionalstyle:MaybeRefOrGetter<CSSProperties>
CSS to apply to this feature.
Inherited from ​
Defined in ​
tree ​
tree:
Tree
The tree this reset button is apart of
Defined in ​
profectus/src/data/common.tsx:32
treeNode ​
treeNode:
TreeNode
The specific tree node associated with this reset button
Defined in ​
profectus/src/data/common.tsx:34
visibility? ​
optionalvisibility:MaybeRefOrGetter<boolean | Visibility>
Whether this feature should be visible.