forked from pr3y/Bruce
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added setting to disable menu items, moved file manager to top-level (p…
- Loading branch information
Showing
8 changed files
with
93 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#include "FileMenu.h" | ||
#include "core/display.h" | ||
#include "core/sd_functions.h" | ||
|
||
void FileMenu::optionsMenu() { | ||
options = { | ||
{"SD Card", [=]() { loopSD(SD); }}, | ||
{"LittleFS", [=]() { loopSD(LittleFS); }}, | ||
{"Main Menu", [=]() { backToMenu(); }}, | ||
}; | ||
|
||
delay(200); | ||
loopOptions(options,false,true,"Files"); | ||
} | ||
|
||
String FileMenu::getName() { | ||
return _name; | ||
} | ||
|
||
void FileMenu::draw() { | ||
tft.fillRect(iconX,iconY,80,80,bruceConfig.bgColor); | ||
|
||
tft.drawRect(15+iconX, 5+iconY, 50, 70, bruceConfig.priColor); | ||
tft.fillRect(50+iconX, 5+iconY, 15, 15, bruceConfig.bgColor); | ||
tft.drawTriangle(50+iconX, 5+iconY, 50+iconX, 19+iconY, 64+iconX, 19+iconY, bruceConfig.priColor); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#ifndef __FILE_MENU_H__ | ||
#define __FILE_MENU_H__ | ||
|
||
#include "MenuItemInterface.h" | ||
|
||
|
||
class FileMenu : public MenuItemInterface { | ||
public: | ||
void optionsMenu(void); | ||
void draw(void); | ||
String getName(void); | ||
|
||
private: | ||
String _name = "Files"; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters