Files
AM2R-Community-Updates/objects/oGalleryMenu.object.gmx
2020-12-22 20:54:55 -06:00

207 lines
6.4 KiB
XML

<!--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>0</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>global.curropt = 0;
repeat (3) {
if (global.gallery[global.curropt] == 0) global.curropt += 1;
}
lastitem = 2;
state = 1;
active = 0;
alarm[0] = 5;
img_alpha = 0;
img_fadeout = 0;
bg_id = -4;
op3 = instance_create(16, 216, oPauseOption);
op3.optionid = 3;
op3.label = get_text("GlobalOptions", "Exit");
</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>active = 1;
</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>if (active) {
if (state == 1) {
if ((oControl.kRight &gt; 0) &amp;&amp; (oControl.kRightPushedSteps == 0)) {
global.curropt += 1;
if (global.curropt &gt; lastitem) global.curropt = 0;
repeat (3) {
if (global.gallery[global.curropt] == 0) global.curropt += 1;
if (global.curropt &gt; lastitem) global.curropt = 0;
}
sfx_play(sndMenuMove);
}
if ((oControl.kLeft &gt; 0) &amp;&amp; (oControl.kLeftPushedSteps == 0)) {
global.curropt -= 1;
if (global.curropt &lt; 0) global.curropt = lastitem;
repeat (3) {
if (global.gallery[global.curropt] == 0) global.curropt -= 1;
if (global.curropt &lt; 0) global.curropt = lastitem;
}
sfx_play(sndMenuMove);
}
if ((oControl.kDown &gt; 0) &amp;&amp; (oControl.kDownPushedSteps == 0)) {
global.curropt = 3;
sfx_play(sndMenuMove);
}
if ((oControl.kUp &gt; 0) &amp;&amp; (oControl.kUpPushedSteps == 0)) {
global.curropt = 0;
repeat (3) {
if (global.gallery[global.curropt] == 0) global.curropt += 1;
}
sfx_play(sndMenuMove);
}
if (oControl.kMenu1 &amp;&amp; (oControl.kMenu1PushedSteps == 0)) {
sfx_play(sndMenuSel);
if (global.curropt &gt;= 0 &amp;&amp; global.curropt &lt;= lastitem) event_user(0);
if (global.curropt == 3) { global.curropt = 5; room_goto(titleroom); }
}
} // if (state == 1)
if (state == 2) {
if (img_fadeout == 0) {
if (img_alpha &lt; 1) img_alpha += 0.05;
} else if (img_alpha &gt; 0) {
img_alpha -= 0.05;
} else {
active = 0;
alarm[0] = 5;
state = 1;
}
if (oControl.kMenu1 &amp;&amp; oControl.kMenu1PushedSteps == 0 &amp;&amp; img_alpha == 1 &amp;&amp; img_fadeout == 0) img_fadeout = 1;
}
} // if (active)
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="7" enumb="10">
<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 (global.curropt == 0) bg_id = 276;
if (global.curropt == 1) bg_id = 277;
if (global.curropt == 2) bg_id = 278;
state = 2;
img_alpha = 0;
img_fadeout = 0;
</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>if (bg_id != -4) draw_background_ext(bg_id, -53, 0, 1, 1, 0, -1, img_alpha); // -53 is a widescreen fix
</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>