Skip to content

Commit

Permalink
remove unnecessary BAGL defines
Browse files Browse the repository at this point in the history
  • Loading branch information
chris124567 committed Jan 19, 2024
1 parent 0b419aa commit 8c5b071
Showing 1 changed file with 0 additions and 44 deletions.
44 changes: 0 additions & 44 deletions src/sia_ux.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,50 +57,6 @@ typedef union {
} commandContext;
extern commandContext global;

// These are helper macros for defining UI elements. There are four basic UI
// elements: the background, which is a black rectangle that fills the whole
// screen; icons on the left and right sides of the screen, typically used for
// navigation or approval; and text, which can be anywhere. The UI_TEXT macro
// uses Open Sans Regular 11px, which I've found to be adequate for all text
// elements; if other fonts are desired, I suggest defining a separate macro
// for each of them (e.g. UI_TEXT_BOLD).
//
// In the event that you want to define your own UI elements from scratch,
// you'll want to read include/bagl.h and include/os_io_seproxyhal.h in the
// nanos-secure-sdk repo to learn what each of the fields are used for.
#define UI_BACKGROUND() \
{ \
{BAGL_RECTANGLE, 0, 0, 0, 128, 32, 0, 0, BAGL_FILL, 0, 0xFFFFFF, 0, 0}, NULL, 0, 0, 0, \
NULL, NULL, NULL \
}
#define UI_ICON_LEFT(userid, glyph) \
{ \
{BAGL_ICON, userid, 3, 12, 7, 7, 0, 0, 0, 0xFFFFFF, 0, 0, glyph}, NULL, 0, 0, 0, NULL, \
NULL, NULL \
}
#define UI_ICON_RIGHT(userid, glyph) \
{ \
{BAGL_ICON, userid, 117, 13, 8, 6, 0, 0, 0, 0xFFFFFF, 0, 0, glyph}, NULL, 0, 0, 0, NULL, \
NULL, NULL \
}
#define UI_TEXT(userid, x, y, w, text) \
{ \
{BAGL_LABELINE, \
userid, \
x, \
y, \
w, \
12, \
0, \
0, \
0, \
0xFFFFFF, \
0, \
BAGL_FONT_OPEN_SANS_REGULAR_11px | BAGL_FONT_ALIGNMENT_CENTER, \
0}, \
(char *) text, 0, 0, 0, NULL, NULL, NULL \
}

// ui_idle displays the main menu screen. Command handlers should call ui_idle
// when they finish.
void ui_idle(void);
Expand Down

0 comments on commit 8c5b071

Please sign in to comment.