use of com.bladecoder.engine.ui.InventoryButton in project bladecoder-adventure-engine by bladecoder.
the class DefaultSceneScreen method setUI.
@Override
public void setUI(final UI ui) {
this.ui = ui;
recorder = ui.getRecorder();
testerBot = ui.getTesterBot();
pie = new PieMenu(this);
textManagerUI = new TextManagerUI(ui.getSkin());
menuButton = new Button(ui.getSkin(), "menu");
dialogUI = new DialogUI(ui);
pointer = new ScenePointer(ui.getSkin());
inventoryUI = new InventoryUI(this, pointer);
inventoryButton = new InventoryButton(ui.getSkin(), inventoryUI);
uiMode = UIModes.valueOf(Config.getProperty(Config.UI_MODE, "TWO_BUTTONS").toUpperCase(Locale.ENGLISH));
if (Gdx.input.isPeripheralAvailable(Peripheral.MultitouchScreen) && uiMode == UIModes.TWO_BUTTONS) {
uiMode = UIModes.PIE;
}
pie.setVisible(false);
menuButton.addListener(new ClickListener() {
public void clicked(InputEvent event, float x, float y) {
ui.setCurrentScreen(Screens.MENU_SCREEN);
}
});
retrieveAssets(ui.getUIAtlas());
stage = new Stage(viewport);
stage.addActor(textManagerUI);
stage.addActor(dialogUI);
stage.addActor(inventoryButton);
stage.addActor(menuButton);
stage.addActor(inventoryUI);
stage.addActor(pie);
}
Aggregations