diff --git a/android/assets/screen/halloffame/gfx/screen_halloffame_background_carpet.png b/android/assets/screen/halloffame/gfx/screen_halloffame_background_carpet.png new file mode 100644 index 0000000000000000000000000000000000000000..4a4a1274fe39fa0c037f9eb920e7abc4d4f715eb Binary files /dev/null and b/android/assets/screen/halloffame/gfx/screen_halloffame_background_carpet.png differ diff --git a/android/assets/screen/halloffame/gfx/screen_halloffame_background_door_pressed.png b/android/assets/screen/halloffame/gfx/screen_halloffame_background_door_pressed.png new file mode 100644 index 0000000000000000000000000000000000000000..c058d9b9072399928ededf655db69a3f98f65037 Binary files /dev/null and b/android/assets/screen/halloffame/gfx/screen_halloffame_background_door_pressed.png differ diff --git a/android/assets/screen/halloffame/gfx/screen_halloffame_background_door_unpressed.png b/android/assets/screen/halloffame/gfx/screen_halloffame_background_door_unpressed.png new file mode 100644 index 0000000000000000000000000000000000000000..827ca1ac77a728b8f7823ec8acbbf8b217f22661 Binary files /dev/null and b/android/assets/screen/halloffame/gfx/screen_halloffame_background_door_unpressed.png differ diff --git a/android/assets/screen/halloffame/gfx/screen_halloffame_background_start.jpg b/android/assets/screen/halloffame/gfx/screen_halloffame_background_start.jpg new file mode 100644 index 0000000000000000000000000000000000000000..6e2874ccbd336039818be63f10910b873b476fe4 Binary files /dev/null and b/android/assets/screen/halloffame/gfx/screen_halloffame_background_start.jpg differ diff --git a/android/assets/screen/halloffame/gfx/screen_halloffame_background_tile.jpg b/android/assets/screen/halloffame/gfx/screen_halloffame_background_tile.jpg new file mode 100644 index 0000000000000000000000000000000000000000..7597c83898766311c42867fa4c4564e62992f452 Binary files /dev/null and b/android/assets/screen/halloffame/gfx/screen_halloffame_background_tile.jpg differ diff --git a/android/assets/screen/halloffame/gfx/screen_halloffame_mouse_pressed.png b/android/assets/screen/halloffame/gfx/screen_halloffame_mouse_pressed.png new file mode 100644 index 0000000000000000000000000000000000000000..1838904f994c21a24696046e740e1e8687f3cb84 Binary files /dev/null and b/android/assets/screen/halloffame/gfx/screen_halloffame_mouse_pressed.png differ diff --git a/android/assets/screen/halloffame/gfx/screen_halloffame_mouse_unpressed.png b/android/assets/screen/halloffame/gfx/screen_halloffame_mouse_unpressed.png new file mode 100644 index 0000000000000000000000000000000000000000..afc42dda9dc0ff107b28493015e7772e436e95c4 Binary files /dev/null and b/android/assets/screen/halloffame/gfx/screen_halloffame_mouse_unpressed.png differ diff --git a/android/assets/screen/halloffame/gfx/screen_halloffame_mys_bubble.9.png b/android/assets/screen/halloffame/gfx/screen_halloffame_mys_bubble.9.png new file mode 100644 index 0000000000000000000000000000000000000000..cadcdeb8301bdc8de7b5bb30fcdb210c79c3e592 Binary files /dev/null and b/android/assets/screen/halloffame/gfx/screen_halloffame_mys_bubble.9.png differ diff --git a/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_00.png b/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_00.png new file mode 100644 index 0000000000000000000000000000000000000000..00ccd5d3c6ecd28479522314989c46f69b46538a Binary files /dev/null and b/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_00.png differ diff --git a/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_01.png b/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_01.png new file mode 100644 index 0000000000000000000000000000000000000000..b38770f79a76f4116424e5052486d6090489389a Binary files /dev/null and b/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_01.png differ diff --git a/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_02.png b/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_02.png new file mode 100644 index 0000000000000000000000000000000000000000..254ec47a4d33ca83a95619be7e356f965b257cef Binary files /dev/null and b/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_02.png differ diff --git a/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_03.png b/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_03.png new file mode 100644 index 0000000000000000000000000000000000000000..20e837b1338a49730b13acaa9bb98813852dd22d Binary files /dev/null and b/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_03.png differ diff --git a/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_04.png b/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_04.png new file mode 100644 index 0000000000000000000000000000000000000000..390e54b9a9171b99ba75efd4144fa1bc3be357f5 Binary files /dev/null and b/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_04.png differ diff --git a/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_05.png b/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_05.png new file mode 100644 index 0000000000000000000000000000000000000000..ec11afab1e18cded93bdc5546c2afa8bb637c85a Binary files /dev/null and b/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_05.png differ diff --git a/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_06.png b/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_06.png new file mode 100644 index 0000000000000000000000000000000000000000..27533d68ad12572e86991414abe34d4fc1b48b6b Binary files /dev/null and b/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_06.png differ diff --git a/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_07.png b/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_07.png new file mode 100644 index 0000000000000000000000000000000000000000..84cf7829ba80b4b7c0ed096b742a11a39909ce81 Binary files /dev/null and b/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_07.png differ diff --git a/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_08.png b/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_08.png new file mode 100644 index 0000000000000000000000000000000000000000..d840f2611210772aacdc0fdf6be1cd4711983730 Binary files /dev/null and b/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_08.png differ diff --git a/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_09.png b/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_09.png new file mode 100644 index 0000000000000000000000000000000000000000..8f6c6f06170f9bb11ce573fb093c5c398162655e Binary files /dev/null and b/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_09.png differ diff --git a/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_10.png b/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_10.png new file mode 100644 index 0000000000000000000000000000000000000000..94ff40ce8a3cf5d4d4b7c84fba411bce526b779b Binary files /dev/null and b/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_10.png differ diff --git a/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_15.png b/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_15.png new file mode 100644 index 0000000000000000000000000000000000000000..8936ec60eb53b364403c3d541540d65d77da1924 Binary files /dev/null and b/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_15.png differ diff --git a/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_20.png b/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_20.png new file mode 100644 index 0000000000000000000000000000000000000000..1eabb6a3f14b3f764fb4837e545c9bf6dfdb5bc1 Binary files /dev/null and b/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_20.png differ diff --git a/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_30.png b/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_30.png new file mode 100644 index 0000000000000000000000000000000000000000..2cab32abd45465fe8fe2d7c192f91e2b735ea380 Binary files /dev/null and b/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_30.png differ diff --git a/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_35.png b/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_35.png new file mode 100644 index 0000000000000000000000000000000000000000..1ee22b425ddcfa3aca04593021e8bf49d648b746 Binary files /dev/null and b/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_35.png differ diff --git a/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_40.png b/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_40.png new file mode 100644 index 0000000000000000000000000000000000000000..684142cff2a228961da9c8156f09e5d852dbd1ab Binary files /dev/null and b/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_40.png differ diff --git a/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_50.png b/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_50.png new file mode 100644 index 0000000000000000000000000000000000000000..8989e26a4584eae5bda7c0668ff91fc7011d0731 Binary files /dev/null and b/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_50.png differ diff --git a/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_60.png b/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_60.png new file mode 100644 index 0000000000000000000000000000000000000000..f79c3dcf1d4b756ee5bbe2c807f4aa2f1b7ea88e Binary files /dev/null and b/android/assets/screen/halloffame/gfx/screen_halloffame_trophyheap_60.png differ diff --git a/core/src/cz/nic/tablexia/screen/halloffame/HallOfFameScreen.java b/core/src/cz/nic/tablexia/screen/halloffame/HallOfFameScreen.java index 7f133b4a4c3881cd330af10d63533e653522f92d..9833f1180496c0c771a8a214428ac5140add5b33 100644 --- a/core/src/cz/nic/tablexia/screen/halloffame/HallOfFameScreen.java +++ b/core/src/cz/nic/tablexia/screen/halloffame/HallOfFameScreen.java @@ -1,23 +1,78 @@ package cz.nic.tablexia.screen.halloffame; +import com.badlogic.gdx.ApplicationListener; +import com.badlogic.gdx.Gdx; +import com.badlogic.gdx.graphics.Camera; import com.badlogic.gdx.graphics.Color; +import com.badlogic.gdx.graphics.GL20; +import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.g2d.BitmapFont; +import com.badlogic.gdx.graphics.g2d.SpriteBatch; +import com.badlogic.gdx.scenes.scene2d.Group; +import com.badlogic.gdx.scenes.scene2d.InputEvent; +import com.badlogic.gdx.scenes.scene2d.Stage; +import com.badlogic.gdx.scenes.scene2d.ui.Image; import com.badlogic.gdx.scenes.scene2d.ui.Label; import com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle; +import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; import com.badlogic.gdx.scenes.scene2d.ui.Table; +import com.badlogic.gdx.scenes.scene2d.utils.ClickListener; +import com.badlogic.gdx.scenes.scene2d.utils.DragListener; +import com.badlogic.gdx.scenes.scene2d.utils.DragScrollListener; +import com.badlogic.gdx.utils.viewport.ScreenViewport; +import cz.nic.tablexia.game.games.robbery.assets.RobberyAssets; import cz.nic.tablexia.loader.ApplicationFontManager; import cz.nic.tablexia.screen.AbstractTablexiaScreen; +import cz.nic.tablexia.screen.halloffame.assets.HallOfFameAssets; +import cz.nic.tablexia.util.Log; public class HallOfFameScreen extends AbstractTablexiaScreen<Void> { - - @Override - protected void screenLoaded() { - Label label = new Label(getClass().getSimpleName(), new LabelStyle(ApplicationFontManager.getInstance().get(ApplicationFontManager.FONT_ROBOTO_REGULAR, BitmapFont.class), Color.WHITE)); - Table table = new Table(); - table.add(label); - label.setPosition(getStage().getWidth() / 2, getStage().getHeight() / 2); - getStage().addActor(label); - } - -} + private static final int BACKGROUND_TILE_REPEAT_COUNT = 37; + + @Override + protected void screenLoaded() { + DragListener dragListener = new DragListener(){ + @Override + public void touchDragged(InputEvent event, float x, float y, int pointer) { + super.drag(event, x, y, pointer); + Log.info(getClass().getName(), "[ ------- DELTA X: ------- ]"+getDeltaX()); + Log.info(getClass().getName(), "[ ------- STAGE X: ------- ]"+event.getStageX()); + Log.info(getClass().getName(), "[ ------- X: ------- ]"+x); + getStage().getCamera().translate(getStage().getCamera().viewportWidth-x,0,0); + getStage().getCamera().update(); + } + }; + getStage().addListener(dragListener); + prepareBackground(); + + } + + private void prepareBackground() { + Texture textureTile = new Texture(HallOfFameAssets.HALL_OF_FAME_BACKGROUND_TILE); + + Image imgDoor = prepareDoor(); + + for (int i = 0; i < BACKGROUND_TILE_REPEAT_COUNT; i++) { + Image imgBackground = new Image(textureTile); + float currentX = imgDoor.getWidth()+i*imgBackground.getWidth(); + + imgBackground.setHeight(getStage().getHeight()); + imgBackground.setX(currentX); + + getStage().addActor(imgBackground); + } + Log.info(getClass().getName(), "[ ------- STAGE SIZE: ------- ]"+getStage().getWidth()); + + } + + private Image prepareDoor(){ + Texture textureDoor = new Texture(HallOfFameAssets.HALL_OF_FAME_DOOR); + + Image imgDoor = new Image(textureDoor); + imgDoor.setHeight(getStage().getHeight()); + getStage().addActor(imgDoor); + return imgDoor; + } + +} \ No newline at end of file diff --git a/core/src/cz/nic/tablexia/screen/halloffame/assets/HallOfFameAssets.java b/core/src/cz/nic/tablexia/screen/halloffame/assets/HallOfFameAssets.java new file mode 100644 index 0000000000000000000000000000000000000000..e8cb81a3d0fb5c853ab9b9251e0ac99a69deef7f --- /dev/null +++ b/core/src/cz/nic/tablexia/screen/halloffame/assets/HallOfFameAssets.java @@ -0,0 +1,17 @@ +package cz.nic.tablexia.screen.halloffame.assets; + +/** + * Created by Václav TarantÃk on 2.3.15. + */ +public final class HallOfFameAssets { + public static final String HALL_OF_FAME_PATH = "screen/halloffame/"; + + public static final String TEXT_PATH = HALL_OF_FAME_PATH + "text/halloffame"; + + public static final String HALL_OF_FAME_GFX = HALL_OF_FAME_PATH+"gfx/"; + public static final String HALL_OF_FAME_BACKGROUND_TILE = HALL_OF_FAME_GFX+"screen_halloffame_background_tile.jpg"; + public static final String HALL_OF_FAME_DOOR = HALL_OF_FAME_GFX + "screen_halloffame_background_start.jpg"; + + + public static final String HALL_OF_FAME_SFX = HALL_OF_FAME_PATH+"sfx/"; +}