SD Card Navigation via Touch #310
This commit is contained in:
@@ -211,10 +211,10 @@ class FlashDialog: public FullScreenDialog
|
|||||||
Progress progress;
|
Progress progress;
|
||||||
};
|
};
|
||||||
|
|
||||||
class sdManagerButton : public TextButton
|
class SDmanagerButton : public TextButton
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
sdManagerButton(FormGroup* parent, const rect_t& rect, std::string text,
|
SDmanagerButton(FormGroup* parent, const rect_t& rect, std::string text,
|
||||||
std::function<uint8_t(void)> pressHandler = nullptr,
|
std::function<uint8_t(void)> pressHandler = nullptr,
|
||||||
WindowFlags windowFlags = BUTTON_BACKGROUND | OPAQUE,
|
WindowFlags windowFlags = BUTTON_BACKGROUND | OPAQUE,
|
||||||
LcdFlags textFlags = 0 ) : TextButton(parent, rect, text, pressHandler, windowFlags, textFlags)
|
LcdFlags textFlags = 0 ) : TextButton(parent, rect, text, pressHandler, windowFlags, textFlags)
|
||||||
@@ -272,7 +272,7 @@ void RadioSdManagerPage::build(FormWindow * window)
|
|||||||
files.sort(compare_nocase);
|
files.sort(compare_nocase);
|
||||||
|
|
||||||
for (auto name: directories) {
|
for (auto name: directories) {
|
||||||
auto b = new sdManagerButton(window, grid.getLabelSlot(), name, [=]() -> uint8_t {
|
auto b = new SDmanagerButton(window, grid.getLabelSlot(), name, [=]() -> uint8_t {
|
||||||
std::string fullpath = currentPath + "/" + name;
|
std::string fullpath = currentPath + "/" + name;
|
||||||
f_chdir((TCHAR*)fullpath.c_str());
|
f_chdir((TCHAR*)fullpath.c_str());
|
||||||
window->clear();
|
window->clear();
|
||||||
@@ -284,7 +284,7 @@ void RadioSdManagerPage::build(FormWindow * window)
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (auto name: files) {
|
for (auto name: files) {
|
||||||
auto button = new sdManagerButton(window, grid.getLabelSlot(), name, [=]() -> uint8_t {
|
auto button = new SDmanagerButton(window, grid.getLabelSlot(), name, [=]() -> uint8_t {
|
||||||
auto menu = new Menu(window);
|
auto menu = new Menu(window);
|
||||||
f_chdir(currentPath.c_str());
|
f_chdir(currentPath.c_str());
|
||||||
const char *ext = getFileExtension(name.data());
|
const char *ext = getFileExtension(name.data());
|
||||||
|
|||||||
Reference in New Issue
Block a user