mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-10 15:04:19 +00:00
add icon
This commit is contained in:
parent
4a673397b3
commit
8c0ba4de9f
1 changed files with 13 additions and 0 deletions
|
@ -2,6 +2,18 @@
|
|||
#include "../js_modules.h"
|
||||
#include <dialogs/dialogs.h>
|
||||
|
||||
// File icon
|
||||
#include <gui/icon_i.h>
|
||||
static const uint8_t _I_file_10px_0[] = {
|
||||
0x00, 0x7f, 0x00, 0xa1, 0x00, 0x2d, 0x01, 0xe1, 0x01, 0x0d, 0x01,
|
||||
0x01, 0x01, 0x7d, 0x01, 0x01, 0x01, 0x01, 0x01, 0xff, 0x01,
|
||||
};
|
||||
static const uint8_t* const _I_file_10px[] = {_I_file_10px_0};
|
||||
|
||||
static const Icon I_file_10px =
|
||||
{.width = 10, .height = 10, .frame_count = 1, .frame_rate = 0, .frames = _I_file_10px};
|
||||
// File icon end
|
||||
|
||||
static bool js_dialog_msg_parse_params(struct mjs* mjs, const char** hdr, const char** msg) {
|
||||
size_t num_args = mjs_nargs(mjs);
|
||||
if(num_args != 2) {
|
||||
|
@ -166,6 +178,7 @@ static void js_dialog_pick_file(struct mjs* mjs) {
|
|||
DialogsApp* dialogs = furi_record_open(RECORD_DIALOGS);
|
||||
const DialogsFileBrowserOptions browser_options = {
|
||||
.extension = extension,
|
||||
.icon = &I_file_10px,
|
||||
.base_path = base_path,
|
||||
};
|
||||
FuriString* path = furi_string_alloc_set(base_path);
|
||||
|
|
Loading…
Reference in a new issue