Search in sources :

Example 1 with TypeWidgetLibrary

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();
}
Also used : TypeWidgetLibrary(org.terasology.nui.widgets.types.TypeWidgetLibrary) ContextImpl(org.terasology.engine.context.internal.ContextImpl) Module(org.terasology.gestalt.module.Module)

Aggregations

ContextImpl (org.terasology.engine.context.internal.ContextImpl)1 Module (org.terasology.gestalt.module.Module)1 TypeWidgetLibrary (org.terasology.nui.widgets.types.TypeWidgetLibrary)1