use of org.terasology.engine.i18n.TranslationSystemImpl in project Terasology by MovingBlocks.
the class ContextMenuUtilsTest method setupInput.
@BeforeAll
public static void setupInput() {
context.put(InputSystem.class, new InputSystem());
context.put(TranslationSystem.class, new TranslationSystemImpl(context));
context.put(CanvasRenderer.class, new HeadlessCanvasRenderer());
context.put(NUIManager.class, new NUIManagerInternal((TerasologyCanvasRenderer) context.get(CanvasRenderer.class), context));
File file = new File(ContextMenuUtilsTest.class.getClassLoader().getResource("contextMenuBuilderInput.ui").getFile());
String content = null;
try {
content = Files.asCharSource(file, Charsets.UTF_8).read();
} catch (IOException e) {
fail("Could not load input file", e);
}
inputTree = JsonTreeConverter.serialize(new JsonParser().parse(content));
}
use of org.terasology.engine.i18n.TranslationSystemImpl in project Terasology by MovingBlocks.
the class ClientViewDistanceSystem method initialise.
@Override
public void initialise() {
viewDistanceListener = evt -> {
if (evt.getPropertyName().equals(RenderingConfig.VIEW_DISTANCE)) {
onChangeViewDistanceChange();
}
};
config.getRendering().subscribe(viewDistanceListener);
chunkLodsListener = evt -> {
if (evt.getPropertyName().equals(RenderingConfig.CHUNK_LODS)) {
onChangeViewDistanceChange();
}
};
config.getRendering().subscribe(chunkLodsListener);
translationSystem = new TranslationSystemImpl(context);
}
Aggregations