mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-01-24 17:54:59 +01:00
Touch input menu
This commit is contained in:
parent
e96d1391cd
commit
3bdeaf8ed3
3 changed files with 48 additions and 19 deletions
|
@ -7024,6 +7024,15 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
|
|||
option(loc::gettext("return"));
|
||||
menuyoff = 0;
|
||||
maxspacing = 15;
|
||||
|
||||
auto_buttons = false;
|
||||
|
||||
touch::create_slider_button((320 - 160) / 2, 120 + 32, 160, 48, loc::gettext("ui scale"), &touch::scale, 5, 20);
|
||||
|
||||
touch::create_menu_button(46 - 16, 200, 76, 26, loc::gettext("previous"), -2);
|
||||
touch::create_menu_button(122, 200, 76, 26, loc::gettext("return"), 2);
|
||||
touch::create_menu_button(198 + 16, 200, 76, 26, loc::gettext("next"), -1);
|
||||
|
||||
break;
|
||||
case Menu::language:
|
||||
if (loc::languagelist.empty())
|
||||
|
|
|
@ -1190,7 +1190,7 @@ void menuactionpress(void)
|
|||
}
|
||||
if (game.currentmenuoption == -1)
|
||||
{
|
||||
// audio menu
|
||||
// touch input menu
|
||||
music.playef(Sound_VIRIDIAN);
|
||||
game.createmenu(Menu::touch_input, true);
|
||||
map.nexttowercolour();
|
||||
|
@ -2045,6 +2045,18 @@ void menuactionpress(void)
|
|||
case Menu::touch_input:
|
||||
switch (game.currentmenuoption)
|
||||
{
|
||||
case -2:
|
||||
// audio menu
|
||||
music.playef(Sound_VIRIDIAN);
|
||||
game.createmenu(Menu::audiooptions, true);
|
||||
map.nexttowercolour();
|
||||
break;
|
||||
case -1:
|
||||
// accessibility menu
|
||||
music.playef(Sound_VIRIDIAN);
|
||||
game.createmenu(Menu::accessibility, true);
|
||||
map.nexttowercolour();
|
||||
break;
|
||||
case 0:
|
||||
music.playef(Sound_CRY);
|
||||
break;
|
||||
|
|
|
@ -800,6 +800,13 @@ static void menurender(void)
|
|||
break;
|
||||
}
|
||||
case Menu::touch_input:
|
||||
{
|
||||
if (key.using_touch)
|
||||
{
|
||||
font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Touch Input"), tr, tg, tb);
|
||||
font::print_wrap(PR_CEN, -1, 65, loc::gettext("Change touch input options."), tr, tg, tb);
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (game.currentmenuoption)
|
||||
{
|
||||
|
@ -824,6 +831,7 @@ static void menurender(void)
|
|||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case Menu::language:
|
||||
if (loc::languagelist.empty())
|
||||
|
|
Loading…
Add table
Reference in a new issue