Render menus to the left, rather than center
This commit is contained in:
parent
ceec8e2eb2
commit
03c159ba51
@ -69,7 +69,7 @@ void displayDialog(const char* title,
|
|||||||
strncpy_P(b,title,sizeof(b));
|
strncpy_P(b,title,sizeof(b));
|
||||||
displayText(b, LAYOUT_TITLE_X, LAYOUT_TITLE_Y, LAYOUT_TITLE_WIDTH, LAYOUT_TITLE_HEIGHT, COLOR_TEXT, COLOR_TITLE_BACKGROUND, COLOR_ACTIVE_BORDER);
|
displayText(b, LAYOUT_TITLE_X, LAYOUT_TITLE_Y, LAYOUT_TITLE_WIDTH, LAYOUT_TITLE_HEIGHT, COLOR_TEXT, COLOR_TITLE_BACKGROUND, COLOR_ACTIVE_BORDER);
|
||||||
strncpy_P(b,instructions,sizeof(b));
|
strncpy_P(b,instructions,sizeof(b));
|
||||||
displayText(b, LAYOUT_INSTRUCTIONS_TEXT_X, LAYOUT_INSTRUCTIONS_TEXT_Y, LAYOUT_INSTRUCTIONS_TEXT_WIDTH, LAYOUT_INSTRUCTIONS_TEXT_HEIGHT, COLOR_TEXT, COLOR_BACKGROUND, COLOR_BACKGROUND);
|
displayText(b, LAYOUT_INSTRUCTIONS_TEXT_X, LAYOUT_INSTRUCTIONS_TEXT_Y, LAYOUT_INSTRUCTIONS_TEXT_WIDTH, LAYOUT_INSTRUCTIONS_TEXT_HEIGHT, COLOR_TEXT, COLOR_BACKGROUND, COLOR_BACKGROUND, TextJustification_e::Left);
|
||||||
strncpy_P(b,(const char*)F("Push Tune to Save"),sizeof(b));
|
strncpy_P(b,(const char*)F("Push Tune to Save"),sizeof(b));
|
||||||
displayText(b, LAYOUT_CONFIRM_TEXT_X, LAYOUT_CONFIRM_TEXT_Y, LAYOUT_CONFIRM_TEXT_WIDTH, LAYOUT_CONFIRM_TEXT_HEIGHT, COLOR_TEXT, COLOR_BACKGROUND, COLOR_BACKGROUND);
|
displayText(b, LAYOUT_CONFIRM_TEXT_X, LAYOUT_CONFIRM_TEXT_Y, LAYOUT_CONFIRM_TEXT_WIDTH, LAYOUT_CONFIRM_TEXT_HEIGHT, COLOR_TEXT, COLOR_BACKGROUND, COLOR_BACKGROUND);
|
||||||
}
|
}
|
||||||
@ -456,11 +456,11 @@ void drawMenu(const MenuItem_t* const items, const uint16_t num_items)
|
|||||||
for(unsigned int i = 1; i < num_items; ++i){
|
for(unsigned int i = 1; i < num_items; ++i){
|
||||||
memcpy_P(&mi,&items[i],sizeof(mi));
|
memcpy_P(&mi,&items[i],sizeof(mi));
|
||||||
strncpy_P(b,mi.ItemName,sizeof(b));
|
strncpy_P(b,mi.ItemName,sizeof(b));
|
||||||
displayText(b, LAYOUT_ITEM_X, LAYOUT_ITEM_Y + (i-1)*LAYOUT_ITEM_PITCH_Y, LAYOUT_ITEM_WIDTH, LAYOUT_ITEM_HEIGHT, COLOR_TEXT, COLOR_BACKGROUND, COLOR_INACTIVE_BORDER);
|
displayText(b, LAYOUT_ITEM_X, LAYOUT_ITEM_Y + (i-1)*LAYOUT_ITEM_PITCH_Y, LAYOUT_ITEM_WIDTH, LAYOUT_ITEM_HEIGHT, COLOR_TEXT, COLOR_BACKGROUND, COLOR_INACTIVE_BORDER, TextJustification_e::Left);
|
||||||
}
|
}
|
||||||
memcpy_P(&mi,&exitMenu,sizeof(mi));
|
memcpy_P(&mi,&exitMenu,sizeof(mi));
|
||||||
strncpy_P(b,mi.ItemName,sizeof(b));
|
strncpy_P(b,mi.ItemName,sizeof(b));
|
||||||
displayText(b, LAYOUT_ITEM_X, LAYOUT_ITEM_Y + (num_items-1)*LAYOUT_ITEM_PITCH_Y, LAYOUT_ITEM_WIDTH, LAYOUT_ITEM_HEIGHT, COLOR_TEXT, COLOR_BACKGROUND, COLOR_INACTIVE_BORDER);
|
displayText(b, LAYOUT_ITEM_X, LAYOUT_ITEM_Y + (num_items-1)*LAYOUT_ITEM_PITCH_Y, LAYOUT_ITEM_WIDTH, LAYOUT_ITEM_HEIGHT, COLOR_TEXT, COLOR_BACKGROUND, COLOR_INACTIVE_BORDER, TextJustification_e::Left);
|
||||||
}
|
}
|
||||||
|
|
||||||
void movePuck(unsigned int old_index, unsigned int new_index)
|
void movePuck(unsigned int old_index, unsigned int new_index)
|
||||||
|
Loading…
Reference in New Issue
Block a user