From df45882b62dadc14b0eedf4195b8175188c45d19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Sat, 16 Jan 2016 19:31:18 +0100 Subject: [PATCH] feat: ajout de la classe warndialog. --- core/src/fr/evolving/UI/WarnDialog.java | 35 +++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 core/src/fr/evolving/UI/WarnDialog.java diff --git a/core/src/fr/evolving/UI/WarnDialog.java b/core/src/fr/evolving/UI/WarnDialog.java new file mode 100644 index 0000000..6d8f28e --- /dev/null +++ b/core/src/fr/evolving/UI/WarnDialog.java @@ -0,0 +1,35 @@ +package fr.evolving.UI; + +import com.badlogic.gdx.Input; +import com.badlogic.gdx.graphics.Color; +import com.badlogic.gdx.scenes.scene2d.InputEvent; +import com.badlogic.gdx.scenes.scene2d.Stage; +import com.badlogic.gdx.scenes.scene2d.ui.Dialog; +import com.badlogic.gdx.scenes.scene2d.ui.ImageButton; +import com.badlogic.gdx.scenes.scene2d.ui.Label; +import com.badlogic.gdx.scenes.scene2d.ui.Skin; +import com.badlogic.gdx.scenes.scene2d.ui.Table; +import com.badlogic.gdx.scenes.scene2d.ui.TextButton; +import com.badlogic.gdx.scenes.scene2d.utils.ClickListener; + +import fr.evolving.assets.AssetLoader; + +public class WarnDialog extends Dialog{ + Label thelabel; + + public WarnDialog(Skin skin) { + super("Informations", skin); + // TODO Auto-generated constructor stub + this.getContentTable().add(new ImageButton(AssetLoader.Skin_level,"Warnerbros")).left(); + thelabel=new Label("MenuScenario",AssetLoader.Skin_level); + this.getContentTable().add(thelabel).right(); + this.setModal(true); + this.button("Ok"); + this.key(Input.Keys.ENTER, true); + } + + public void Show(String info,Stage stage) { + this.thelabel.setText(info); + this.show(stage); + } +} \ No newline at end of file