WidgetData
Key Components
Methods
Usage
WidgetData<MyWidget> myWidgetData = new WidgetData<>(
"MyWidget", // Name of the widget
"This is my custom widget.", // Description of the widget
() -> new MyWidget() // Factory method for creating the widget
);
// Create a new instance of MyWidget (Used in WidgetManager to load from a save file)
Widget myWidget = myWidgetData.createWidget();Last updated