blob: 1637125c6626dd3e2855ed6db31740106b4d2fe3 (
plain) (
tree)
|
|
#ifndef SUBWAY_MAP_H_BD2D843E
#define SUBWAY_MAP_H_BD2D843E
#include <wx/wxprec.h>
#ifndef WX_PRECOMP
#include <wx/wx.h>
#endif
#include <memory>
#include <optional>
#include <set>
#include <string>
#include <vector>
#include <quadtree/Quadtree.h>
#include "game_data.h"
#include "network_set.h"
class SubwayMap : public wxPanel {
public:
SubwayMap(wxWindow *parent);
void OnConnect();
void UpdateIndicators();
void UpdatePainting(std::string from_painting_id,
std::optional<std::string> to_painting_id);
void UpdateSunwarp(SubwaySunwarp from_sunwarp, SubwaySunwarp to_sunwarp);
private:
void OnPaint(wxPaintEvent &event);
void OnMouseMove(wxMouseEvent &event);
void Redraw();
wxImage map_image_;
wxImage owl_image_;
wxBitmap rendered_;
int render_x_ = 0;
int render_y_ = 0;
int render_width_ = 0;
int render_height_ = 0;
struct GetItemBox {
quadtree::Box<float> operator()(const int &id) const;
};
std::unique_ptr<quadtree::Quadtree<int, GetItemBox>> tree_;
std::optional<int> hovered_item_;
NetworkSet networks_;
std::set<std::string> checked_paintings_;
};
#endif /* end of include guard: SUBWAY_MAP_H_BD2D843E */
|