Skip to content

Commit

Permalink
fixed merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
The-AhmadAA committed Oct 14, 2023
2 parents 77c9639 + e731e35 commit f40a098
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 15 deletions.
1 change: 0 additions & 1 deletion source/core/assets/images/ui/buttons/glass.json
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ com.badlogic.gdx.scenes.scene2d.ui.Window$WindowStyle: {
background: UI_Glass_Frame_Standard_01a
titleFont: font_small
titleFontColor: White
stageBackground: UI_Glass_Frame_Standard_01a
}
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.csse3200.game.components.pausemenu;

import com.badlogic.gdx.Gdx;

import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.scenes.scene2d.Actor;
import com.badlogic.gdx.scenes.scene2d.Touchable;
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.ui.Window;
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
Expand All @@ -20,6 +20,7 @@ public class PauseMenuButtonComponent extends UIComponent {
private static final Logger logger = LoggerFactory.getLogger(PauseMenuButtonComponent.class);
private static final float Z_INDEX = 2f;
private Window window;

private final GdxGame game;
private static final float windowSizeX = 300;
private static final float windowSizeY = 400;
Expand All @@ -39,7 +40,7 @@ public void create() {

/**
* Initialises the pause menu buttons
* Positions them on the stage using a table
* Positions them on the stage using a window
*/
private void addActors() {

Expand Down Expand Up @@ -86,7 +87,6 @@ public void changed(ChangeEvent changeEvent, Actor actor) {
game.setScreen(GdxGame.ScreenType.MAIN_MENU);
}
});

window.setKeepWithinStage(true);
window.setResizable(true);
window.setModal(true);
Expand Down Expand Up @@ -121,8 +121,8 @@ public float getZIndex() {

@Override
public void dispose() {
window.clear();
window.remove();
window.clear();
super.dispose();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import com.csse3200.game.GdxGame;
import com.csse3200.game.components.pausemenu.*;
import com.csse3200.game.entities.Entity;
import com.csse3200.game.rendering.TextureRenderComponent;
import com.csse3200.game.services.ServiceLocator;
import com.badlogic.gdx.utils.Array;

Expand All @@ -23,10 +22,6 @@ public static Entity createPauseMenu(GdxGame game) {

Entity pauseMenu = new Entity()
.addComponent(new PauseMenuTimeStopComponent())
// .addComponent(new PauseMenuContinueButton())
// .addComponent(new PauseMenuSettingsButton(game))
// .addComponent(new PauseMenuPlanetSelectButton(game))
// .addComponent(new PauseMenuMainMenuButton(game))
.addComponent(new PauseMenuButtonComponent(game));
pauseMenu.setScale(8, 8);
pauseMenu.setPosition(6f, 2f);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,6 @@ void createsEntity() {
@Test
void entityHasRequiredComponents() {
assertNotNull(entity.getComponent(PauseMenuTimeStopComponent.class));
// assertNotNull(entity.getComponent(PauseMenuButtonComponent.class));
// assertNotNull(entity.getComponent(PauseMenuContinueButton.class));
// assertNotNull(entity.getComponent(PauseMenuSettingsButton.class));
// assertNotNull(entity.getComponent(PauseMenuPlanetSelectButton.class));
// assertNotNull(entity.getComponent(PauseMenuMainMenuButton.class));
assertNotNull(entity.getComponent(PauseMenuButtonComponent.class));
}

Expand Down

0 comments on commit f40a098

Please sign in to comment.