#include <cassert>
#include <stdexcept>
-#include "menu.h"
-#include "video/screen.h"
-#include "video/drawing_context.h"
-#include "gettext.h"
-#include "math/vector.h"
-#include "main.h"
-#include "resources.h"
-#include "control/joystickkeyboardcontroller.h"
+#include "menu.hpp"
+#include "video/screen.hpp"
+#include "video/drawing_context.hpp"
+#include "gettext.hpp"
+#include "math/vector.hpp"
+#include "main.hpp"
+#include "resources.hpp"
+#include "control/joystickkeyboardcontroller.hpp"
static const int MENU_REPEAT_INITIAL = 400;
static const int MENU_REPEAT_RATE = 200;
while(true)
{
SDL_Event event;
-
- if(event.type == SDL_QUIT)
- throw std::runtime_error("received window close event");
-
while (SDL_PollEvent(&event)) {
+ if(event.type == SDL_QUIT)
+ throw std::runtime_error("received window close event");
+ main_controller->process_event(event);
dialog->event(event);
}
void
Menu::draw(DrawingContext& context)
{
+ if(MouseCursor::current()) {
+ MouseCursor::current()->draw(context);
+ }
+
int menu_height = get_height();
int menu_width = get_width();