Dynamic Button Text label

Started by Ali107 on

Topic category: Feature requests and ideas for MCreator

Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Dynamic Button Text label

Basically, this will allow us to dynamically set the label/text of the button to whatever we want through procedures returning strings.

 

The interface should be similar to how you select the text within the label editor.

 

Like, there will be an option to choose fixed or by procedure return, fixed would use Component.translatable(), while by procedure return would of course use Component.literal().

 

Fixed, of course, should be within the init() function, while through a procedure return, the code would be inside the containerTick() function.