OpenTyrian: fixes to main menu and to loading game menu

This commit is contained in:
pelya
2014-06-09 16:43:51 +03:00
parent f763376ee4
commit 9feb763295
2 changed files with 13 additions and 1 deletions

View File

@@ -487,7 +487,7 @@ ulong JE_getCost( JE_byte itemType, JE_word itemNum )
void JE_loadScreen( void )
{
JE_boolean quit;
JE_byte sel, screen, min = 0, max = 0;
int sel, screen, min = 0, max = 0;
char *tempstr;
char *tempstr2;
JE_boolean mal_str = false;
@@ -509,6 +509,9 @@ void JE_loadScreen( void )
memcpy(VGAScreen2->pixels, VGAScreen->pixels, VGAScreen2->pitch * VGAScreen2->h);
wait_noinput(true, true, false);
int menu_top = 30, menu_spacing = 13;
do
{
while (mousedown)
@@ -628,6 +631,12 @@ void JE_loadScreen( void )
tempW = 0;
JE_textMenuWait(&tempW, false);
sel -= min; // Should start from zero
if (select_menuitem_by_touch(menu_top, menu_spacing, max - min, &sel)) {
sel += min;
continue;
}
sel += min;
if (newkey)
{

View File

@@ -60,6 +60,7 @@ bool select_gameplay( void )
int gameplay = 1,
gameplay_max = GAMEPLAY_NAME_COUNT - 1;
wait_noinput(true, true, false);
bool fade_in = true;
for (; ; )
{
@@ -140,6 +141,7 @@ bool select_episode( void )
const int menu_top = 20, menu_spacing = 30;
int episode = 1, episode_max = EPISODE_AVAILABLE;
wait_noinput(true, true, false);
bool fade_in = true;
for (; ; )
{
@@ -221,6 +223,7 @@ bool select_difficulty( void )
difficultyLevel = 2;
int difficulty_max = 3;
wait_noinput(true, true, false);
bool fade_in = true;
for (; ; )
{