mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Use lambda callbacks instead of listeners with Slider, Button, Label, ComboBox and TextEditor classes
This commit is contained in:
parent
6d8d90e9d8
commit
e690350df3
30 changed files with 114 additions and 258 deletions
|
|
@ -58,7 +58,7 @@ void PreferencesPanel::addSettingsPage (const String& title,
|
|||
|
||||
button->setImages (icon, overIcon, downIcon);
|
||||
button->setRadioGroupId (1);
|
||||
button->addListener (this);
|
||||
button->onClick = [this] { clickedPage(); };
|
||||
button->setClickingTogglesState (true);
|
||||
button->setWantsKeyboardFocus (false);
|
||||
addAndMakeVisible (button);
|
||||
|
|
@ -142,7 +142,7 @@ void PreferencesPanel::setCurrentPage (const String& pageName)
|
|||
}
|
||||
}
|
||||
|
||||
void PreferencesPanel::buttonClicked (Button*)
|
||||
void PreferencesPanel::clickedPage()
|
||||
{
|
||||
for (auto* b : buttons)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue