- if(MouseCursor::current()) {
- MouseCursor::current()->draw(context);
- }
-
- float menu_width = get_width();
- float menu_height = get_height();
-
- if (effect_progress != 1.0f)
- {
- if (close)
- {
- menu_width = (MenuManager::current_->get_width() * (1.0f - effect_progress));
- menu_height = (MenuManager::current_->get_height() * (1.0f - effect_progress));
- }
- else if (MenuManager::previous)
- {
- menu_width = (menu_width * effect_progress) + (MenuManager::previous->get_width() * (1.0f - effect_progress));
- menu_height = (menu_height * effect_progress) + (MenuManager::previous->get_height() * (1.0f - effect_progress));
- //std::cout << effect_progress << " " << this << " " << last_menus.back() << std::endl;
- }
- else
- {
- menu_width *= effect_progress;
- menu_height *= effect_progress;
- }
- }
-
- /* Draw a transparent background */
- context.draw_filled_rect(Rect(Vector(pos_x - menu_width/2-4, pos_y - menu_height/2 - 10-4),
- Vector(pos_x + menu_width/2+4, pos_y - menu_height/2 + 10 + menu_height+4)),
- Color(0.2f, 0.3f, 0.4f, 0.8f),
- 20.0f,
- LAYER_GUI-10);
-
- context.draw_filled_rect(Rect(Vector(pos_x - menu_width/2, pos_y - menu_height/2 - 10),
- Vector(pos_x + menu_width/2, pos_y - menu_height/2 + 10 + menu_height)),
- Color(0.6f, 0.7f, 0.8f, 0.5f),
- 16.0f,
- LAYER_GUI-10);