|
|
@@ -8,29 +8,25 @@ _up = ingame.kc(vk_up);
|
|
|
_down = ingame.kc(vk_down);
|
|
|
_inventory = ingame.kcp("I");
|
|
|
_focus = ingame.kcp("A");
|
|
|
-
|
|
|
_return = ingame.kcp(vk_escape); // for debugging
|
|
|
-
|
|
|
/*
|
|
|
-if (ingame.kcp(vk_escape)) {
|
|
|
- autoreg_handle("title", "title", 100);
|
|
|
-}
|
|
|
-if (title != undefined && title.kcp(vk_escape)) {
|
|
|
- autodel_handle("title");
|
|
|
-}
|
|
|
-*/
|
|
|
_newgame = title.kcp(vk_space);
|
|
|
_continue = title.kcp(vk_enter);
|
|
|
_quitgame = title.kcp(vk_escape);
|
|
|
+*/
|
|
|
+_left_title = title.kcp(vk_left);
|
|
|
+_right_title = title.kcp(vk_right);
|
|
|
+_up_title = title.kcp(vk_up);
|
|
|
+_down_title = title.kcp(vk_down);
|
|
|
+_select = title.kcp("Z");
|
|
|
|
|
|
-_left_inv = inventory.kcp(vk_left);
|
|
|
-_right_inv= inventory.kcp(vk_right);
|
|
|
-_up_inv = inventory.kcp(vk_up);
|
|
|
-_down_inv = inventory.kcp(vk_down);
|
|
|
-_close = inventory.kcp("I") || inventory.kcp(vk_escape);
|
|
|
-
|
|
|
-
|
|
|
+_left_inv = inventory.kcp(vk_left);
|
|
|
+_right_inv = inventory.kcp(vk_right);
|
|
|
+_up_inv = inventory.kcp(vk_up);
|
|
|
+_down_inv = inventory.kcp(vk_down);
|
|
|
+_close = inventory.kcp("I") || inventory.kcp(vk_escape);
|
|
|
|
|
|
+/*
|
|
|
if global.developer_mode && room == rTitle
|
|
|
{
|
|
|
if _newgame
|
|
|
@@ -51,6 +47,7 @@ if global.developer_mode && room == rTitle
|
|
|
if _quitgame
|
|
|
game_end();
|
|
|
}
|
|
|
+*/
|
|
|
if global.developer_mode && room != rTitle
|
|
|
if _return
|
|
|
{
|
|
|
@@ -64,13 +61,61 @@ if global.developer_mode && room != rTitle
|
|
|
|
|
|
autoreg_handle("title", "title", 100);
|
|
|
}
|
|
|
-if _inventory
|
|
|
+
|
|
|
+if _up_title
|
|
|
+{
|
|
|
+ menu_index--;
|
|
|
+ if menu_index < 0
|
|
|
+ menu_index = array_length(menu_options) - 1;
|
|
|
+}
|
|
|
+if _down_title
|
|
|
{
|
|
|
- global.inventory = icl(oInventory);
|
|
|
- autoreg_handle("inventory", "inventory", 10);
|
|
|
+ menu_index++;
|
|
|
+ if menu_index >= array_length(menu_options)
|
|
|
+ menu_index = 0;
|
|
|
}
|
|
|
-else if _close
|
|
|
+for(var i = 0; i < array_length(menu_options); i++)
|
|
|
{
|
|
|
- with(global.inventory) instance_destroy();
|
|
|
- autodel_handle("inventory");
|
|
|
+ var _target = (i == menu_index) ? 1.2 : 1.0;
|
|
|
+ option_scale[i] = lerp(option_scale[i], _target, lerp_speed);
|
|
|
}
|
|
|
+if _select
|
|
|
+{
|
|
|
+ var _func, _ripple;
|
|
|
+ switch(menu_index)
|
|
|
+ {
|
|
|
+ case 0:
|
|
|
+ autodel_handle("title");
|
|
|
+
|
|
|
+ _func = function()
|
|
|
+ {
|
|
|
+ icl(oRippleExpand);
|
|
|
+
|
|
|
+ load_game_from_disk();
|
|
|
+ };
|
|
|
+ _ripple = icl(oRippleShrink, 960, 540);
|
|
|
+ _ripple.callback = _func;
|
|
|
+ break;
|
|
|
+
|
|
|
+ case 1:
|
|
|
+ autodel_handle("title");
|
|
|
+
|
|
|
+ _func = function()
|
|
|
+ {
|
|
|
+ icl(oRippleExpand);
|
|
|
+
|
|
|
+ global.save_data = get_default_save_data();
|
|
|
+ save_game_to_disk();
|
|
|
+ load_game_from_disk();
|
|
|
+ };
|
|
|
+
|
|
|
+ _ripple = icl(oRippleShrink, 960, 600);
|
|
|
+ _ripple.callback = _func;
|
|
|
+ break;
|
|
|
+
|
|
|
+ case 2: break;
|
|
|
+ case 3: game_end(); break;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+animation_timer += 0.05;
|