For some reason I fail to see why this is happening, so I hope someone here can explain this:
The roomscript code (as shown below) is working correctly: ENTER does load game.
(in this case the Global script has no (keycode == eKeyReturn) section in the on_key_press(eKeyCode keycode) function)
But:
The Global script code (as also shown below) is NOT working correctly: ENTER does NOT load the selected game.
(in this case the Room script has no (keycode == eKeyReturn) section in the on_key_press(eKeyCode keycode) function)
Room script:
function on_key_press(eKeyCode keycode)
{
if (keycode == eKeyReturn)
{
if (gRestoreGame.Visible == true)
{
if (lstRestoreGamesList.SelectedIndex >= 0)
{
RestoreGameSlot(lstRestoreGamesList.SaveGameSlots[lstRestoreGamesList.SelectedIndex]);
}
}
}
}
Global script:
function on_key_press(eKeyCode keycode)
{
...
else if (keycode == eKeyReturn)
{
if (gRestoreGame.Visible == true)
{
if (lstRestoreGamesList.SelectedIndex >= 0)
{
RestoreGameSlot(lstRestoreGamesList.SaveGameSlots[lstRestoreGamesList.SelectedIndex]);
}
}
}
...
}
EDIT:
darn, this was why:
else if (IsGamePaused() || !IsInterfaceEnabled())
{
keycode = 0;
}
Yeah, asking things here has the magic of helping to think for some reason. Happy it worked :)
True ;)