Search in sources :

Example 1 with ButtonStyled

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);
}
Also used : ToolTipManager(eidolons.libgdx.gui.tooltips.ToolTipManager) Blackout(eidolons.libgdx.screens.map.layers.Blackout) RollableGroup(eidolons.libgdx.gui.RollDecorator.RollableGroup) FullLogPanel(eidolons.libgdx.gui.panels.dc.logpanel.FullLogPanel) ContainerPanel(eidolons.libgdx.gui.panels.dc.inventory.container.ContainerPanel) OverlayTextPanel(eidolons.libgdx.gui.panels.dc.logpanel.text.OverlayTextPanel) SimpleLogPanel(eidolons.libgdx.gui.panels.dc.logpanel.SimpleLogPanel) RadialMenu(eidolons.libgdx.gui.controls.radial.RadialMenu) ButtonStyled(eidolons.libgdx.gui.generic.btn.ButtonStyled)

Example 2 with ButtonStyled

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());
}
Also used : InventoryDataSource(eidolons.libgdx.gui.panels.dc.inventory.datasource.InventoryDataSource) ButtonStyled(eidolons.libgdx.gui.generic.btn.ButtonStyled)

Aggregations

ButtonStyled (eidolons.libgdx.gui.generic.btn.ButtonStyled)2 RollableGroup (eidolons.libgdx.gui.RollDecorator.RollableGroup)1 RadialMenu (eidolons.libgdx.gui.controls.radial.RadialMenu)1 ContainerPanel (eidolons.libgdx.gui.panels.dc.inventory.container.ContainerPanel)1 InventoryDataSource (eidolons.libgdx.gui.panels.dc.inventory.datasource.InventoryDataSource)1 FullLogPanel (eidolons.libgdx.gui.panels.dc.logpanel.FullLogPanel)1 SimpleLogPanel (eidolons.libgdx.gui.panels.dc.logpanel.SimpleLogPanel)1 OverlayTextPanel (eidolons.libgdx.gui.panels.dc.logpanel.text.OverlayTextPanel)1 ToolTipManager (eidolons.libgdx.gui.tooltips.ToolTipManager)1 Blackout (eidolons.libgdx.screens.map.layers.Blackout)1