DexTool/LivingDexSS.gmx/extensions/nsfs/Assets/Objects/obj_nsfs_demo.object.gmx
2020-02-17 14:19:53 -06:00

202 lines
6.6 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>r = "";
inputs = ds_map_create();
</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></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_font(fnt_nsfs_demo);
draw_set_color(c_white);
dx = 10;
dy = 10;
dw = 200;
dh = 28;
var s, r = undefined, q;
__button = undefined;
if (demo_button("Extension' page")) url_open("https://yellowafterlife.itch.io/gamemaker-nsfs");
if (demo_button("Extension' manual")) url_open("https://yal.cc/r/17/nsfs");
if (demo_button("file_exists_ns")) r = file_exists_ns(demo_prompt("Absolute path?"));
if (demo_button("file_copy_ns")) {
s = demo_prompt("From-path?");
r = demo_status(file_copy_ns(s, demo_prompt("To-path?")));
}
if (demo_button("file_move_ns")) {
s = demo_prompt("From-path?");
r = demo_status(file_move_ns(s, demo_prompt("To-path?")));
}
if (demo_button("file_rename_ns")) {
s = demo_prompt("From-path?");
r = demo_status(file_rename_ns(s, demo_prompt("To-path?")));
}
if (demo_button("file_delete_ns")) {
s = demo_prompt("Absolute path? (note: the file will be deleted!)")
r = demo_status(file_delete_ns(s));
}
//
if (demo_button("directory_exists_ns")) {
s = demo_prompt("Absolute path?")
r = demo_status(directory_exists_ns(s));
}
if (demo_button("directory_copy_ns")) {
s = demo_prompt("From-path?");
r = demo_status(directory_copy_ns(s, demo_prompt("To-path?")));
}
if (demo_button("directory_move_ns")) {
s = demo_prompt("From-path?");
r = demo_status(directory_move_ns(s, demo_prompt("To-path?")));
}
if (demo_button("directory_rename_ns")) {
s = demo_prompt("From-path?");
r = demo_status(directory_rename_ns(s, demo_prompt("To-path?")));
}
if (demo_button("directory_delete_ns")) {
s = demo_prompt("Absolute path? (note: the directory will be deleted!)");
r = demo_status(directory_delete_ns(s));
}
//
if (demo_button("file_find_*_ns")) {
s = demo_prompt("Absolute filter path (e.g. `C:/Some/*.*`)?");
s = file_find_first_ns(s);
r = "";
while (s != "") {
r += chr(13) + chr(10) + demo_sfmt("%: %KB", s, file_find_size_ns() / 1024);
s = file_find_next_ns();
}
file_find_close_ns();
}
//
if (false &amp;&amp; demo_button("file_get_size_ns")) {
s = demo_prompt("Absolute path?");
r = demo_sfmt("%KB", file_get_size_ns(s) / 1024);
}
if (demo_button("file_text_open_read_ns")) {
s = demo_prompt("Absolute path?");
q = file_text_open_read_ns(s, demo_param("Codepage? (-1 for UTF-8)", -1));
if (q &gt;= 0) {
r = "";
while (!file_text_eof_ns(q)) {
r += chr(13) + chr(10) + file_text_read_line_ns(q);
}
file_text_close_ns(q);
} else r = "Couldn't read the file, error code " + string(nsfs_status);
}
if (demo_button("file_text_open_write_ns")) {
s = demo_prompt("Absolute path?");
q = file_text_open_write_ns(s, demo_param("Codepage? (-1 for UTF-8)", -1));
if (q &gt;= 0) {
file_text_write_line_ns(q, demo_prompt("File content?"));
file_text_close_ns(q);
r = "OK!";
} else r = "Couldn't write the file, error code " + string(nsfs_status);
}
if (demo_button("file_text_open_append_ns")) {
s = demo_prompt("Absolute path?");
q = file_text_open_append_ns(s, demo_param("Codepage? (-1 for UTF-8)", -1));
if (q &gt;= 0) {
file_text_write_line_ns(q, demo_prompt("File content?"));
file_text_close_ns(q);
r = "OK!";
} else r = "Couldn't write the file, error code " + string(nsfs_status);
}
//
if (demo_button("buffer_load_ns")) {
q = buffer_load_ns(demo_prompt("Absolute path?"));
if (q &gt;= 0) {
r = string(buffer_get_size(q)) + " bytes";
buffer_delete(q);
} else r = "Couldn't read the file, error code " + string(nsfs_status);
}
//
if (demo_button("string_codepage")) {
s = demo_prompt("String content?");
q = demo_param("String' codepage? (-1 for UTF-8)", -1);
r = string_codepage(s, q, demo_param("Target' codepage? (-1 for UTF-8)", -1));
}
//
if (!is_undefined(__button) &amp;&amp; !is_undefined(r)) show_message("Result: " + string(r));
</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>