Skip to content

Commit

Permalink
Two changes here; one, background for right panel has placeholder
Browse files Browse the repository at this point in the history
removed, and actual art inserted. Two, background effects changed up;
now there's noise everywhere, instead of some screens being in a void.

Signed-off-by: Ken Hoover <[email protected]>
  • Loading branch information
Ken Hoover committed Apr 24, 2014
1 parent f4c3c35 commit 7eb0a3e
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 58 deletions.
66 changes: 37 additions & 29 deletions rop-game-android/assets/img/icons/buttons.atlas
Original file line number Diff line number Diff line change
Expand Up @@ -3,117 +3,125 @@ buttons.png
format: RGBA8888
filter: Linear,Linear
repeat: none
paper
panel_bg
rotate: false
xy: 1, 101
size: 200, 400
orig: 200, 400
xy: 1, 283
size: 445, 200
split: 4, 4, 4, 156
orig: 445, 200
offset: 0, 0
index: -1
line
rotate: false
xy: 203, 321
xy: 1, 101
size: 288, 180
split: 13, 13, 0, 180
orig: 288, 180
offset: 0, 0
index: -1
paper
rotate: false
xy: 448, 83
size: 200, 400
orig: 200, 400
offset: 0, 0
index: -1
generic_button_down
rotate: false
xy: 1, 59
xy: 650, 443
size: 200, 40
split: 5, 4, 4, 4
orig: 200, 40
offset: 0, 0
index: -1
generic_button_up
rotate: false
xy: 203, 279
xy: 1, 59
size: 200, 40
split: 4, 5, 4, 4
orig: 200, 40
offset: 0, 0
index: -1
cut_down
rotate: false
xy: 493, 399
xy: 291, 179
size: 102, 102
orig: 102, 102
offset: 0, 0
index: -1
cut_selected
rotate: false
xy: 203, 175
xy: 650, 339
size: 102, 102
orig: 102, 102
offset: 0, 0
index: -1
cut_up
rotate: false
xy: 597, 399
xy: 650, 235
size: 102, 102
orig: 102, 102
offset: 0, 0
index: -1
front_down
rotate: false
xy: 203, 71
xy: 650, 131
size: 102, 102
orig: 102, 102
offset: 0, 0
index: -1
front_selected
rotate: false
xy: 701, 399
xy: 754, 339
size: 102, 102
orig: 102, 102
offset: 0, 0
index: -1
front_up
rotate: false
xy: 805, 399
xy: 754, 235
size: 102, 102
orig: 102, 102
offset: 0, 0
index: -1
grill_down
rotate: false
xy: 909, 399
xy: 754, 131
size: 102, 102
orig: 102, 102
offset: 0, 0
index: -1
grill_selected
rotate: false
xy: 307, 175
xy: 291, 75
size: 102, 102
orig: 102, 102
offset: 0, 0
index: -1
grill_up
rotate: false
xy: 307, 71
xy: 858, 381
size: 102, 102
orig: 102, 102
offset: 0, 0
index: -1
make_down
rotate: false
xy: 493, 295
xy: 858, 277
size: 102, 102
orig: 102, 102
offset: 0, 0
index: -1
make_selected
rotate: false
xy: 597, 295
xy: 858, 173
size: 102, 102
orig: 102, 102
offset: 0, 0
index: -1
make_up
rotate: false
xy: 701, 295
xy: 650, 27
size: 102, 102
orig: 102, 102
offset: 0, 0
Expand All @@ -127,29 +135,29 @@ plate
index: -1
endpiece
rotate: false
xy: 405, 299
xy: 395, 261
size: 20, 20
orig: 20, 20
offset: 0, 0
index: -1
triangle_down
rotate: false
xy: 203, 89
size: 20, 10
orig: 20, 10
offset: 0, 0
index: -1
blank_box
rotate: false
xy: 1013, 491
xy: 962, 473
size: 10, 10
orig: 10, 10
offset: 0, 0
index: -1
cut_line
rotate: false
xy: 1013, 479
xy: 858, 161
size: 10, 10
orig: 10, 10
offset: 0, 0
index: -1
triangle_down
rotate: false
xy: 203, 59
size: 20, 10
orig: 20, 10
offset: 0, 0
index: -1
Binary file modified rop-game-android/assets/img/icons/buttons.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 9 additions & 5 deletions rop-game/src/com/kandl/ropgame/GameScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -301,11 +301,16 @@ else if (Scene[0].getRoot().getX() + dx <= Scene[0].getWidth() - 445 - frontBack

public void switchScreen(final int screen) {
if (RopGame.DEBUG) assert(screen >= 0 && screen <= 3);
frontMusic.setVolume(0);
grillMusic.setVolume(0);
((InputMultiplexer) Gdx.input.getInputProcessor()).removeProcessor(ActiveScene);
if (screen == 0) frontMusic.setVolume(0.5f);
else if (screen == 2) grillMusic.setVolume(0.75f);
if (screen == 0) {
frontMusic.setVolume(0.5f);
grillMusic.setVolume(0);
}
else {
frontMusic.setVolume(0.2f);
if (screen == 2) grillMusic.setVolume(0.75f);
else grillMusic.setVolume(0.15f);
}
ActiveScene = Scene[screen];
((InputMultiplexer) Gdx.input.getInputProcessor()).addProcessor(ActiveScene);
}
Expand Down Expand Up @@ -429,7 +434,6 @@ public void resume() {
background.fill();
((TextureRegionDrawable) ((Image) dayStage.getActors().get(0)).getDrawable()).setRegion(new TextureRegion(new Texture(background)));
background.dispose();
UILayer.resume();
GrillManager.resume();
}

Expand Down
2 changes: 1 addition & 1 deletion rop-game/src/com/kandl/ropgame/managers/SheetManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public static void switchTo(int i) {
currentSheet = miniSheets.get(i).getOrder();
currentSheet.setDragable(dragable);
UI.addActor(currentSheet);
currentSheet.addAction(Actions.moveTo(width + 45, 130));
currentSheet.addAction(Actions.moveTo(width + 45, 120));
}

public static void switchTo(MiniOrderSheet o) {
Expand Down
35 changes: 12 additions & 23 deletions rop-game/src/com/kandl/ropgame/ui/UILayer.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ public class UILayer extends Stage implements Disposable {
private final Label score;
private final Button[] scene;
private final ButtonGroup scenes;
private Image background;
private Image button_background;
private Image sheet_background;

private ChangeListener confirmListener;
private ChangeListener trashListener;
Expand All @@ -63,11 +64,8 @@ public UILayer(int width, int height, boolean stretch) {
trashListener = null;

// set skin up
Pixmap background = new Pixmap(128, 128, Pixmap.Format.RGBA8888);
background.setColor(Color.BLACK);
background.fill();
this.background = new Image(new TiledDrawable(new TextureRegion(new Texture(background))));
background.dispose();
button_background = new Image(new NinePatchDrawable(buttonSkin.getAtlas().createPatch("panel_bg")), Scaling.stretchY);
sheet_background = new Image(new NinePatchDrawable(buttonSkin.getAtlas().createPatch("panel_bg")), Scaling.stretchY);

// create components of corner table
score = new Label("$" + String.format("%1$.2f", RopGame.score), new Label.LabelStyle(buttonSkin.getFont("score"), Color.YELLOW));
Expand Down Expand Up @@ -95,9 +93,12 @@ public UILayer(int width, int height, boolean stretch) {
addActor(orderLine);
orderLine.setPosition(0, height - padY);
orderLine.setSize(width - padX, padY);
addActor(this.background);
this.background.setPosition(width - padX - 5, 0);
this.background.setSize(padX + 5, height);
addActor(button_background);
button_background.setPosition(width - padX - 5, height - padY);
button_background.setSize(padX + 5, padY);
addActor(sheet_background);
sheet_background.setPosition(width - padX - 5, 0);
sheet_background.setSize(padX + 5, height - padY);
addActor(score);
score.setPosition(width - padX + 5, height - padY / 2f + 5);
for (int i = 0; i < 4; ++i) {
Expand Down Expand Up @@ -244,7 +245,8 @@ public void resize(float width, float height) {
this.getRoot().addActorAt(1, orderLine);
orderLine.setSize(width - padX, padY);
orderLine.setPosition(0, height - padY);
background.setPosition(width - padX - 5, 0);
button_background.setPosition(width - padX - 5, height - padY);
sheet_background.setPosition(width - padX - 5, 0);
score.setPosition(width - padX + 5, height - padY / 2f + 10);
for (int i = 0; i < 4; ++i) {
scene[i].setPosition(width - padX + 4 + i * 110, height - padY);
Expand All @@ -259,17 +261,4 @@ public void resize(float width, float height) {
public Button[] getButtons() {
return scene;
}

@Override
public void dispose() {
((TiledDrawable) background.getDrawable()).getRegion().getTexture().dispose();
}

public void resume() {
Pixmap background = new Pixmap(128, 128, Pixmap.Format.RGBA8888);
background.setColor(Color.BLACK);
background.fill();
((TiledDrawable) this.background.getDrawable()).setRegion(new TextureRegion(new Texture(background)));
background.dispose();
}
}

0 comments on commit 7eb0a3e

Please sign in to comment.