<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<object>
  <spriteName>&lt;undefined&gt;</spriteName>
  <solid>0</solid>
  <visible>-1</visible>
  <depth>-1</depth>
  <persistent>0</persistent>
  <parentName>&lt;undefined&gt;</parentName>
  <maskName>&lt;undefined&gt;</maskName>
  <events>
    <event eventtype="0" enumb="0">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>alpha = 0
alarm[0] = 1

ini_load_config(0)

menuSelected[0] = 1;
menuSelected[1] = 1;
menuPage = 0;

menuText[0,0] = 8;
menuText[0,1] = "Choose: Button "+string(global.kb_choose+1)
menuText[0,2] = "Cancel: Button "+string(global.kb_back+1)
menuText[0,3] = "Menu: Button "+string(global.kb_enter+1)
menuText[0,4] = "Map: Button "+string(global.kb_map+1)
menuText[0,5] = "Select player to the left (inventory, etc): Button "+string(global.kb_q+1)
menuText[0,6] = "Select player to the right (inventory, etc): Button "+string(global.kb_w+1)
menuText[0,7] = "Reset all to defaults"
menuText[0,8] = "Back to menu"

menuText[1,0] = 8;
menuText[1,1] = "Choose: Button "+string(global.gamepad_choose+1)
menuText[1,2] = "Cancel: Button "+string(global.gamepad_back+1)
menuText[1,3] = "Menu: Button "+string(global.gamepad_enter+1)
menuText[1,4] = "Map: Button "+string(global.gamepad_map+1)
menuText[1,5] = "Select player to the left (inventory, etc): Button "+string(global.gamepad_q+1)
menuText[1,6] = "Select player to the right (inventory, etc): Button "+string(global.gamepad_w+1)
menuText[1,7] = menuText[0,7]
menuText[1,8] = menuText[0,8]

wait = 0;
waiting[0,6] = 0
waiting[1,6] = 0
ok = 0
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="2" enumb="1">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>if ok = 2 { ok = 0 }
else if ok = 0 { ok = 1 }
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="2" enumb="0">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>if alpha !=1
{
    alpha += 0.05
    
    alarm[0] = 1
}
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="3" enumb="1">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>wait = (waiting[0,1] or waiting[0,2] or waiting[0,3] or waiting[0,4] or waiting[0,5] or waiting[0,6] or 
        waiting[1,1] or waiting[1,2] or waiting[1,3] or waiting[1,4] or waiting[1,5] or waiting[1,6])
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="3" enumb="0">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>///Keyboard controls
if !wait and ok != 2 {
    if keyboard_check_pressed(vk_down) {
        menuSelected[menuPage]++;
        if (menuSelected[menuPage] &gt; menuText[menuPage,0]) { menuSelected[menuPage] = 1; }
        menuSelected[!menuPage] = menuSelected[menuPage];
        audio_play_sound(sndselect2,0,0)
    } else if keyboard_check_pressed(vk_up) {
        menuSelected[menuPage] -=1;
        if (menuSelected[menuPage] &lt; 1) { menuSelected[menuPage] = menuText[menuPage,0]; }
        menuSelected[!menuPage] = menuSelected[menuPage];
        audio_play_sound(sndselect2,0,0)
    } else if keyboard_check_pressed(vk_left) or keyboard_check_pressed(vk_right) {
        menuPage = !menuPage;
        audio_play_sound(sndselect,0,0)
    } else if keyboard_check_pressed(global.kb_choose) {
        audio_play_sound(sndchoose,0,0)
        if (menuSelected[menuPage] == 1) { 
            waiting[menuPage,1] = 1
            alarm[1] = 15
        } if (menuSelected[menuPage] == 2) { 
            waiting[menuPage,2] = 1
            alarm[1] = 15
        } if (menuSelected[menuPage] == 3) { 
            waiting[menuPage,3] = 1
            alarm[1] = 15
        } if (menuSelected[menuPage] == 4) { 
            waiting[menuPage,4] = 1
            alarm[1] = 15
        } if (menuSelected[menuPage] == 5) { 
            waiting[menuPage,5] = 1
            alarm[1] = 15
        } if (menuSelected[menuPage] == 6) { 
            waiting[menuPage,6] = 1
            alarm[1] = 15
        } else if (menuSelected[menuPage] == 7) { 
            init_input()
            ini_save_config(0)
        } else if (menuSelected[menuPage] == 8) { 
            ok = 2;
            global.theroom = rmMenu
            instance_create(0,0,objFadeOut)
        }
    } else if keyboard_check_pressed(global.kb_back) {
        audio_play_sound(sndback,0,0)
        ok = 2;
        global.theroom = rmMenu
        instance_create(0,0,objFadeOut)
    }
}
</string>
          </argument>
        </arguments>
      </action>
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>/// Change controls
menuText[0,1] = iff(!waiting[0,1], "Choose: "+key_name(global.kb_choose), "Choose: Waiting...")
menuText[0,2] = iff(!waiting[0,2], "Cancel: "+key_name(global.kb_back), "Cancel: Waiting...")
menuText[0,3] = iff(!waiting[0,3], "Menu: "+key_name(global.kb_enter), "Menu: Waiting...")
menuText[0,4] = iff(!waiting[0,4], "Map: "+key_name(global.kb_map), "Map: Waiting...")
menuText[0,5] = iff(!waiting[0,5], "Select player (left): "+key_name(global.kb_q), "Select player (left): Waiting...")
menuText[0,6] = iff(!waiting[0,6], "Select player (right): "+key_name(global.kb_w), "Select player (right): Waiting...")

menuText[1,1] = iff(!waiting[1,1], "Choose: Button "+string(global.gamepad_choose+1), "Choose: Waiting...")
menuText[1,2] = iff(!waiting[1,2], "Cancel: Button "+string(global.gamepad_back+1), "Cancel: Waiting...")
menuText[1,3] = iff(!waiting[1,3], "Menu: Button "+string(global.gamepad_enter+1), "Menu: Waiting...")
menuText[1,4] = iff(!waiting[1,4], "Map: Button "+string(global.gamepad_map+1), "Map: Waiting...")
menuText[1,5] = iff(!waiting[1,5], "Select player (left): Button "+string(global.gamepad_q+1), "Select player (left): Waiting...")
menuText[1,6] = iff(!waiting[1,6], "Select player (right): Button "+string(global.gamepad_w+1), "Select player (right): Waiting...")

if wait and ok {
    if keyboard_check_pressed(vk_escape) {
        audio_play_sound(sndback,0,0)
        for (var i = 1; i &lt; 7; i++) {
            waiting[0,i] = 0
            waiting[1,i] = 0
        }
        ok = 2
        alarm[1] = 15;
    } else {
        if menuPage == 0 {
            var kb = keyboard_key;
            if keyboard_key != 0 and keyboard_key != vk_left and keyboard_key != vk_right and keyboard_key != vk_down and keyboard_key != vk_up {
                if waiting[0,1] 
                and global.kb_back != kb 
                and global.kb_enter != kb 
                and global.kb_map != kb 
                and global.kb_q != kb 
                and global.kb_w != kb { 
                    global.kb_choose = kb; 
                    waiting[0,1] = 0; 
                    ok = 2
                    alarm[1] = 15;
                    audio_play_sound(sndequip,0,0)
                    ini_save_config(0)
                } else if waiting[0,2] 
                and global.kb_choose != kb 
                and global.kb_enter != kb 
                and global.kb_map != kb 
                and global.kb_q != kb 
                and global.kb_w != kb { 
                    global.kb_back = kb; 
                    waiting[0,2] = 0; 
                    ok = 2
                    alarm[1] = 15;
                    audio_play_sound(sndequip,0,0)
                    ini_save_config(0)
                } else if waiting[0,3] 
                and global.kb_back != kb 
                and global.kb_enter != kb 
                and global.kb_map != kb 
                and global.kb_q != kb 
                and global.kb_w != kb { 
                    global.kb_enter = kb; 
                    waiting[0,3] = 0; 
                    ok = 2
                    alarm[1] = 15;
                    audio_play_sound(sndequip,0,0)
                    ini_save_config(0)
                } else if waiting[0,4] 
                and global.kb_back != kb 
                and global.kb_enter != kb 
                and global.kb_choose != kb 
                and global.kb_q != kb 
                and global.kb_w != kb { 
                    global.kb_map = kb; 
                    waiting[0,4] = 0; 
                    ok = 2
                    alarm[1] = 15;
                    audio_play_sound(sndequip,0,0)
                    ini_save_config(0)
                } else if waiting[0,5] 
                and global.kb_back != kb 
                and global.kb_enter != kb 
                and global.kb_choose != kb 
                and global.kb_map != kb 
                and global.kb_w != kb { 
                    global.kb_q = kb; 
                    waiting[0,5] = 0; 
                    ok = 2
                    alarm[1] = 15;
                    audio_play_sound(sndequip,0,0)
                    ini_save_config(0)
                } else if waiting[0,6] 
                and global.kb_back != kb 
                and global.kb_enter != kb 
                and global.kb_choose != kb 
                and global.kb_q != kb 
                and global.kb_map != kb { 
                    global.kb_w = kb; 
                    waiting[0,6] = 0; 
                    ok = 2
                    alarm[1] = 15;
                    audio_play_sound(sndequip,0,0)
                    ini_save_config(0)
                }
            }
        } else {
            for (var i=0; i&lt;objPersistent.buttons; i++) {
                if joy_button(objPersistent.device,i) {
                    if waiting[1,1] 
                    and global.gamepad_back != i 
                    and global.gamepad_enter != i 
                    and global.gamepad_map != i 
                    and global.gamepad_q != i 
                    and global.gamepad_w != i { 
                        global.gamepad_choose = i; 
                        waiting[1,1] = 0; 
                        ok = 2
                        alarm[1] = 15;
                        audio_play_sound(sndequip,0,0)
                        ini_save_config(0)
                        break;
                    } else if waiting[1,2] 
                    and global.gamepad_choose != i 
                    and global.gamepad_enter != i 
                    and global.gamepad_map != i 
                    and global.gamepad_q != i 
                    and global.gamepad_w != i { 
                        global.gamepad_back = i; 
                        waiting[1,2] = 0; 
                        ok = 2
                        alarm[1] = 15;
                        audio_play_sound(sndequip,0,0)
                        ini_save_config(0)
                        break;
                    } else if waiting[1,3] 
                    and global.gamepad_back != i 
                    and global.gamepad_enter != i 
                    and global.gamepad_map != i 
                    and global.gamepad_q != i 
                    and global.gamepad_w != i { 
                        global.gamepad_enter = i; 
                        waiting[1,3] = 0; 
                        ok = 2
                        alarm[1] = 15;
                        audio_play_sound(sndequip,0,0)
                        ini_save_config(0)
                        break;
                    } else if waiting[1,4] 
                    and global.gamepad_back != i 
                    and global.gamepad_enter != i 
                    and global.gamepad_choose != i 
                    and global.gamepad_q != i 
                    and global.gamepad_w != i { 
                        global.gamepad_map = i; 
                        waiting[1,4] = 0; 
                        ok = 2
                        alarm[1] = 15;
                        audio_play_sound(sndequip,0,0)
                        ini_save_config(0)
                        break;
                    } else if waiting[1,5] 
                    and global.gamepad_back != i 
                    and global.gamepad_enter != i 
                    and global.gamepad_choose != i 
                    and global.gamepad_map != i 
                    and global.gamepad_w != i { 
                        global.gamepad_q = i; 
                        waiting[1,5] = 0; 
                        ok = 2
                        alarm[1] = 15;
                        audio_play_sound(sndequip,0,0)
                        ini_save_config(0)
                        break;
                    } else if waiting[1,6] 
                    and global.gamepad_back != i 
                    and global.gamepad_enter != i 
                    and global.gamepad_choose != i 
                    and global.gamepad_q != i 
                    and global.gamepad_map != i { 
                        global.gamepad_w = i; 
                        waiting[1,6] = 0; 
                        ok = 2
                        alarm[1] = 15;
                        audio_play_sound(sndequip,0,0)
                        ini_save_config(0)
                        break;
                    }
                }
            }
        }
    }
}


</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="8" enumb="0">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>draw_set_color(c_white)
draw_set_halign(fa_left);
draw_set_font(global.thenfont)

draw_set_alpha(alpha);
draw_sprite(sprKeyboardIcon,0,16,16);
draw_sprite(sprGamepadIcon,0,164,16);

for (var i = 1; i &lt;= 6; i+=1) {
    if (menuSelected[0] = i and menuPage = 0) { 
        if waiting[0,i] = 1 {
            draw_set_color(c_yellow); 
        } else {
            draw_set_color(c_white); 
        }
    } else { 
        draw_set_color(c_gray);          
    }
    draw_text(16,64+(i*16)-20,menuText[0,i]);
    
    if (menuSelected[1] = i and menuPage = 1) { 
        if waiting[1,i] = 1 {
            draw_set_color(c_yellow); 
        } else {
            draw_set_color(c_white); 
        }
    } else { 
        draw_set_color(c_gray);          
    }
    draw_text(164,64+(i*16)-20,menuText[1,i]);
}

for (var i = 7; i &lt;= 8; i+=1) {
    if (menuSelected[0] = i) { 
        draw_set_color(c_white); 
    } else { 
        draw_set_color(c_gray);          
    }
    draw_text(16,96+(i*16)-20,menuText[0,i]);
}


draw_set_color(c_gray); 

if wait {
    draw_text(16,172,"Press ESCAPE to cancel.");
} else if menuSelected[0] &gt; 4 and menuSelected[0] &lt; 7 and menuSelected[1] == menuSelected[0] {
    draw_text(16,172,"Used in inventory, shop, stats, and equipment menus to switch between players.");
}

draw_set_font(global.theifont)
draw_set_halign(fa_right)

draw_text(410,16,"Controls Setup");
</string>
          </argument>
        </arguments>
      </action>
    </event>
  </events>
  <PhysicsObject>0</PhysicsObject>
  <PhysicsObjectSensor>0</PhysicsObjectSensor>
  <PhysicsObjectShape>0</PhysicsObjectShape>
  <PhysicsObjectDensity>0.5</PhysicsObjectDensity>
  <PhysicsObjectRestitution>0.100000001490116</PhysicsObjectRestitution>
  <PhysicsObjectGroup>0</PhysicsObjectGroup>
  <PhysicsObjectLinearDamping>0.100000001490116</PhysicsObjectLinearDamping>
  <PhysicsObjectAngularDamping>0.100000001490116</PhysicsObjectAngularDamping>
  <PhysicsObjectFriction>0.200000002980232</PhysicsObjectFriction>
  <PhysicsObjectAwake>-1</PhysicsObjectAwake>
  <PhysicsObjectKinematic>0</PhysicsObjectKinematic>
  <PhysicsShapePoints/>
</object>
