mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 01:17:36 +00:00
LibGUI: Include keyboard modifier state with button on_click calls
This will allow you us to implement special behavior when Ctrl+clicking a button.
This commit is contained in:
parent
3a905aed06
commit
977863ea07
37 changed files with 76 additions and 76 deletions
|
@ -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] {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue