Automated: create new component page |
This is no longer a stub. Added a description, added field description, added a usage description. |
||
Line 3: | Line 3: | ||
|Name=Quantity Text Editor Parser`1 | |Name=Quantity Text Editor Parser`1 | ||
}} | }} | ||
The '''QuantityTextEditorParser''' component takes in a <code>ParsedValue</code> and if there is a [[Component:TextEditor|TextEditor]] on the same [[Slot|slot]], it will send the value through the text editor and into either a [[Component:Text|Text]] or a [[Component:TextRenderer|TextRenderer]] component. | |||
{{Table ComponentFields | {{Table ComponentFields | ||
|ParseContinuously|Bool| | |ParseContinuously|Bool| If true, makes the value always update and parse. If false, it only updates when submitted. | ||
|UpdateStringFromValue|Bool| | |UpdateStringFromValue|Bool| If true, will update the string value from this parsed value. | ||
|ParsedValue|Double| | |ParsedValue|Double| The value that was read from the text field. | ||
|MinValue|Double| | |MinValue|Double| The minimum value that can be read. | ||
|MaxValue|Double| | |MaxValue|Double| The maximum value that can be read. | ||
|IgnoreOutOfRange|Bool| | |IgnoreOutOfRange|Bool| Ignores any value that is out of range from the min and max. | ||
|DefaultUnit|String| | |DefaultUnit|String| Changes the default unit to show in the text (especially if the <code>FormatUnit</code> is incorrect). | ||
|FormatUnit|String| | |FormatUnit|String| The unit to show in the text. | ||
|FormatNumber|String| | |FormatNumber|String| Formats the string. | ||
|CompoundFormatUnits|{{RootFieldType|SyncFieldList`1|[[Type:String|String]]}}|TypeAdv9=true| | |CompoundFormatUnits|{{RootFieldType|SyncFieldList`1|[[Type:String|String]]}}|TypeAdv9=true| Compounds units together (example: feet and inches for height). | ||
|CompoundUseLongNames|Bool| | |CompoundUseLongNames|Bool| Use the long version of names. | ||
|CompoundOverrideNames|Bool| | |CompoundOverrideNames|Bool| Overrides the names. | ||
|CompoundDiscardLastFraction|Bool| | |CompoundDiscardLastFraction|Bool| Discards the last fraction. | ||
|CompoundSeparator|String| | |CompoundSeparator|String| Separates the compound units. | ||
|CompoundZeroHandling|CompoundZeroHandling| | |CompoundZeroHandling|CompoundZeroHandling| Handles zeros for units. | ||
}} | }} | ||
== | == Usage == | ||
Place on the same [[Slot]] as a [[Component:TextEditor|TextEditor]] and anything entered into the text editor will be attempted to be parsed as a [[Quantity Types|quantity]] and output via the <code>ParsedValue</code> field. | |||
== Examples == | == Examples == | ||
Line 33: | Line 34: | ||
[[Category:Components{{#translation:}}|Quantity Text Editor Parser`1]] | [[Category:Components{{#translation:}}|Quantity Text Editor Parser`1]] | ||
[[Category:Generic Components{{#translation:}}|Quantity Text Editor Parser`1]] | [[Category:Generic Components{{#translation:}}|Quantity Text Editor Parser`1]] | ||
Latest revision as of 23:50, 12 September 2024
Component image
The QuantityTextEditorParser component takes in a ParsedValue
and if there is a TextEditor on the same slot, it will send the value through the text editor and into either a Text or a TextRenderer component.
Name | Type | Description |
---|---|---|
persistent
|
Bool | Determines whether or not this item will be saved to the server. |
UpdateOrder
|
Int | Controls the order in which this component is updated. |
Enabled
|
Bool | Controls whether or not this component is enabled. |
ParseContinuously
|
Bool | If true, makes the value always update and parse. If false, it only updates when submitted. |
UpdateStringFromValue
|
Bool | If true, will update the string value from this parsed value. |
ParsedValue
|
Double | The value that was read from the text field. |
MinValue
|
Double | The minimum value that can be read. |
MaxValue
|
Double | The maximum value that can be read. |
IgnoreOutOfRange
|
Bool | Ignores any value that is out of range from the min and max. |
DefaultUnit
|
String | Changes the default unit to show in the text (especially if the FormatUnit is incorrect).
|
FormatUnit
|
String | The unit to show in the text. |
FormatNumber
|
String | Formats the string. |
CompoundFormatUnits
|
direct SyncFieldList`1<String> | Compounds units together (example: feet and inches for height). |
CompoundUseLongNames
|
Bool | Use the long version of names. |
CompoundOverrideNames
|
Bool | Overrides the names. |
CompoundDiscardLastFraction
|
Bool | Discards the last fraction. |
CompoundSeparator
|
String | Separates the compound units. |
CompoundZeroHandling
|
CompoundZeroHandling | Handles zeros for units. |
Usage
Place on the same Slot as a TextEditor and anything entered into the text editor will be attempted to be parsed as a quantity and output via the ParsedValue
field.