@@ -85,6 +85,11 @@ public class GameMenu implements LanguageChangeListener, FontChangeListener {
8585
8686 // Compass reference for custom target
8787 private Compass compass ;
88+
89+ // First launch flag for showing controls on startup
90+ private boolean hasShownControlsOnStartup = false ;
91+ private boolean shouldShowControlsOnStartup = false ;
92+ private int startupFrameCounter = 0 ;
8893
8994
9095 public GameMenu () {
@@ -683,6 +688,9 @@ private int parseJsonObjectInt(String json, String objectKey, String propertyKey
683688 }
684689
685690 public void update () {
691+ // Check if we should show controls on startup (after a few frames)
692+ checkStartupControlsDisplay ();
693+
686694 // Update save notification timer
687695 if (showSaveNotification ) {
688696 saveNotificationTimer -= Gdx .graphics .getDeltaTime ();
@@ -1086,6 +1094,34 @@ private void openControlsDialog() {
10861094 controlsDialog .show ();
10871095 }
10881096
1097+ /**
1098+ * Marks that the controls dialog should be shown on startup.
1099+ * This is called during game initialization.
1100+ * The actual display is delayed by a few frames to allow the world to load properly.
1101+ */
1102+ public void showControlsOnStartup () {
1103+ if (!hasShownControlsOnStartup ) {
1104+ shouldShowControlsOnStartup = true ;
1105+ startupFrameCounter = 0 ;
1106+ }
1107+ }
1108+
1109+ /**
1110+ * Checks if controls should be shown after a few frames have passed.
1111+ * This ensures the world has loaded and camera is positioned correctly.
1112+ */
1113+ private void checkStartupControlsDisplay () {
1114+ if (shouldShowControlsOnStartup ) {
1115+ startupFrameCounter ++;
1116+ // Wait 3 frames before showing controls to allow world to load
1117+ if (startupFrameCounter >= 3 ) {
1118+ controlsDialog .show ();
1119+ hasShownControlsOnStartup = true ;
1120+ shouldShowControlsOnStartup = false ;
1121+ }
1122+ }
1123+ }
1124+
10891125 /**
10901126 * Handles the result of the player location dialog.
10911127 */
0 commit comments