summaryrefslogtreecommitdiffhomepage
path: root/templates/advance_game/screens/screen_title.c
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2017-10-14 12:25:08 +0200
committerraysan5 <[email protected]>2017-10-14 12:25:08 +0200
commit0d8a994d9570c29780f4bb6977e8d52d538bba72 (patch)
tree35562178f0ed80d1f1f25f6afa4e8532050cd9ab /templates/advance_game/screens/screen_title.c
parentd012316b87a5b1de44f7e9f0df88fc274c619e6f (diff)
downloadraylib-0d8a994d9570c29780f4bb6977e8d52d538bba72.tar.gz
raylib-0d8a994d9570c29780f4bb6977e8d52d538bba72.zip
Review templates for Android
- Removed useless templates - Reviewed all Makefiles - Rework some code for Android support - Added resources to advance template
Diffstat (limited to 'templates/advance_game/screens/screen_title.c')
-rw-r--r--templates/advance_game/screens/screen_title.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/templates/advance_game/screens/screen_title.c b/templates/advance_game/screens/screen_title.c
index 8f2cf4af..cb67bb1f 100644
--- a/templates/advance_game/screens/screen_title.c
+++ b/templates/advance_game/screens/screen_title.c
@@ -4,7 +4,7 @@
*
* Title Screen Functions Definitions (Init, Update, Draw, Unload)
*
-* Copyright (c) 2014 Ramon Santamaria (@raysan5)
+* Copyright (c) 2014-2017 Ramon Santamaria (@raysan5)
*
* This software is provided "as-is", without any express or implied warranty. In no event
* will the authors be held liable for any damages arising from the use of this software.
@@ -51,11 +51,12 @@ void UpdateTitleScreen(void)
{
// TODO: Update TITLE screen variables here!
- // Press enter to change to GAMEPLAY screen
- if (IsKeyPressed(KEY_ENTER))
+ // Press enter or tap to change to GAMEPLAY screen
+ if (IsKeyPressed(KEY_ENTER) || IsGestureDetected(GESTURE_TAP))
{
//finishScreen = 1; // OPTIONS
finishScreen = 2; // GAMEPLAY
+ PlaySound(fxCoin);
}
}
@@ -64,8 +65,8 @@ void DrawTitleScreen(void)
{
// TODO: Draw TITLE screen here!
DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), GREEN);
- DrawText("TITLE SCREEN", 20, 20, 40, DARKGREEN);
- DrawText("PRESS ENTER to JUMP to GAMEPLAY SCREEN", 160, 220, 20, DARKGREEN);
+ DrawTextEx(font, "TITLE SCREEN", (Vector2){ 20, 10 }, font.baseSize*3, 4, DARKGREEN);
+ DrawText("PRESS ENTER or TAP to JUMP to GAMEPLAY SCREEN", 120, 220, 20, DARKGREEN);
}
// Title Screen Unload logic