00001 // SuperTux 00002 // Copyright (C) 2009 Ingo Ruhnke <grumbel@gmx.de> 00003 // 00004 // This program is free software: you can redistribute it and/or modify 00005 // it under the terms of the GNU General Public License as published by 00006 // the Free Software Foundation, either version 3 of the License, or 00007 // (at your option) any later version. 00008 // 00009 // This program is distributed in the hope that it will be useful, 00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 // GNU General Public License for more details. 00013 // 00014 // You should have received a copy of the GNU General Public License 00015 // along with this program. If not, see <http://www.gnu.org/licenses/>. 00016 00017 #include "supertux/menu/menu_storage.hpp" 00018 00019 #include "supertux/menu/options_menu.hpp" 00020 #include "supertux/menu/profile_menu.hpp" 00021 #include "supertux/menu/joystick_menu.hpp" 00022 #include "supertux/menu/keyboard_menu.hpp" 00023 #include "supertux/globals.hpp" 00024 00025 OptionsMenu* MenuStorage::options_menu = 0; 00026 ProfileMenu* MenuStorage::profile_menu = 0; 00027 KeyboardMenu* MenuStorage::key_options_menu = 0; 00028 JoystickMenu* MenuStorage::joystick_options_menu = 0; 00029 00030 OptionsMenu* 00031 MenuStorage::get_options_menu() 00032 { 00033 options_menu = new OptionsMenu(); 00034 return options_menu; 00035 } 00036 00037 ProfileMenu* 00038 MenuStorage::get_profile_menu() 00039 { 00040 profile_menu = new ProfileMenu(); 00041 return profile_menu; 00042 } 00043 00044 KeyboardMenu* 00045 MenuStorage::get_key_options_menu() 00046 { 00047 if (!key_options_menu) 00048 { // FIXME: this in never freed 00049 key_options_menu = new KeyboardMenu(g_jk_controller); 00050 } 00051 00052 return key_options_menu; 00053 } 00054 00055 JoystickMenu* 00056 MenuStorage::get_joystick_options_menu() 00057 { 00058 if (!joystick_options_menu) 00059 { // FIXME: this in never freed 00060 joystick_options_menu = new JoystickMenu(g_jk_controller); 00061 } 00062 00063 return joystick_options_menu; 00064 } 00065 00066 /* EOF */