ScummVM API documentation
kia_section_clues.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef BLADERUNNER_KIA_SECTION_CLUES_H
23 #define BLADERUNNER_KIA_SECTION_CLUES_H
24 
25 #include "bladerunner/ui/kia_section_base.h"
26 
27 #include "common/array.h"
28 #include "common/str.h"
29 
30 namespace BladeRunner {
31 
32 class ActorClues;
33 class UIContainer;
34 class UIImagePicker;
35 class UIScrollBox;
36 
38  static const int kClueCount = 288;
39 
40  struct Line {
41  Common::String crimeName;
42  int lineData;
43  int flags;
44  };
45 
46  UIContainer *_uiContainer;
47  UIImagePicker *_buttons;
48  UIScrollBox *_cluesScrollBox;
49  UIScrollBox *_filterScrollBox;
50 
51  bool _isOpen;
52  bool _debugIntangible;
53  int _debugNop;
54  ActorClues *_clues;
55 
56  int _assetTypeFilterCount;
57  int _crimeFilterCount;
58  int _filterCount;
59  Common::Array<bool> _filters;
60 
61  int _mouseX;
62  int _mouseY;
63 
64 public:
66  ~KIASectionClues() override;
67 
68  void reset();
69 
70  void open() override;
71  void close() override;
72 
73  void draw(Graphics::Surface &surface) override;
74 
75  void handleMouseMove(int mouseX, int mouseY) override;
76  void handleMouseDown(bool mainButton) override;
77  void handleMouseUp(bool mainButton) override;
78  void handleMouseScroll(int direction) override;
79 
80  void saveToLog();
81  void loadFromLog();
82 
83 private:
84  static void scrollBoxCallback(void *callbackData, void *source, int lineData, int mouseButton);
85  static void mouseUpCallback(int buttonId, void *callbackData);
86 
87  void onButtonPressed(int buttonId) override;
88 
89  void enableAllFilters();
90  void disableAllFilters();
91 
92  void populateFilters();
93  void populateClues();
94 
95  int getClueFilterTypeTextId(int);
96  int getClueFilterCrimeId(int);
97  int getLineIdForAssetType(int assetType);
98  int getLineIdForCrimeId(int crimeId);
99 };
100 
101 } // End of namespace BladeRunner
102 
103 #endif
Definition: actor_clues.h:33
Definition: str.h:59
Definition: surface.h:67
Definition: actor.h:31
Definition: ui_container.h:33
Definition: kia_section_base.h:40
Definition: kia_section_clues.h:37
Definition: ui_image_picker.h:40
Definition: bladerunner.h:113
Definition: ui_scroll_box.h:36