ScummVM API documentation
kia_section_suspects.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_SUSPECTS_H
23 #define BLADERUNNER_KIA_SECTION_SUSPECTS_H
24 
25 #include "bladerunner/ui/kia_section_base.h"
26 
27 #include "common/array.h"
28 
29 namespace BladeRunner {
30 
31 class ActorClues;
32 class BladeRunnerEngine;
33 class Shapes;
34 class UICheckBox;
35 class UIContainer;
36 class UIImagePicker;
37 class UIScrollBox;
38 
40  // _vm->_gameInfo->getClueCount()
41  static const int kClueCount = 288;
42 
43  struct AcquiredClue {
44  int clueId;
45  int actorId;
46  };
47 
48  bool _isOpen;
49 
50  UIContainer *_uiContainer;
51  UIImagePicker *_buttons;
52  UIScrollBox *_cluesScrollBox;
53  UIScrollBox *_crimesScrollBox;
54  UICheckBox *_whereaboutsCheckBox;
55  UICheckBox *_MOCheckBox;
56  UICheckBox *_replicantCheckBox;
57  UICheckBox *_nonReplicantCheckBox;
58  UICheckBox *_othersCheckBox;
59 
60  bool _whereaboutsFilter;
61  bool _MOFilter;
62  bool _replicantFilter;
63  bool _nonReplicantFilter;
64  bool _othersFilter;
65 
66  ActorClues *_clues;
67 
68  int _acquiredClueCount;
69  AcquiredClue _acquiredClues[kClueCount];
70 
71  int _suspectSelected;
72  int _suspectsFoundCount;
73  Common::Array<bool> _suspectsFound;
74  Common::Array<bool> _suspectsWithIdentity;
75 
76  int _mouseX;
77  int _mouseY;
78 
79  int _suspectPhotoShapeId;
80  int _suspectPhotoNotUsed;
81  Shapes *_suspectPhotoShapes;
82 
83 public:
84  int _crimeSelected;
85 
86 public:
88  ~KIASectionSuspects() override;
89 
90  void reset();
91 
92  void open() override;
93  void close() override;
94 
95  void draw(Graphics::Surface &surface) override;
96 
97  void handleMouseMove(int mouseX, int mouseY) override;
98  void handleMouseDown(bool mainButton) override;
99  void handleMouseUp(bool mainButton) override;
100  void handleMouseScroll(int direction) override;
101 
102  void saveToLog();
103  void loadFromLog();
104 
105  void selectSuspect(int suspectId);
106 
107 private:
108  static void scrollBoxCallback(void *callbackData, void *source, int lineData, int mouseButton);
109  static void checkBoxCallback(void *callbackData, void *source);
110  static void mouseUpCallback(int buttonId, void *callbackData);
111 
112  void onButtonPressed(int buttonId) override;
113 
114  void populateAcquiredClues();
115  void populateSuspects();
116  void populateCrimes();
117  void populateVisibleClues();
118  void updateSuspectPhoto();
119 
120  void nextSuspect();
121  void prevSuspect();
122 
123  void enableAllFilters();
124  void disableAllFilters();
125 };
126 
127 } // End of namespace BladeRunner
128 
129 #endif
Definition: actor_clues.h:33
Definition: surface.h:67
Definition: actor.h:31
Definition: ui_container.h:33
Definition: kia_section_base.h:40
Definition: ui_image_picker.h:40
Definition: bladerunner.h:113
Definition: kia_section_suspects.h:39
Definition: ui_scroll_box.h:36
Definition: ui_check_box.h:31
Definition: shape.h:61