use of org.terasology.nui.widgets.types.TypeWidgetLibrary in project Terasology by MovingBlocks.
the class NUIManagerInternal method initialiseControlWidget.
private <T extends ControlWidget> void initialiseControlWidget(T overlay, ResourceUrn screenUri) {
ContextImpl timedContextForModulesWidgets = new ContextImpl(this.context);
Module declaringModule = moduleEnvironment.get(screenUri.getModuleName());
TypeWidgetLibrary moduleLibrary = new TypeWidgetLibraryImpl(typeWidgetFactoryRegistry, declaringModule, this.context);
context.put(TypeWidgetLibrary.class, moduleLibrary);
InjectionHelper.inject(overlay, timedContextForModulesWidgets);
overlay.initialise();
}
Aggregations