]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Menu/Menu.cpp
Add The Seven Tasks campaign by Philtron R./skraeling
[lugaru.git] / Source / Menu / Menu.cpp
index 3639740d64cc1d7886d420547f2c09e813b64bfb..1ce296024ac0dc8af26e6ad0a34a1ceeceb39abd 100644 (file)
@@ -18,19 +18,20 @@ You should have received a copy of the GNU General Public License
 along with Lugaru.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-#include <vector>
-#include <string>
-#include <set>
+#include "Menu/Menu.hpp"
 
-#include "Graphic/gamegl.h"
-#include "Level/Campaign.h"
-#include "Menu/Menu.h"
-#include "User/Settings.h"
-#include "Utils/Input.h"
+#include "Audio/openal_wrapper.hpp"
+#include "Graphic/gamegl.hpp"
+#include "Level/Campaign.hpp"
+#include "User/Settings.hpp"
+#include "Utils/Input.hpp"
 
 // Should not be needed, Menu should call methods from other classes to launch maps and challenges and so on
-#include "Level/Awards.h"
-#include "Audio/openal_wrapper.h"
+#include "Level/Awards.hpp"
+
+#include <set>
+#include <string>
+#include <vector>
 
 using namespace Game;
 
@@ -140,7 +141,7 @@ void Menu::setText(int id, const string& text, int x, int y, int w, int h)
 
 int Menu::getSelected(int mousex, int mousey)
 {
-    for (vector<MenuItem>::iterator it = items.begin(); it != items.end(); it++)
+    for (vector<MenuItem>::reverse_iterator it = items.rbegin(); it != items.rend(); it++)
         if (it->type == MenuItem::BUTTON || it->type == MenuItem::IMAGEBUTTON || it->type == MenuItem::MAPMARKER) {
             int mx = mousex;
             int my = mousey;