Figured I might as well do this
This commit is contained in:
parent
98ff43b4d2
commit
d5ce3044c8
@ -224,8 +224,7 @@ void configMenu(bool isSdMode, bool oldPinStatus, u32 oldPinMode)
|
|||||||
u32 multiOptionsAmount = sizeof(multiOptions) / sizeof(struct multiOption),
|
u32 multiOptionsAmount = sizeof(multiOptions) / sizeof(struct multiOption),
|
||||||
singleOptionsAmount = sizeof(singleOptions) / sizeof(struct singleOption),
|
singleOptionsAmount = sizeof(singleOptions) / sizeof(struct singleOption),
|
||||||
totalIndexes = multiOptionsAmount + singleOptionsAmount - 1,
|
totalIndexes = multiOptionsAmount + singleOptionsAmount - 1,
|
||||||
selectedOption = multiOptionsAmount;
|
selectedOption;
|
||||||
while(!singleOptions[selectedOption - multiOptionsAmount].visible) selectedOption++;
|
|
||||||
|
|
||||||
//Parse the existing options
|
//Parse the existing options
|
||||||
for(u32 i = 0; i < multiOptionsAmount; i++)
|
for(u32 i = 0; i < multiOptionsAmount; i++)
|
||||||
@ -255,19 +254,23 @@ void configMenu(bool isSdMode, bool oldPinStatus, u32 oldPinMode)
|
|||||||
}
|
}
|
||||||
|
|
||||||
endPos += SPACING_Y / 2;
|
endPos += SPACING_Y / 2;
|
||||||
u32 color = COLOR_RED;
|
|
||||||
|
|
||||||
//Display all the normal options in white except for the first one
|
//Display all the normal options in white except for the first one
|
||||||
for(u32 i = 0; i < singleOptionsAmount; i++)
|
for(u32 i = 0, color = COLOR_RED; i < singleOptionsAmount; i++)
|
||||||
{
|
{
|
||||||
if(singleOptions[i].visible)
|
if(singleOptions[i].visible)
|
||||||
{
|
{
|
||||||
singleOptions[i].posY = endPos + SPACING_Y;
|
singleOptions[i].posY = endPos + SPACING_Y;
|
||||||
endPos = drawString(singleOptionsText[i], true, 10, singleOptions[i].posY, color);
|
endPos = drawString(singleOptionsText[i], true, 10, singleOptions[i].posY, color);
|
||||||
if(singleOptions[i].enabled) drawCharacter(selected, true, 10 + SPACING_X, singleOptions[i].posY, color);
|
if(singleOptions[i].enabled) drawCharacter(selected, true, 10 + SPACING_X, singleOptions[i].posY, color);
|
||||||
|
|
||||||
|
if(color == COLOR_RED)
|
||||||
|
{
|
||||||
|
selectedOption = i + multiOptionsAmount;
|
||||||
color = COLOR_WHITE;
|
color = COLOR_WHITE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
drawString(optionsDescription[selectedOption], false, 10, 10, COLOR_WHITE);
|
drawString(optionsDescription[selectedOption], false, 10, 10, COLOR_WHITE);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user