1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:27:35 +00:00

Maps: Zoom on doubleclick

This commit is contained in:
Jelle Raaijmakers 2023-09-05 20:14:47 +02:00
parent 0f330a4dcf
commit ec416563a8
2 changed files with 19 additions and 12 deletions

View file

@ -72,26 +72,22 @@ public:
private:
MapWidget(Options const&);
virtual void doubleclick_event(GUI::MouseEvent&) override;
virtual void mousemove_event(GUI::MouseEvent&) override;
virtual void mousedown_event(GUI::MouseEvent&) override;
virtual void mouseup_event(GUI::MouseEvent&) override;
virtual void mousewheel_event(GUI::MouseEvent&) override;
virtual void paint_event(GUI::PaintEvent&) override;
void set_zoom_for_mouse_event(int zoom, GUI::MouseEvent&);
Optional<RefPtr<Gfx::Bitmap>> get_tile_image(int x, int y, int zoom, TileDownloadBehavior);
void process_tile_queue();
void clear_tile_queue();
void paint_tiles(GUI::Painter&);
void paint_scale_line(GUI::Painter&, String label, Gfx::IntRect rect);
void paint_scale(GUI::Painter&);
void paint_attribution(GUI::Painter&);
static int constexpr TILE_SIZE = 256;