From 22014b967d0d9651b72bffbe02aba75dc98180a4 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Tue, 2 May 2023 12:05:05 -0400 Subject: Show locations popup when hovering over area --- area_window.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'area_window.h') diff --git a/area_window.h b/area_window.h index 0806da4..c9abc4c 100644 --- a/area_window.h +++ b/area_window.h @@ -7,24 +7,30 @@ #include #endif +#include "area_popup.h" + 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); + AreaWindow(wxWindow* parent, int area_id, AreaPopup* popup); int GetAreaId() const { return area_id_; } + AreaPopup* GetPopup() { return popup_; } + private: void OnPaint(wxPaintEvent& event); void OnEnterWindow(wxMouseEvent& event); + void OnLeaveWindow(wxMouseEvent& event); void Redraw(); int area_id_; wxBitmap rendered_; + AreaPopup* popup_; }; #endif /* end of include guard: AREA_WINDOW_H_C2653ACF */ -- cgit 1.4.1