From ba996520bb4d0c1ec6c0322e87e6c7306e7a4a4d Mon Sep 17 00:00:00 2001 From: khuonghoanghuy Date: Sun, 8 Dec 2024 21:10:47 +0700 Subject: [PATCH] oh YES new task done --- TODO.md | 2 +- assets/images/gameUI/cardGameMissing.png | Bin 3423 -> 4997 bytes source/GameSelectionState.hx | 8 +++++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/TODO.md b/TODO.md index e36a01a..39db9de 100644 --- a/TODO.md +++ b/TODO.md @@ -1,6 +1,6 @@ # List TODO for Cruese Engine ## v1.1 (Small Updated) -- [ ] Add a card display game onto `GameSelectionState` (it likely display cartridge) +- [X] Add a card display game onto `GameSelectionState` (it likely display cartridge) - [X] Add a crash handler - [X] Add a `About` class diff --git a/assets/images/gameUI/cardGameMissing.png b/assets/images/gameUI/cardGameMissing.png index a5b5b19475ccf393011ee8a21a46933b1d1bc3cd..f16b444fadb875e94b8146f0ecd1d0e99a6d2664 100644 GIT binary patch literal 4997 zcmcgw_ct4k*QPYa$BtDqc58>CqM^hJVg%J%CH7W(s~u`nVy{}!QhQUY_NY;N$E;PW zXzADHACk9v(SdRS|h_OYYH147k_FU$?~W4Zb^4 zMFFpJjAidWAheN3$m8KvC;a!<{Na5};;Q=E9S@J5=YPP5Be_rRlaD-8!M!hxux&hL96F@cr+JqMR`3R)5Dy&dM*i?hztat*gG;%7!SdK z+2FfDJTbF-c^79U6}C*4Mg}6d41)6O{-|4)bFNntT6RBQ8h36jo}BrNggbR!>t0!! zff(=7*oXiM=2Y$=ZUC4_0rmgncmdBwv!vv(Cru@P4I<7uUtS9a_I~{eJGeXI94LvZ zlKtEG=wCzO@Yyp_*C+$@bp>0;?aAt}Pt|D!w%dk+?0|3EaIIsCLpa-Fh^zP(@i4hV zxBd>3`)HR&zavuH@>YRzwLHJcojW3RwcH*iFQasE-0#6%?0WF)<&1xNJP|~}6Xl2g z_;@#g-&Cm+NtaJ0tJSi+y ziEcl1{j)_F)K3qVAWIwMl zs5dHn$yYM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2d_d>>G>QTFf`)Y0q_Kll5%Ae1da1Zd%|`UX`C;sa^_c5SqT^M9iOxyB(AJnzm|{#sLIBI{wmL_q~QzRLQ;v zG22KUkKfv$Z>U|3m;2=Xa|_vXf3yTc(-3tw_c=dbmBAcRz1*hF>WrBavyRkw zlNwU3r>hU~I7EvX0`$JbsuS_~xzK=*e+BOY zed!VUE)+J`bSbfz9Es^_r3};R9zjjn4Q(Y3k+<6`Kif)irZQYeWyv;~gP-(q#_18n z^b5TdSEnk(y^-VW_#u8(zV|DL=@Zy~y)< zpv2^^fkDiQFs)Xx)U3^s0H7zRYyXJ+rMh~W+5yjf4I`rW3-SYjLukvQjX-DG>$sQb zf-E5d#h8$JJ`~}2}4|>UR7a%dwrWUc~%y;{mlvtz*h{+S5BK%Gwe^R$Cs4t@Q zxjg4y{Yf^Li4CZD6LSh;rh_Xi5{StWN9GoZ`{x5O69p_fhzS6E5K>t(*(5tGCIDgr zjdbP+!;ucSckm=%{Yl+oj`56wm_T)$mGdcxnGW^=5pxJ)rU~vE4#Z3}>g8_H;mQ*N zCa8g!>@jC<(Z?VrEG8HHF#<86F#!-0uDk}$%J~e$OamcoTX#;`TKrFd0RVn9N=p`Q R4<-Nr002ovPDHLkV1k~#doch2 diff --git a/source/GameSelectionState.hx b/source/GameSelectionState.hx index fe0c2dc..f59e4d1 100644 --- a/source/GameSelectionState.hx +++ b/source/GameSelectionState.hx @@ -14,6 +14,7 @@ import flixel.text.FlxText; import flixel.util.FlxColor; import haxe.io.Bytes; import openfl.Lib; +import openfl.display.Bitmap; import openfl.display.BitmapData; // thought, i wanna make this like a game console @@ -155,7 +156,12 @@ class GameSelectionState extends FlxState } try { - cardGame.loadGraphic(PolyHandler.trackedMods[curSelected].modPath + "/cardGame.png"); + var data = BitmapData.fromFile(PolyHandler.trackedMods[curSelected].modPath + "/cardGame.png"); + // trace(data); + if (data == null) + cardGame.loadGraphic(Paths.image('gameUI/cardGameMissing')); + else + cardGame.loadGraphic(data); } catch (e:Dynamic) {