Skip to content

Commit

Permalink
Merge branch 'team-2-ui' of https://github.com/UQcsse3200/2023-studio-3
Browse files Browse the repository at this point in the history
… into team-2-ui
  • Loading branch information
shiv-0831 committed Oct 16, 2023
2 parents 8cfe268 + 8ca8fc4 commit 4ee5de7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
import com.badlogic.gdx.utils.Array;
import com.csse3200.game.GdxGame;
import com.csse3200.game.components.pausemenu.PauseMenuButtonComponent;
import com.csse3200.game.entities.Entity;
import com.csse3200.game.entities.factories.PauseMenuFactory;
import com.csse3200.game.screens.TowerType;
Expand Down Expand Up @@ -316,6 +315,7 @@ public void clicked(InputEvent event, float x, float y) {
towerTable.add(tower3).padRight(10f);
towerTable.add(tower4).padRight(10f);
towerTable.add(tower5).padRight(10f);
towerTable.stack(new Label(String.format("%s", towers.get(0).getPrice()), getSkin()));
towerTable.row();
towerTable.add("1", "small");
towerTable.add("2", "small");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,15 @@ public void changed(ChangeEvent changeEvent, Actor actor) {
window.setHeight(windowSizeY);
window.setX((ServiceLocator.getRenderService().getStage().getWidth() / 2) - (windowSizeX / 2));
window.setY((ServiceLocator.getRenderService().getStage().getHeight() / 2) - (windowSizeY / 2));
window.addAction(Actions.fadeIn(0.8f, Interpolation.bounceIn));

// Animate the pause menu opening
window.setPosition(((float) Gdx.graphics.getWidth() / 2) - (windowSizeX / 2),0);
window.addAction(new SequenceAction(Actions.moveTo(
( ((float) Gdx.graphics.getWidth() / 2) - (windowSizeX / 2) ),
( ((float) Gdx.graphics.getHeight() / 2) - (windowSizeY / 2) ),
0.3f,
Interpolation.fastSlow),
Actions.fadeIn(0.3f)));

stage.addActor(window);
}
Expand Down

0 comments on commit 4ee5de7

Please sign in to comment.