Ya permite continuar

This commit is contained in:
2022-09-25 23:16:20 +02:00
parent ed67e429d8
commit 25616e1e6c
7 changed files with 37 additions and 10 deletions

View File

@@ -144,7 +144,7 @@ void Menu::updateSelector()
{
if (mSelector.h > mSelector.targetH) // Ha llegado al destino
{
//mSelector.originH = mSelector.targetH = mSelector.rect.h = getSelectorHeight(mSelector.index);
// mSelector.originH = mSelector.targetH = mSelector.rect.h = getSelectorHeight(mSelector.index);
mSelector.originH = mSelector.h = mSelector.targetH;
mSelector.resizing = false;
}
@@ -153,7 +153,7 @@ void Menu::updateSelector()
{
if (mSelector.h < mSelector.targetH) // Ha llegado al destino
{
//mSelector.originH = mSelector.targetH = mSelector.rect.h = getSelectorHeight(mSelector.index);
// mSelector.originH = mSelector.targetH = mSelector.rect.h = getSelectorHeight(mSelector.index);
mSelector.originH = mSelector.h = mSelector.targetH;
mSelector.resizing = false;
}
@@ -229,7 +229,7 @@ bool Menu::increaseSelectorIndex()
// Calcula cual es el siguiente elemento
++mSelector.index %= mTotalItems;
while (!mItem[mSelector.index].selectable)
//mSelector.index++;
// mSelector.index++;
++mSelector.index %= mTotalItems;
success = true;
@@ -487,12 +487,20 @@ void Menu::setDefaultActionWhenCancel(Uint8 item)
void Menu::checkInput()
{
if (mInput->checkInput(INPUT_UP, REPEAT_FALSE))
{
if (decreaseSelectorIndex())
{
JA_PlaySound(mSoundMove);
}
}
if (mInput->checkInput(INPUT_DOWN, REPEAT_FALSE))
{
if (increaseSelectorIndex())
{
JA_PlaySound(mSoundMove);
}
}
if (mInput->checkInput(INPUT_ACCEPT, REPEAT_FALSE))
{