Search in sources :

Example 1 with GameDialogue

use of eidolons.game.battlecraft.logic.meta.scenario.dialogue.GameDialogue in project Eidolons by IDemiurge.

the class UnitViewFactory method createListener.

public static ClickListener createListener(BattleFieldObject bfObj) {
    return new BattleClickListener() {

        @Override
        public boolean touchDown(InputEvent event, float x, float y, int pointer, int button) {
            // event.getButton() == Input.Buttons.RIGHT;
            return true;
        }

        @Override
        public void touchUp(InputEvent event, float x, float y, int pointer, int button) {
            if (IntroTestLauncher.running) {
                ScenarioMetaMaster m = new ScenarioMetaMaster("Pride and Treachery");
                // new LinearDialogue();
                GameDialogue dialogue = null;
                dialogue = bfObj.getGame().getMetaMaster().getDialogueFactory().getDialogue("Interrogation");
                List<DialogScenario> list = SceneFactory.getScenes(dialogue);
                GuiEventManager.trigger(GuiEventType.DIALOG_SHOW, list);
            }
            if (event.getButton() == Input.Buttons.RIGHT) {
                GuiEventManager.trigger(CREATE_RADIAL_MENU, bfObj);
                event.handle();
                event.stop();
            } else {
                if (event.getButton() == Buttons.LEFT)
                    if (isAlt() || isShift() || isControl())
                        try {
                            DefaultActionHandler.leftClickUnit(isShift(), isControl(), bfObj);
                        } catch (Exception e) {
                            main.system.ExceptionMaster.printStackTrace(e);
                        }
                GuiEventManager.trigger(RADIAL_MENU_CLOSE);
            }
        }
    };
}
Also used : ScenarioMetaMaster(eidolons.game.battlecraft.logic.meta.scenario.ScenarioMetaMaster) GameDialogue(eidolons.game.battlecraft.logic.meta.scenario.dialogue.GameDialogue) DialogScenario(eidolons.libgdx.DialogScenario) InputEvent(com.badlogic.gdx.scenes.scene2d.InputEvent) BattleClickListener(eidolons.libgdx.bf.mouse.BattleClickListener)

Example 2 with GameDialogue

use of eidolons.game.battlecraft.logic.meta.scenario.dialogue.GameDialogue in project Eidolons by IDemiurge.

the class CombatScriptExecutor method doDialogue.

private boolean doDialogue(Ref ref, String[] args) {
    GameDialogue dialogue = getGame().getMetaMaster().getDialogueFactory().getDialogue(args[0]);
    List<DialogScenario> list = SceneFactory.getScenes(dialogue);
    GuiEventManager.trigger(GuiEventType.DIALOG_SHOW, new DialogueHandler(dialogue, getGame(), list));
    return true;
}
Also used : GameDialogue(eidolons.game.battlecraft.logic.meta.scenario.dialogue.GameDialogue) DialogScenario(eidolons.libgdx.DialogScenario) DialogueHandler(eidolons.game.battlecraft.logic.meta.scenario.dialogue.DialogueHandler)

Aggregations

GameDialogue (eidolons.game.battlecraft.logic.meta.scenario.dialogue.GameDialogue)2 DialogScenario (eidolons.libgdx.DialogScenario)2 InputEvent (com.badlogic.gdx.scenes.scene2d.InputEvent)1 ScenarioMetaMaster (eidolons.game.battlecraft.logic.meta.scenario.ScenarioMetaMaster)1 DialogueHandler (eidolons.game.battlecraft.logic.meta.scenario.dialogue.DialogueHandler)1 BattleClickListener (eidolons.libgdx.bf.mouse.BattleClickListener)1