From 9f25878acfe1c7281a96f83742349516510c5b6d Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Tue, 2 May 2023 10:07:25 -0400 Subject: Added areas to map --- area_window.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 area_window.h (limited to 'area_window.h') diff --git a/area_window.h b/area_window.h new file mode 100644 index 0000000..0806da4 --- /dev/null +++ b/area_window.h @@ -0,0 +1,30 @@ +#ifndef AREA_WINDOW_H_C2653ACF +#define AREA_WINDOW_H_C2653ACF + +#include + +#ifndef WX_PRECOMP +#include +#endif + +class AreaWindow : public wxWindow { + public: + static constexpr int ACTUAL_SIZE = 64; + static constexpr int BORDER_SIZE = 5; + static constexpr int EFFECTIVE_SIZE = ACTUAL_SIZE + BORDER_SIZE * 2; + + AreaWindow(wxWindow* parent, int area_id); + + int GetAreaId() const { return area_id_; } + + private: + void OnPaint(wxPaintEvent& event); + void OnEnterWindow(wxMouseEvent& event); + + void Redraw(); + + int area_id_; + wxBitmap rendered_; +}; + +#endif /* end of include guard: AREA_WINDOW_H_C2653ACF */ -- cgit 1.4.1