aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authornathansmith117 <thenathansmithsmith@gmail.com>2024-03-15 17:07:47 +0000
committernathansmith117 <thenathansmithsmith@gmail.com>2024-03-15 17:07:47 +0000
commitcb6d023ffb7e24d024b2ab9603ced1684a62d137 (patch)
treecefc917dfe260136e0b4052fc2f80e146d28c8f1 /src
parent9e0433b442e62ad39a92fdb6580eba32afd787e4 (diff)
downloadPenguinYippies-cb6d023ffb7e24d024b2ab9603ced1684a62d137.tar.gz
PenguinYippies-cb6d023ffb7e24d024b2ab9603ced1684a62d137.tar.bz2
PenguinYippies-cb6d023ffb7e24d024b2ab9603ced1684a62d137.zip
Moved thingies around a ittle bitty
Diffstat (limited to 'src')
-rw-r--r--src/gameScreen.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/gameScreen.c b/src/gameScreen.c
index bd28042..6d772f1 100644
--- a/src/gameScreen.c
+++ b/src/gameScreen.c
@@ -39,6 +39,19 @@ void updateGameScreenClickyDesktop(GameScreen* gameScreen, Game* game)
updateClickies(game, &game->clickies);
}
+void updateGameScreenNavigation(GameScreen* gameScreen, Game* game)
+{
+ // Navigation buttons.
+ if (updateTexturedButton(&gameScreen->toGameButton))
+ {
+ gameScreen->place = CLICKY_DESKTOP_PLACE;
+ }
+ if (updateTexturedButton(&gameScreen->toEmperorsEmporiumButton))
+ {
+ gameScreen->place = SHOP_PLACE;
+ }
+}
+
void updateGameScreen(GameScreen* gameScreen, Game* game)
{
// Draw background.
@@ -53,16 +66,6 @@ void updateGameScreen(GameScreen* gameScreen, Game* game)
WHITE
);
- // Navigation buttons.
- if (updateTexturedButton(&gameScreen->toGameButton))
- {
- gameScreen->place = CLICKY_DESKTOP_PLACE;
- }
- if (updateTexturedButton(&gameScreen->toEmperorsEmporiumButton))
- {
- gameScreen->place = SHOP_PLACE;
- }
-
// assssssss hehehe
switch (gameScreen->place)
{
@@ -92,7 +95,7 @@ void updateGameScreen(GameScreen* gameScreen, Game* game)
snprintf(stonesBuf, sizeof(stonesBuf), "%d", game->stones);
DrawText(stonesBuf, 40.0, 5.0, 30, BLACK);
- //DrawFPS(0, 0);
+ updateGameScreenNavigation(gameScreen, game);
}
void closeGameScreen(GameScreen* gameScreen)