Skip to content

Commit

Permalink
oh YES new task done
Browse files Browse the repository at this point in the history
  • Loading branch information
khuonghoanghuy committed Dec 8, 2024
1 parent dd0d037 commit ba99652
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion TODO.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
Binary file modified assets/images/gameUI/cardGameMissing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 7 additions & 1 deletion source/GameSelectionState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
{
Expand Down

0 comments on commit ba99652

Please sign in to comment.