From 94dbdf73e06c95144efc88fb6a74ddb517613186 Mon Sep 17 00:00:00 2001 From: Rosemary Witchaven <32779090+in1tiate@users.noreply.github.com> Date: Sat, 21 May 2022 09:21:34 -0500 Subject: 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 Co-authored-by: Alex Noir --- include/aoevidencedisplay.h | 11 ++++++++--- include/courtroom.h | 1 + 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'include') 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 #include +#include 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(); -- cgit