When a menu is disabled, it now uses Benjamin's gray fonts!
[supertux.git] / src / setup.cpp
index 45a8bed..da650e2 100644 (file)
@@ -590,6 +590,8 @@ void st_general_setup(void)
   blue_text = new Font(datadir + "/images/fonts/blue.png", Font::TEXT, 16,18,3);
   white_text  = new Font(datadir + "/images/fonts/white.png",
       Font::TEXT, 16,18);
+  gray_text  = new Font(datadir + "/images/fonts/gray.png",
+      Font::TEXT, 16,18);
   white_small_text = new Font(datadir + "/images/fonts/white-small.png",
           Font::TEXT, 8,9, 1);
   white_big_text   = new Font(datadir + "/images/fonts/white-big.png",
@@ -678,7 +680,7 @@ void st_video_setup_sdl(void)
         {
           fprintf(stderr,
                   "\nWarning: I could not set up fullscreen video for "
-                  "640x480 mode.\n"
+                  "800x600 mode.\n"
                   "The Simple DirectMedia error that occured was:\n"
                   "%s\n\n", SDL_GetError());
           use_fullscreen = false;
@@ -691,7 +693,7 @@ void st_video_setup_sdl(void)
       if (screen == NULL)
         {
           fprintf(stderr,
-                  "\nError: I could not set up video for 640x480 mode.\n"
+                  "\nError: I could not set up video for 800x600 mode.\n"
                   "The Simple DirectMedia error that occured was:\n"
                   "%s\n\n", SDL_GetError());
           exit(1);
@@ -775,7 +777,7 @@ void st_joystick_setup(void)
       /* Open joystick: */
       if (SDL_NumJoysticks() <= 0)
         {
-          fprintf(stderr, "Warning: No joysticks are available.\n");
+          fprintf(stderr, "Info: No joysticks were found.\n");
 
           use_joystick = false;
         }
@@ -1112,3 +1114,24 @@ void usage(char * prog, int ret)
   exit(ret);
 }
 
+std::vector<std::string> read_directory(const std::string& pathname)
+{
+  std::vector<std::string> dirnames;
+  
+  DIR* dir = opendir(pathname.c_str());
+  if (dir)
+    {
+      struct dirent *direntp;
+      
+      while((direntp = readdir(dir)))
+        {
+          dirnames.push_back(direntp->d_name);
+        }
+      
+      closedir(dir);
+    }
+
+  return dirnames;
+}
+
+/* EOF */