use of org.terasology.nui.databinding.InteriorMutationNotifyingBinding in project Terasology by MovingBlocks.
the class TypeWidgetTestScreen method newBinding.
protected <T> void newBinding(TypeInfo<T> type) {
Binding<T> binding = new InteriorMutationNotifyingBinding<>(new NotifyingBinding<T>() {
@Override
protected void onSet() {
dumpBindings();
}
}, this::dumpBindings);
bindings.put(type, binding);
UIWidget bindingWidget = typeWidgetLibrary.getWidget(binding, type).get();
String bindingLabelText = typeInfoToString(type);
mainContainer.addWidget(WidgetUtil.labelize(bindingWidget, bindingLabelText, TypeWidgetFactory.LABEL_WIDGET_ID));
}
Aggregations