From: Côme Chilliet Date: Mon, 12 Dec 2016 15:59:30 +0000 (+0700) Subject: Fixes #41 It was hard to click on the next campaign level when it’s above an old one X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=7f45dd962aa9f09580d7434831abafaadbe37a9b;p=lugaru.git Fixes #41 It was hard to click on the next campaign level when it’s above an old one --- diff --git a/Source/Menu/Menu.cpp b/Source/Menu/Menu.cpp index 7d8bce8..1ce2960 100644 --- a/Source/Menu/Menu.cpp +++ b/Source/Menu/Menu.cpp @@ -141,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;