00001 00005 /* Copyright © 2009 James Legg. 00006 This program is free software: you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation, either version 3 of the License, or 00009 (at your option) any later version. 00010 */ 00011 #ifndef MENU_H_ 00012 #define MENU_H_ 00013 00014 #include "../Engine/InputReport.h" 00015 #include "MenuItem.h" 00016 00017 #include <vector> 00018 00019 namespace UI 00020 { 00021 00024 class Menu 00025 { 00026 public: 00027 Menu(); 00028 virtual ~Menu(); 00033 void insert_item(MenuItem * item); 00035 void draw(); 00037 void take_input(Engine::InputReport & report); 00041 bool want_to_quit(); 00042 protected: 00043 unsigned int get_total_width(); 00044 std::vector<MenuItem *> items; 00045 unsigned int max_width; 00046 std::size_t selected_item; 00047 Menu * active_sub_menu; 00048 Menu * parent; 00049 bool quit; 00050 }; 00051 00052 } 00053 00054 #endif /*MENU_H_*/
Generated at Mon Sep 6 00:41:13 2010 by Doxygen version 1.4.7 for Racer version svn335.