From bf0d5e041bab1a539577406793846ebaf8412ce6 Mon Sep 17 00:00:00 2001 From: Matt Low Date: Sun, 29 Dec 2019 12:24:51 +0400 Subject: [PATCH] Functional menu --- core/assets/menu_background.png | Bin 0 -> 2611 bytes core/assets/sprites/level.png | Bin 10142 -> 1735 bytes core/assets/sprites/level.xcf | Bin 15860 -> 8275 bytes core/src/com/me/pacman/Assets.java | 5 ++ core/src/com/me/pacman/PacDude.java | 3 +- core/src/com/me/pacman/state/MenuState.java | 65 ++++++++++++++++++-- 6 files changed, 66 insertions(+), 7 deletions(-) create mode 100644 core/assets/menu_background.png diff --git a/core/assets/menu_background.png b/core/assets/menu_background.png new file mode 100644 index 0000000000000000000000000000000000000000..51f8ca166847bb3e9d766f740044671b71668673 GIT binary patch literal 2611 zcmZved0bN29>4)L%~G*4EyqAxoN{Y?Wu_VExKvh_Y2`wW+mxAL8jd0&uTsaoGPSaj zbR0Ev%N;|U)Tp%3LL4{H9F>U>7X$?1&b4Od&F8)M$GPWo&+m8c{hi;F8Rp4{6?4v$7t&Tk86AgiAcdiU*u9>zWxHfs%+0iTZzF_nX ze)teP>Et`N^uyQEoQ-X7ukLzet8(6COXzs+{xw=h*IoaS{+Q(5&mGOYyz1f}nJzMI z)OL&O@lr{*lneRQwlE+&#}Is5Gp<5BHkC03jnKLqAJ?c`ON^6SKVM1@n_tfK*l221 zwS78yL4P2GjRkJz=yU6$JD1XN_nUC9UqEPE$z(WG^|}TU=?sBB@`f%e78sKfCL-Wq zSa7RQOk)Xz3Gxk9Wb!(EyMLL=l&cY3<2nT9qzZ?deA#-GPrleUyw44zo?%IlH`U{! zoT}9LZXeuDi!J+QH)(h|EmT;@n-E%M+ff*=>PAY7&asPdTMOxViT|3H#=k7ULmWKL ziNp=kVGi`k2ufExS_VhZ+7Yybi-U4g5BY=5gyo640JFZ~(mYz?d_C%osoDu$(CRXk zRZd2;Ej+>bgUA~_kDZoLTtEwRG>g-=pCc$uBu0cG&Y;mhg65{<92o(Y#awNOMZ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eGc(Ecy%AP4~qL9}09FZCzgKquZq z#rc7Fpw%K`{G__bfCz?9)VS@rFGvwL8~+`@5ws5q#V#mP1Bef5LRONLr$+j`uveBi z#_Hwqg9uGlvbl;r;M$(T4QQ7sXh!qqZ)zAd*m6cruXpH=C46hF);LGSzYZJHsW_is z0t{rm$<~qM-PN)9c8kErvhR&Mb+H*P1v+KKqehBvntjE}>`3e#9Sv0{u#a_dp$wGu zq@!wN!(K#s75Nl>Hfy=!3Z=wh>5kUei1j6R<)Lk-wy$H_>CAZZ0ou}Ti*I}S9gA40 zFRr!My?vkaNl|S;2YZ%V%d8pX`z0zfjcKbe~D%wKexflhPruior_zBM|8J zbYVmX(K229m3DT-Qx3hX^f*b!PkG!8Wu3yfzV*{uoxrD+_P&DFi$Vo%u?zvv-w!vUIUygFZ-g}jS)&o0H qk{Mzw{C-`EnUS&Ta)!_nP(h}$)kPfseef0tIqY)WxytFgtA7Ac&J4o< literal 0 HcmV?d00001 diff --git a/core/assets/sprites/level.png b/core/assets/sprites/level.png index 292a03db4b5653fba82c49ccb346b45169e6c5a8..0373b5bb02fcc3286e31ce74254e56634d84b8e2 100644 GIT binary patch delta 1595 zcmV-B2E_TEPsa_ABPaocX+uL$Nkc;*aB^>EX>4Tx04R}tkv&MmKpe$iQ?()$2MdZQ zWT=yPA5(u~1YHF9_6;-2rA>*>b zd5g1JuCnGm`3r+NZDpD3G=~w#B9@SZ2pLtBP=5?HilAorK&jasg^i5fy{}$+3b9-y<@gqEZ_y98CNDE<( zPHD?>gb-%8EJv6AeTDY*=l8?&;qvA}nD5V@?;j6xovvqa&N-lhFUt`KAapIZ-zy1^ ze?eH^vr0W(&j3mI5`k7w;wyk42~QO!H7^JlCG)31a4w*@5ioN~06R-xL0Ge5fNDQI z3m1n4`k zc<$T3zf}v%wTb%(&eW{YUK=l&wq#{#f86>5oHkF_vpCV=^5zbgH&EWgR2cYFA+6&L zeWx@g{b+M?Ae^q}`+E+A^gC}A5Nj|ed~STMEz9vQ?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01xrLY0=`<|R=0RXd9IlOc+wNe4JDfI(3Qwj}hhZtU_7AbN6zY7}jhnX4? zzy}OIwR~r0Bg0=+7_99njwL}#$H!M#6NNq{&#~5=@R9>K6W?2WYt*FE%rea$(|^y8 zf0nWGh%V4M*Rxo#&uOD@EVi3j(#qT-muIN+i|q~z4Hc7}QmeyD0O^+#_)h%FQnhfHeOKA13E|7M0+dej4fwH@W7ha)H_mD?PBVVBBYgP*){F zQz~R?_uI7=SIz!BlJf-#Df`D9#eYUi=m1V#kQU*9scGpF&np(C! z6>9e9+dy1CFOX4yo$I?039_2Yb&YdL%mUWJxzB6xf>DyAC;370|AhaG(G>`dg0E4? z3kblbCPK`t-$`>Zd9N{DpHG4^_CK;aDmY+P{jRtM(Ng(`$(6Ftxj#Ra7aL^Wy(kg> Y2mAn4+V3?u%>V!Z07*qoM6N<$g2+jF>i_@% diff --git a/core/assets/sprites/level.xcf b/core/assets/sprites/level.xcf index 29de74acc4cf029bbe70f7f5d7a19158f0fa3bca..d9869c9cbe69edda21967e6e938ccedbb96181ee 100644 GIT binary patch literal 8275 zcmeI1&2C&t702uL?N7Ipc5onpWYKp5Oah8X#D)zbniaF)Au{u3vz~XoO~*ICk;-pHp?a+HGenv0>p(s;h3Df1U3-x4OKw{pn}(FP}W0 zfAQeq!@%cJY8wBIc8yk5d~MRkAN}*+AE+_DPV3YDK>JY|_vn8}`xk9v3)c6yKYhIQ z?EcoP?Wary@%j7R-Pd2ecsAeNd9nTU-rC*gTTgag?7W)aweJ3_txq1$AK1T#_aJ|A z2KnLK{)znM?q`pmY`@%^|AvRJ%7-+*|M|=9*YoX{PyYC9SNNUh&v&1_o<9)082fM; zERBm#_1oeh4<9j5lV#J79zXfh)~lV*Uz)LUhCV}@92IGe#=rY3-#C+|c`co!F

z zHLuTYS{|B3Jnj(q6v6yqH1Y!f7XdcXJH zz8~?emh|mCWt=~c7^v~-{n`5v>M&~F;gY5a^J~hHlWQ8BeN%s5vC285qx_gHnYRG_?z`L3y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g%9=w=l-N_Z#{>AiA)LOY44Oxq5NEswESft6K7^ zmb|JZQxew-YK2-ASy#1W_7s)7wf*oA&DRLWzVZ4YYssrEn=d?8pMMdc_8rEm*1Y=s zYxVh;eJrHI#Om`e+p+r3O-_C(_5*(Y_0z32t1_kXgOxA_MNd_MRa9Hnn^Ul%9V#C_Dd_(%`D>jOABl=T+HRA1PQlc2#yxHR=Cj+4+CTL4@`I diff --git a/core/src/com/me/pacman/Assets.java b/core/src/com/me/pacman/Assets.java index 1c21465..358a125 100644 --- a/core/src/com/me/pacman/Assets.java +++ b/core/src/com/me/pacman/Assets.java @@ -38,6 +38,7 @@ public class Assets { public void loadAssets() { manager.load("level_background.png", Texture.class); + manager.load("menu_background.png", Texture.class); manager.load("logo.png", Texture.class); manager.load("sprites/level.png", Texture.class); @@ -104,6 +105,10 @@ public class Assets { return manager.get("level_background.png", Texture.class); } + public Texture getMenuBackground() { + return manager.get("menu_background.png", Texture.class); + } + public Texture getLogo() { return manager.get("logo.png", Texture.class); } diff --git a/core/src/com/me/pacman/PacDude.java b/core/src/com/me/pacman/PacDude.java index a3cac90..611e6e9 100644 --- a/core/src/com/me/pacman/PacDude.java +++ b/core/src/com/me/pacman/PacDude.java @@ -8,6 +8,7 @@ import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.graphics.glutils.ShapeRenderer; import com.badlogic.gdx.utils.viewport.FitViewport; import com.badlogic.gdx.utils.viewport.Viewport; +import com.me.pacman.state.MenuState; import com.me.pacman.state.PlayState; public class PacDude extends Game { @@ -39,7 +40,7 @@ public class PacDude extends Game { batch = new SpriteBatch(); sr = new ShapeRenderer(); - setScreen(new PlayState(this)); + setScreen(new MenuState(this)); } @Override diff --git a/core/src/com/me/pacman/state/MenuState.java b/core/src/com/me/pacman/state/MenuState.java index 4888dd1..8a83450 100644 --- a/core/src/com/me/pacman/state/MenuState.java +++ b/core/src/com/me/pacman/state/MenuState.java @@ -1,9 +1,12 @@ package com.me.pacman.state; +import com.badlogic.gdx.Gdx; +import com.badlogic.gdx.Input; +import com.badlogic.gdx.InputAdapter; +import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.g2d.BitmapFont; import com.me.pacman.PacDude; -import com.me.pacman.level.Level; public class MenuState extends LevelState { @@ -11,30 +14,80 @@ public class MenuState extends LevelState { private Texture logo; private BitmapFont font; + + public static final int NEW_GAME = 0; + public static final int HIGH_SCORES = 1; + + private static final int MENU_PADDING = 24; + private static final int MENU_X = 84; + private static final int MENU_Y = 85; + + private int selectedOption; + private static final String[] options = { + "New Game", + "High Scores", + }; + + public MenuState(PacDude game) { super(game); } @Override public void setup() { - levelBackground = game.assets.getLevelBackground(); + levelBackground = game.assets.getMenuBackground(); logo = game.assets.getLogo(); logo.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear); font = game.assets.getFont(); - level = new Level(game,"level"); + Gdx.input.setInputProcessor(this.new Controller()); } @Override public void render() { game.batch.draw(levelBackground, 0, 16); - level.render(0, 16); - game.batch.draw(logo, 0, 124, 224, 120); + game.batch.draw(logo, 0, 140, 224, 120); + + for (int i = 0; i < options.length; i++) { + font.setColor(i == selectedOption? Color.BLUE : Color.WHITE); + + font.draw(game.batch, options[i], MENU_X, MENU_Y - (i * MENU_PADDING), 56, 1, true); + } } @Override - public void update(float dt) { + public void update(float dt) {} + + private final class Controller extends InputAdapter { + + @Override + public boolean keyDown(int keycode) { + switch (keycode) { + case Input.Keys.UP: + selectedOption = selectedOption > 0 ? --selectedOption : options.length - 1; + break; + case Input.Keys.DOWN: + selectedOption = selectedOption < options.length - 1 ? ++selectedOption : 0; + break; + case Input.Keys.ENTER: + switch (selectedOption) { + case NEW_GAME: + game.setScreen(new PlayState(game)); + break; + case HIGH_SCORES: +// game.setScreen(new HighScores(game)); + break; + } + break; + } + return super.keyDown(keycode); + } } + @Override + public void dispose() { + Gdx.input.setInputProcessor(null); + } + }