@Override public void init() { setBackground(game.getUI(new Actor()).setSize(getFullWidth(), getFullHeight()).getActor()); img_bg = game.getImage(getWidth() / 2, 1).touchOff().show(this); lab_msg = game.getLabel("messge").setColor(Color.DARK_GRAY).touchOff().show(this); lab_msg.setWrap(true); lab_msg.setAlignment(Align.center); lab_msg.setWidth(getWidth() / 2 - game.getDefaultFontSize()); lab_msg.setPosition(getWidth() / 2, getHeight() / 2, Align.center); addListener(new ClickListener() { public void clicked(InputEvent event, float x, float y) { game.removeDialog(DialogMessge.this); } }); }
@Override public void show() { clearActions(); setStartActions(MOVEUP); Object obj = game.getUserData(MODEL); float time = 3; img_bg.setPosition(getWidth() / 2, getHeight() / 2, Align.center); img_bg.setColor(model.bgColor); addAction(Actions.delay(time, Actions.run(new Runnable() { @Override public void run() { addAction(Actions.delay(time, Actions.run(new Runnable() { @Override public void run() {