@Override public boolean onAction( final InteractiveElementAction action, final InteractiveElementUser user) { if (action != InteractiveElementAction.ACTIVATE) { return false; } final KrosmozGame game = KrosmozGame.byId(this.m_boardParameters.getGameId()); if (WakfuGameCalendar.getInstance().getDate().before(game.getUnlockDate())) { return false; } SWFWrapper.INSTANCE.toggleDisplay(game); return true; }
@Override public void onCloseEvent() { if (SWFWrapper.INSTANCE.isOpened()) { SWFWrapper.INSTANCE.unload(); return; } final MessageBoxControler messageBoxControler = Xulor.getInstance() .msgBox( WakfuTranslator.getInstance().getString("question.quit"), WakfuMessageBoxConstants.getMessageBoxIconUrl(0), 2073L, 102, 1); messageBoxControler.addEventListener( new MessageBoxEventListener() { @Override public void messageBoxClosed(final int type, final String userEntry) { if (type == 8) { WakfuApplicationUI.this.onCloseEvent(); } } }); }