feat: ajout de cadres et de labels pour le mode modification

This commit is contained in:
Nicolas Hordé 2016-07-10 13:09:30 +02:00
parent 4be8815bba
commit f75d7d7eb4
2 changed files with 25 additions and 9 deletions

View File

@ -97,7 +97,14 @@ public class LevelRenderer {
shapeRenderer.rect(1210, 620, 250, AssetLoader.height - 630); shapeRenderer.rect(1210, 620, 250, AssetLoader.height - 630);
} }
if (!LevelScreen.group_init.isVisible()) if (!LevelScreen.group_init.isVisible())
shapeRenderer.rect(1470, 10, 440, AssetLoader.height - 20); if (!LevelScreen.worlds.isDebug())
shapeRenderer.rect(1470, 10, 440, AssetLoader.height - 20);
else {
shapeRenderer.rect(1470, 10, 440, 140);
shapeRenderer.rect(1470, 160, 440, 140);
shapeRenderer.rect(1470, 310, 440, 300);
shapeRenderer.rect(1470, 620, 440, AssetLoader.height - 630);
}
shapeRenderer.end(); shapeRenderer.end();
if (LevelScreen.buttonLevels != null) if (LevelScreen.buttonLevels != null)
for (int i=0;i<LevelScreen.buttonLevels.size;i++) for (int i=0;i<LevelScreen.buttonLevels.size;i++)

View File

@ -16,6 +16,7 @@ import com.badlogic.gdx.scenes.scene2d.Touchable;
import com.badlogic.gdx.scenes.scene2d.actions.Actions; import com.badlogic.gdx.scenes.scene2d.actions.Actions;
import com.badlogic.gdx.scenes.scene2d.ui.Button; import com.badlogic.gdx.scenes.scene2d.ui.Button;
import com.badlogic.gdx.scenes.scene2d.ui.ButtonGroup; import com.badlogic.gdx.scenes.scene2d.ui.ButtonGroup;
import com.badlogic.gdx.scenes.scene2d.ui.HorizontalGroup;
import com.badlogic.gdx.scenes.scene2d.ui.Image; import com.badlogic.gdx.scenes.scene2d.ui.Image;
import com.badlogic.gdx.scenes.scene2d.ui.ImageButton; import com.badlogic.gdx.scenes.scene2d.ui.ImageButton;
import com.badlogic.gdx.scenes.scene2d.ui.ImageTextButton; import com.badlogic.gdx.scenes.scene2d.ui.ImageTextButton;
@ -71,12 +72,13 @@ public class LevelScreen implements Screen {
private TextButton buttonConnect, buttonPlay, buttonStat, buttonSave, buttonApply, buttonPlaythis; private TextButton buttonConnect, buttonPlay, buttonStat, buttonSave, buttonApply, buttonPlaythis;
private ServerList Statdata, Userdata, Gamedata; private ServerList Statdata, Userdata, Gamedata;
private Worldlist Worlddata; private Worldlist Worlddata;
private Label Statdatalabel, Userdatalabel, Gamedatalabel, Worlddatalabel, rewardlabel, goallabel, ressourcelabel, handicaplabel, initiallabel; private Label Statdatalabel, Userdatalabel, Gamedatalabel, Worlddatalabel, rewardlabel, goallabel, ressourcelabel, handicaplabel, initiallabel,outillabel,modelabel,savelabel;
private TextField worldfield; private TextField worldfield;
private TextArea TextDescriptive; private TextArea TextDescriptive;
public Worlds worlds; public Worlds worlds;
private Objectives Victory; private Objectives Victory;
private VerticalGroup vertibar,vertibarmod; private VerticalGroup vertibarmod;
private HorizontalGroup vertibar;
public ButtonLevel selected; public ButtonLevel selected;
public int addervalue; public int addervalue;
private ButtonGroup<Button> chooser, modifbar; private ButtonGroup<Button> chooser, modifbar;
@ -936,8 +938,12 @@ public class LevelScreen implements Screen {
//Group Debug //Group Debug
//********************************************************** //**********************************************************
Gdx.app.debug("wirechem-LevelScreen", "Création du groupe Debug."); Gdx.app.debug("wirechem-LevelScreen", "Création du groupe Debug.");
outillabel = new Label(AssetLoader.language.get("[outil-levelscreen]"), AssetLoader.Skin_ui, "variable");
outillabel.setPosition(1480, AssetLoader.height - 38);
modelabel = new Label(AssetLoader.language.get("[mode-levelscreen]"), AssetLoader.Skin_ui, "variable");
modelabel.setPosition(1480, 272);
savelabel = new Label(AssetLoader.language.get("[save-levelscreen]"), AssetLoader.Skin_ui, "variable");
savelabel.setPosition(1480, 122);
initiallabel = new Label(AssetLoader.language.get("[initiallabel-levelscreen]"),AssetLoader.Skin_ui, "variable"); initiallabel = new Label(AssetLoader.language.get("[initiallabel-levelscreen]"),AssetLoader.Skin_ui, "variable");
initiallabel.setPosition(1480, 582); initiallabel.setPosition(1480, 582);
temp_orig = new ImageTextButton("", AssetLoader.Skin_level, "temp"); temp_orig = new ImageTextButton("", AssetLoader.Skin_level, "temp");
@ -1145,7 +1151,7 @@ public class LevelScreen implements Screen {
} }
}); });
vertibarmod=new VerticalGroup(); vertibarmod=new VerticalGroup();
vertibarmod.setPosition(1780, AssetLoader.height-100); vertibarmod.setPosition(1550, AssetLoader.height-100);
vertibarmod.center(); vertibarmod.center();
vertibarmod.space(20f); vertibarmod.space(20f);
vertibarmod.addActor(unlocked); vertibarmod.addActor(unlocked);
@ -1156,8 +1162,8 @@ public class LevelScreen implements Screen {
vertibarmod.addActor(script); vertibarmod.addActor(script);
vertibarmod.setVisible(false); vertibarmod.setVisible(false);
vertibar=new VerticalGroup(); vertibar=new HorizontalGroup();
vertibar.setPosition(1600, AssetLoader.height-100); vertibar.setPosition(1565, 215);
vertibar.center(); vertibar.center();
vertibar.space(20f); vertibar.space(20f);
vertibar.addActor(moveit); vertibar.addActor(moveit);
@ -1184,6 +1190,9 @@ public class LevelScreen implements Screen {
group_debug.addActor(rayon_orig); group_debug.addActor(rayon_orig);
group_debug.addActor(nrj_orig); group_debug.addActor(nrj_orig);
group_debug.addActor(initiallabel); group_debug.addActor(initiallabel);
group_debug.addActor(outillabel);
group_debug.addActor(modelabel);
group_debug.addActor(savelabel);
//********************************************************** //**********************************************************
Gdx.app.debug("wirechem-LevelScreen", "Affichage du menu."); Gdx.app.debug("wirechem-LevelScreen", "Affichage du menu.");