Skip to content

Commit

Permalink
[example] Add hotkey for buttons of example.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarod42 committed Sep 29, 2024
1 parent 9c680cf commit 9145fdb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/widgets_example.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,13 @@ namespace WidgetsExample

button = std::make_unique<gcn::Button>("Button");

button->setHotKey('b');
button->addActionListener(this);

imageButton = std::make_unique<gcn::ImageButton>("guisan-logo.png");

imageButton->setSize(220, 90);
imageButton->setHotKey('g');
imageButton->addActionListener(this);

imageTextButton = std::make_unique<gcn::ImageTextButton>("guisan-logo.png", "Change color");
Expand Down

0 comments on commit 9145fdb

Please sign in to comment.