diff options
| author | Rosemary Witchaven <32779090+in1tiate@users.noreply.github.com> | 2022-05-21 09:21:34 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-21 16:21:34 +0200 |
| commit | 94dbdf73e06c95144efc88fb6a74ddb517613186 (patch) | |
| tree | 8d03f68720cbd99db43132c4535f9873e14d376c /include | |
| parent | 8657f7c2a2fbcbce52b744de50159ac5cdcc0ae8 (diff) | |
Feature: Clicking the evidence icon when it's presented by a player will show the details of that evidence (#760)
* Add click-to-view evidence icons
* Fix the clicky icon not being functional if the presented evidence comes from a different page from the first
Co-authored-by: in1tiate <radwoodward@vikings.grayson.edu>
Co-authored-by: Alex Noir <Varsash@gmail.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/aoevidencedisplay.h | 11 | ||||
| -rw-r--r-- | include/courtroom.h | 1 |
2 files changed, 9 insertions, 3 deletions
diff --git a/include/aoevidencedisplay.h b/include/aoevidencedisplay.h index ff448c91..df4a0377 100644 --- a/include/aoevidencedisplay.h +++ b/include/aoevidencedisplay.h @@ -7,6 +7,7 @@ #include <QDebug> #include <QLabel> +#include <QPushButton> class AOEvidenceDisplay : public QLabel { Q_OBJECT @@ -14,19 +15,23 @@ class AOEvidenceDisplay : public QLabel { public: AOEvidenceDisplay(QWidget *p_parent, AOApplication *p_ao_app); - void show_evidence(QString p_evidence_image, bool is_left_side, int p_volume); - QLabel *get_evidence_icon(); + void show_evidence(int p_index, QString p_evidence_image, bool is_left_side, int p_volume); void reset(); void combo_resize(int w, int h); +signals: + void show_evidence_details(int index); + private: AOApplication *ao_app; InterfaceLayer *evidence_movie; - QLabel *evidence_icon; + QPushButton *evidence_icon; AOSfxPlayer *sfx_player; + int last_evidence_index = -1; private slots: void show_done(); + void icon_clicked(); }; #endif // AOEVIDENCEDISPLAY_H diff --git a/include/courtroom.h b/include/courtroom.h index 55e8b4e8..13c639a8 100644 --- a/include/courtroom.h +++ b/include/courtroom.h @@ -812,6 +812,7 @@ private: void initialize_evidence(); void refresh_evidence(); + void show_evidence(int f_real_id); void set_evidence_page(); void reset_ui(); |
