Deluge Firmware
1.3.0
Build date: 2026.08.23
Toggle main menu visibility
Loading...
Searching...
No Matches
reset.h
1
/*
2
* Copyright © 2026 Sean Ditny
3
*
4
* This file is part of The Synthstrom Audible Deluge Firmware.
5
*
6
* The Synthstrom Audible Deluge Firmware is free software: you can redistribute it and/or modify it under the
7
* terms of the GNU General Public License as published by the Free Software Foundation,
8
* either version 3 of the License, or (at your option) any later version.
9
*
10
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
11
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
* See the GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License along with this program.
15
* If not, see <https://www.gnu.org/licenses/>.
16
*/
17
18
#pragma once
19
20
#include "gui/context_menu/reset_settings.h"
21
#include "gui/menu_item/menu_item.h"
22
23
namespace
deluge::gui::menu_item::reset_settings {
24
25
class
Reset final :
public
MenuItem {
26
public
:
27
Reset(l10n::String
name
, context_menu::ResetSettingsAction action) : MenuItem(
name
), action_(action) {}
28
29
MenuItem*
selectButtonPress
()
override
{
30
context_menu::resetSettings.setAction(action_);
31
context_menu::resetSettings.setupAndCheckAvailability();
32
openUI(&context_menu::resetSettings);
33
return
NO_NAVIGATION;
34
}
35
36
bool
shouldEnterSubmenu
()
override
{
return
false
; }
37
38
private
:
39
context_menu::ResetSettingsAction action_;
40
};
41
42
}
// namespace deluge::gui::menu_item::reset_settings
MenuItem::name
const deluge::l10n::String name
Default name for use on OLED for deluge::gui::menu_item::Submenu s.
Definition
menu_item.h:253
deluge::gui::menu_item::reset_settings::Reset::selectButtonPress
MenuItem * selectButtonPress() override
Handle a select button press.
Definition
reset.h:29
deluge::gui::menu_item::reset_settings::Reset::shouldEnterSubmenu
bool shouldEnterSubmenu() override
Check if selecting this menu item (with select encoder) should enter a submenu.
Definition
reset.h:36