X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FMenu%2FMenu.cpp;h=1ce296024ac0dc8af26e6ad0a34a1ceeceb39abd;hb=ee7c612b1ec8c5000d90a53dc2e5ab76f367d5cf;hp=3639740d64cc1d7886d420547f2c09e813b64bfb;hpb=b84825978803615f45a9f128232e62431042aec0;p=lugaru.git diff --git a/Source/Menu/Menu.cpp b/Source/Menu/Menu.cpp index 3639740..1ce2960 100644 --- a/Source/Menu/Menu.cpp +++ b/Source/Menu/Menu.cpp @@ -18,19 +18,20 @@ You should have received a copy of the GNU General Public License along with Lugaru. If not, see . */ -#include -#include -#include +#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 +#include +#include 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::iterator it = items.begin(); it != items.end(); it++) + for (vector::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;