use of org.terasology.i18n.TranslationSystemImpl in project Terasology by MovingBlocks.
the class ClientViewDistanceSystem method initialise.
@Override
public void initialise() {
propertyChangeListener = evt -> {
if (evt.getPropertyName().equals(RenderingConfig.VIEW_DISTANCE)) {
onChangeViewDistanceChange();
}
};
config.getRendering().subscribe(propertyChangeListener);
translationSystem = new TranslationSystemImpl(context);
}
use of org.terasology.i18n.TranslationSystemImpl in project Terasology by MovingBlocks.
the class ContextMenuUtilsTest method setupInput.
@BeforeClass
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(context.get(CanvasRenderer.class), context));
File file = new File(ContextMenuUtilsTest.class.getClassLoader().getResource("contextMenuBuilderInput.ui").getFile());
String content = null;
try {
content = Files.toString(file, Charsets.UTF_8);
} catch (IOException e) {
fail("Could not load input file");
}
inputTree = JsonTreeConverter.serialize(new JsonParser().parse(content));
}
Aggregations