Blackjack - Dynamic screen for PortaRF (#2814)

Blackjack - Dynamic screen for PortaRF
This commit is contained in:
RocketGod
2025-10-10 13:48:26 -07:00
committed by GitHub
parent 6a81a981aa
commit 65a3c797c6
2 changed files with 154 additions and 134 deletions
+8 -2
View File
@@ -77,6 +77,12 @@ class BlackjackView : public View {
NavigationView& nav_;
bool initialized = false;
// Screen dimensions (set dynamically)
int screen_w = 0;
int screen_h = 0;
int card_width = 60;
int card_height = 80;
// Game variables
static constexpr uint8_t MAX_CARDS_IN_HAND = 11; // Maximum possible cards before bust
uint8_t deck[52];
@@ -141,7 +147,7 @@ class BlackjackView : public View {
{"highscore"sv, &high_score}}};
Button dummy{
{screen_width, 0, 0, 0},
{0, 0, 0, 0},
""};
MessageHandlerRegistration message_handler_frame_sync{
@@ -153,4 +159,4 @@ class BlackjackView : public View {
} // namespace ui::external_app::blackjack
#endif /* __UI_BLACKJACK_H__ */
#endif /* __UI_BLACKJACK_H__ */