use of eidolons.libgdx.gui.generic.btn.ButtonStyled in project Eidolons by IDemiurge.
the class GuiStage method init.
protected void init() {
gameMenu = createGameMenu();
addActor(gameMenu);
gameMenu.setPosition(GdxMaster.centerWidth(gameMenu), GdxMaster.centerHeight(gameMenu));
ButtonStyled menuButton = new ButtonStyled(STD_BUTTON.OPTIONS, () -> gameMenu.open());
menuButton.setPosition(GdxMaster.getWidth() - menuButton.getWidth(), GdxMaster.getHeight() - menuButton.getHeight());
addActor(menuButton);
// ButtonStyled helpButton = new ButtonStyled(STD_BUTTON.HELP, () ->
// GuiEventManager.trigger(SHOW_TEXT_CENTERED, HelpMaster.getHelpText()));
// helpButton.setPosition(menuButton.getX() - helpButton.getWidth(),
// GdxMaster.getHeight() - helpButton.getHeight());
// addActor(helpButton);
SimpleLogPanel log = new SimpleLogPanel();
RollableGroup decorated = RollDecorator.decorate(log, FACING_DIRECTION.EAST);
addActor(decorated);
decorated.setPosition(GdxMaster.getWidth() - decorated.getWidth(), 0);
addActor(blackout = new Blackout());
addActor(new FullLogPanel(100, 200));
radial = new RadialMenu();
addActor(radial);
addActor(tooltips = new ToolTipManager(this));
textPanel = new OverlayTextPanel();
addActor(textPanel);
textPanel.setPosition(GdxMaster.centerWidth(textPanel), GdxMaster.centerHeight(textPanel));
textPanel.close();
containerPanel = new ContainerPanel();
addActor(containerPanel);
containerPanel.setPosition(GdxMaster.centerWidth(containerPanel), GdxMaster.centerHeight(containerPanel));
containerPanel.setVisible(false);
bindEvents();
gameMenu.setZIndex(Integer.MAX_VALUE);
setDebugAll(false);
}
use of eidolons.libgdx.gui.generic.btn.ButtonStyled in project Eidolons by IDemiurge.
the class InventoryWithAction method initButtonListeners.
private void initButtonListeners() {
final InventoryDataSource source = (InventoryDataSource) getUserObject();
ButtonStyled button = (ButtonStyled) doneButton.getActor();
button.clearListeners();
button.addListener(source.getDoneHandler());
// button.setDisabled(source.isDoneDisabled());
// button = (ButtonStyled) cancelButton.getActor();
// button.addListener(source.getCancelHandler());
// button.setDisabled(source.isCancelDisabled());
// button = (ButtonStyled) undoButton.getActor();
// button.addListener(source.getUndoHandler());
// button.setDisabled(source.isUndoDisabled());
}
Aggregations