New LF-RFID app (#534)
* Hal lfrfid: add read timer pulse and period config fns * New debug application for lfrfid subsystem * New lfrfid: app, fix naming * App lfrfid: assets * Container view module * App ibutton: remove unused header * App lfrfid scenes * App notification, add yield to blocking operations, add speaker volume control * App lfrfid: reading key scene * Assets: placeholder icon * App lfrfid: reworked container view module * App lfrfid: new scenes * App lfrfid: write scene * App lfrfid: write hid * App lfrfid: emulate scene * App lfrfid: save name scene * App lfrfid: add missing file
This commit is contained in:
@@ -39,8 +39,7 @@ static void dialog_ex_view_draw_callback(Canvas* canvas, void* _model) {
|
||||
canvas_clear(canvas);
|
||||
canvas_set_color(canvas, ColorBlack);
|
||||
|
||||
// TODO other criteria for the draw
|
||||
if(model->icon.x >= 0 && model->icon.y >= 0) {
|
||||
if(model->icon.name != I_Empty_1x1) {
|
||||
canvas_draw_icon_name(canvas, model->icon.x, model->icon.y, model->icon.name);
|
||||
}
|
||||
|
||||
@@ -135,10 +134,9 @@ DialogEx* dialog_ex_alloc() {
|
||||
model->text.horizontal = AlignLeft;
|
||||
model->text.vertical = AlignBottom;
|
||||
|
||||
// TODO other criteria for the draw
|
||||
model->icon.x = -1;
|
||||
model->icon.y = -1;
|
||||
model->icon.name = I_ButtonCenter_7x7;
|
||||
model->icon.x = 0;
|
||||
model->icon.y = 0;
|
||||
model->icon.name = I_Empty_1x1;
|
||||
|
||||
model->left_text = NULL;
|
||||
model->center_text = NULL;
|
||||
@@ -208,7 +206,7 @@ void dialog_ex_set_text(
|
||||
});
|
||||
}
|
||||
|
||||
void dialog_ex_set_icon(DialogEx* dialog_ex, int8_t x, int8_t y, IconName name) {
|
||||
void dialog_ex_set_icon(DialogEx* dialog_ex, uint8_t x, uint8_t y, IconName name) {
|
||||
furi_assert(dialog_ex);
|
||||
with_view_model(
|
||||
dialog_ex->view, (DialogExModel * model) {
|
||||
|
@@ -84,7 +84,7 @@ void dialog_ex_set_text(
|
||||
* @param x, y - icon position
|
||||
* @param name - icon to be shown
|
||||
*/
|
||||
void dialog_ex_set_icon(DialogEx* dialog_ex, int8_t x, int8_t y, IconName name);
|
||||
void dialog_ex_set_icon(DialogEx* dialog_ex, uint8_t x, uint8_t y, IconName name);
|
||||
|
||||
/* Set left button text
|
||||
* If text is null, left button will not be rendered and processed
|
||||
|
@@ -21,8 +21,8 @@ typedef struct {
|
||||
} TextElement;
|
||||
|
||||
typedef struct {
|
||||
int8_t x;
|
||||
int8_t y;
|
||||
uint8_t x;
|
||||
uint8_t y;
|
||||
IconName name;
|
||||
} IconElement;
|
||||
|
||||
@@ -39,8 +39,7 @@ static void popup_view_draw_callback(Canvas* canvas, void* _model) {
|
||||
canvas_clear(canvas);
|
||||
canvas_set_color(canvas, ColorBlack);
|
||||
|
||||
// TODO other criteria for the draw
|
||||
if(model->icon.x >= 0 && model->icon.y >= 0) {
|
||||
if(model->icon.name != I_Empty_1x1) {
|
||||
canvas_draw_icon_name(canvas, model->icon.x, model->icon.y, model->icon.name);
|
||||
}
|
||||
|
||||
@@ -137,10 +136,9 @@ Popup* popup_alloc() {
|
||||
model->text.horizontal = AlignLeft;
|
||||
model->text.vertical = AlignBottom;
|
||||
|
||||
// TODO other criteria for the draw
|
||||
model->icon.x = -1;
|
||||
model->icon.y = -1;
|
||||
model->icon.name = I_ButtonCenter_7x7;
|
||||
model->icon.x = 0;
|
||||
model->icon.y = 0;
|
||||
model->icon.name = I_Empty_1x1;
|
||||
return true;
|
||||
});
|
||||
return popup;
|
||||
@@ -206,7 +204,7 @@ void popup_set_text(
|
||||
});
|
||||
}
|
||||
|
||||
void popup_set_icon(Popup* popup, int8_t x, int8_t y, IconName name) {
|
||||
void popup_set_icon(Popup* popup, uint8_t x, uint8_t y, IconName name) {
|
||||
furi_assert(popup);
|
||||
with_view_model(
|
||||
popup->view, (PopupModel * model) {
|
||||
|
@@ -77,7 +77,7 @@ void popup_set_text(
|
||||
* @param x, y - icon position
|
||||
* @param name - icon to be shown
|
||||
*/
|
||||
void popup_set_icon(Popup* popup, int8_t x, int8_t y, IconName name);
|
||||
void popup_set_icon(Popup* popup, uint8_t x, uint8_t y, IconName name);
|
||||
|
||||
/* Set popup timeout
|
||||
* @param popup - Popup instance
|
||||
|
Reference in New Issue
Block a user