about summary refs log tree commit diff stats
path: root/data/maps/the_partial/metadata.txtpb
blob: 48e9f42a44bc2dd0e477c47474b32b3437e516af (plain) (blame)
1
display_name: "The Partial"
ion' href='/lingo-ap-tracker/blame/area_popup.h?id=4ec5bf36218ad715657bba7649598410feae2794'>^
09d67fb ^
6e0f691 ^

adbc262 ^

6e0f691 ^
79424e8 ^





0a3c0c6 ^
22014b9 ^


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60








                             

                 
                                           


                                           
                         

                          


                                                    
         















                                                                            
                                    


                                              
 
               
 

                                 

                                 
 





                                         
                     


                                                        
#ifndef AREA_POPUP_H_03FAC988
#define AREA_POPUP_H_03FAC988

#include <wx/wxprec.h>

#ifndef WX_PRECOMP
#include <wx/wx.h>
#endif

#include <vector>

class AreaPopup : public wxScrolledCanvas {
 public:
  AreaPopup(wxWindow* parent, int area_id);

  void ResetIndicators();
  void UpdateIndicators();

  int GetFullWidth() const { return full_width_; }
  int GetFullHeight() const { return full_height_; }

 private:
  enum IndicatorType {
    kLOCATION,
    kPAINTING,
  };

  struct IndicatorInfo {
    // For locations, the id is an index into the map area's locations list.
    // For paintings, it is a real painting id.
    int id;
    IndicatorType type;
    int y;

    IndicatorInfo(int id, IndicatorType type, int y)
        : id(id), type(type), y(y) {}
  };

  void OnPaint(wxPaintEvent& event);
  void OnDPIChanged(wxDPIChangedEvent& event);

  void LoadIcons();

  int area_id_;

  const wxBitmap* unchecked_eye_;
  const wxBitmap* checked_eye_;
  const wxBitmap* unchecked_owl_;
  const wxBitmap* checked_owl_;

  int full_width_ = 0;
  int full_height_ = 0;
  wxSize header_extent_;

  std::vector<IndicatorInfo> indicators_;

  wxBitmap rendered_;
};

#endif /* end of include guard: AREA_POPUP_H_03FAC988 */