Fixed typo
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
#define MAX_BTN_NUM 14
|
#define MAX_BTN_NUM 14
|
||||||
|
|
||||||
void key_fileindex_floder_cb(epdgui_args_vector_t &args) {
|
void key_fileindex_folder_cb(epdgui_args_vector_t &args) {
|
||||||
Frame_Base *frame = new Frame_FileIndex(((EPDGUI_Button*)(args[0]))->GetCustomString());
|
Frame_Base *frame = new Frame_FileIndex(((EPDGUI_Button*)(args[0]))->GetCustomString());
|
||||||
EPDGUI_PushFrame(frame);
|
EPDGUI_PushFrame(frame);
|
||||||
*((int*)(args[1])) = 0;
|
*((int*)(args[1])) = 0;
|
||||||
@@ -65,24 +65,24 @@ void Frame_FileIndex::listDir(fs::FS &fs, const char *dirname) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<File> floders;
|
std::vector<File> folders;
|
||||||
std::vector<File> files;
|
std::vector<File> files;
|
||||||
|
|
||||||
File file = root.openNextFile();
|
File file = root.openNextFile();
|
||||||
while (file) {
|
while (file) {
|
||||||
if (file.isDirectory()) {
|
if (file.isDirectory()) {
|
||||||
floders.push_back(file);
|
folders.push_back(file);
|
||||||
} else {
|
} else {
|
||||||
files.push_back(file);
|
files.push_back(file);
|
||||||
}
|
}
|
||||||
file = root.openNextFile();
|
file = root.openNextFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int n = 0; n < floders.size(); n++) {
|
for (int n = 0; n < folders.size(); n++) {
|
||||||
if (_key_files.size() > MAX_BTN_NUM) {
|
if (_key_files.size() > MAX_BTN_NUM) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
File file = floders[n];
|
File file = folders[n];
|
||||||
EPDGUI_Button *btn = new EPDGUI_Button(4, 100 + _key_files.size() * 60, 532, 61);
|
EPDGUI_Button *btn = new EPDGUI_Button(4, 100 + _key_files.size() * 60, 532, 61);
|
||||||
_key_files.push_back(btn);
|
_key_files.push_back(btn);
|
||||||
|
|
||||||
@@ -99,14 +99,14 @@ void Frame_FileIndex::listDir(fs::FS &fs, const char *dirname) {
|
|||||||
btn->CanvasNormal()->drawString(filename, 47 + 13, 35);
|
btn->CanvasNormal()->drawString(filename, 47 + 13, 35);
|
||||||
btn->SetCustomString(file.name());
|
btn->SetCustomString(file.name());
|
||||||
btn->CanvasNormal()->setTextDatum(CR_DATUM);
|
btn->CanvasNormal()->setTextDatum(CR_DATUM);
|
||||||
btn->CanvasNormal()->pushImage(15, 14, 32, 32, ImageResource_item_icon_file_floder_32x32);
|
btn->CanvasNormal()->pushImage(15, 14, 32, 32, ImageResource_item_icon_file_folder_32x32);
|
||||||
btn->CanvasNormal()->pushImage(532 - 15 - 32, 14, 32, 32, ImageResource_item_icon_arrow_r_32x32);
|
btn->CanvasNormal()->pushImage(532 - 15 - 32, 14, 32, 32, ImageResource_item_icon_arrow_r_32x32);
|
||||||
*(btn->CanvasPressed()) = *(btn->CanvasNormal());
|
*(btn->CanvasPressed()) = *(btn->CanvasNormal());
|
||||||
btn->CanvasPressed()->ReverseColor();
|
btn->CanvasPressed()->ReverseColor();
|
||||||
|
|
||||||
btn->AddArgs(EPDGUI_Button::EVENT_RELEASED, 0, btn);
|
btn->AddArgs(EPDGUI_Button::EVENT_RELEASED, 0, btn);
|
||||||
btn->AddArgs(EPDGUI_Button::EVENT_RELEASED, 1, (void*)(&_is_run));
|
btn->AddArgs(EPDGUI_Button::EVENT_RELEASED, 1, (void*)(&_is_run));
|
||||||
btn->Bind(EPDGUI_Button::EVENT_RELEASED, key_fileindex_floder_cb);
|
btn->Bind(EPDGUI_Button::EVENT_RELEASED, key_fileindex_folder_cb);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int n = 0; n < files.size(); n++) {
|
for (int n = 0; n < files.size(); n++) {
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
// ImageResource_home_icon_socket_on_92x92
|
// ImageResource_home_icon_socket_on_92x92
|
||||||
// ImageResource_item_icon_arrow_l_32x32
|
// ImageResource_item_icon_arrow_l_32x32
|
||||||
// ImageResource_item_icon_arrow_r_32x32
|
// ImageResource_item_icon_arrow_r_32x32
|
||||||
// ImageResource_item_icon_file_floder_32x32
|
// ImageResource_item_icon_file_folder_32x32
|
||||||
// ImageResource_item_icon_file_image_32x32
|
// ImageResource_item_icon_file_image_32x32
|
||||||
// ImageResource_item_icon_file_text_32x32
|
// ImageResource_item_icon_file_text_32x32
|
||||||
// ImageResource_item_icon_file_unknow_32x32
|
// ImageResource_item_icon_file_unknow_32x32
|
||||||
@@ -9647,7 +9647,7 @@ const unsigned char ImageResource_item_icon_arrow_r_32x32[512] = {
|
|||||||
0x00, 0x00
|
0x00, 0x00
|
||||||
};
|
};
|
||||||
|
|
||||||
const unsigned char ImageResource_item_icon_file_floder_32x32[512] = {
|
const unsigned char ImageResource_item_icon_file_folder_32x32[512] = {
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
|||||||
Reference in New Issue
Block a user