diff options
author | Andreas Kling <kling@serenityos.org> | 2020-05-12 20:30:33 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-12 20:31:16 +0200 |
commit | 977863ea078e829df10d351a2e9ac3097fb8f5d9 (patch) | |
tree | 5ea075feaa74d0ff74381399c85cae1bfbaaa6b0 /Games | |
parent | 3a905aed063e84331aec82826926cdb89d777892 (diff) | |
download | serenity-977863ea078e829df10d351a2e9ac3097fb8f5d9.zip |
LibGUI: Include keyboard modifier state with button on_click calls
This will allow you us to implement special behavior when Ctrl+clicking
a button.
Diffstat (limited to 'Games')
-rw-r--r-- | Games/Minesweeper/Field.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Games/Minesweeper/Field.cpp b/Games/Minesweeper/Field.cpp index fde8517cbf..c41fd59de9 100644 --- a/Games/Minesweeper/Field.cpp +++ b/Games/Minesweeper/Field.cpp @@ -147,7 +147,7 @@ Field::Field(GUI::Label& flag_label, GUI::Label& time_label, GUI::Button& face_b set_fill_with_background_color(true); reset(); - m_face_button.on_click = [this] { reset(); }; + m_face_button.on_click = [this](auto) { reset(); }; set_face(Face::Default); { @@ -260,7 +260,7 @@ void Field::reset() square.label->set_icon(square.has_mine ? m_mine_bitmap : nullptr); if (!square.button) { square.button = add<SquareButton>(); - square.button->on_click = [this, &square] { + square.button->on_click = [this, &square](auto) { on_square_clicked(square); }; square.button->on_right_click = [this, &square] { |