User Tools

Site Tools


communityapi:ebf:comp_number_display

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
communityapi:ebf:comp_number_display [2021/11/03 19:36] minotoriouscommunityapi:ebf:comp_number_display [2021/11/08 15:57] (current) – [initDisplay] minotorious
Line 169: Line 169:
 ''void **initDisplay**()'' ''void **initDisplay**()''
  
-Initialises the number display. Must be called before a value can be set, you have to call this function in the ''init()'' method of your custom component that will be setting the values.+Initialises the number display.\\ 
 +In case you did not use the [[communityapi/ebf/building_function_number_display|BUILDING_FUNCTION_NUMBER_DISPLAY]] this method must be called before a value can be set, you have to call this method in the ''init()'' method of your custom component that will be setting the display values. 
 + 
 +**An Example of how this is done can be found in the Ruler mod, in case of problems contact me on discord!**
  
 ==== setValue ==== ==== setValue ====
Line 178: Line 181:
 | //''value''// | ''integer'' | The value to display | | //''value''// | ''integer'' | The value to display |
  
-Sets the value on the display. The value:\\+Sets the value on the display. The value:
   - Must have as many or fewer digits as the number of nodes set in ''DigitNodeNames''   - Must have as many or fewer digits as the number of nodes set in ''DigitNodeNames''
-  - Must be input as an integer value, i.e. to display 123.45 you need to use '':setValue(12345)'' and have positioned the decimal node accordingly in the ''NumberDisplayPrefab''+  - Must be input as an integer value, i.e. to display 123.45 you need to use '':setValue(12345)'' and have positioned the decimal point node accordingly in the ''NumberDisplayPrefab''
   - Can be positive or negative but the sign will only be displayed if you have included a node for it.   - Can be positive or negative but the sign will only be displayed if you have included a node for it.
  
communityapi/ebf/comp_number_display.1635982582.txt.gz · Last modified: 2021/11/03 19:36 by minotorious

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki