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:
		| @@ -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) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user