\r
public TextComponent(ViewModelModifiable model, String text)\r
{\r
- super(model);\r
+ this(model, text, null);\r
+ }\r
+\r
+ public TextComponent(ViewModelModifiable model, String text, String name)\r
+ {\r
+ super(model, name);\r
this.text = text;\r
// If size is unset, it defaults to 0, which could prohibit this component from being rendered, which would prohibit the size being\r
// set to a better guess\r
static\r
{\r
ViewLogicModelAdapter.addComponentAdapter(new NoLogicAdapter<>(TextComponent.class));\r
- IndirectGUIComponentCreator.setComponentSupplier(TextComponent.class.getName(), (m, p) -> new TextComponent(m, p.getAsString()));\r
+ IndirectGUIComponentCreator.setComponentSupplier(TextComponent.class.getName(),\r
+ (m, p, n) -> new TextComponent(m, p.getAsString(), n));\r
}\r
}\r