Update shell
This commit is contained in:
@@ -117,7 +117,7 @@
|
||||
<button class="ctrl-btn" id="btn-save" title="Save level (download .lvl)">Save</button>
|
||||
<button class="ctrl-btn" id="btn-load" title="Load .lvl from disk">Load</button>
|
||||
<span class="ctrl-sep">|</span>
|
||||
<select id="level-select" title="Open a built-in level in the editor">
|
||||
<select id="level-select" title="Load a built-in level">
|
||||
<option value="">-- Open level --</option>
|
||||
</select>
|
||||
<span class="ctrl-sep">|</span>
|
||||
@@ -263,12 +263,12 @@
|
||||
var path = this.value;
|
||||
if (!path) return;
|
||||
|
||||
if (typeof _editor_load_vfs_file === 'function') {
|
||||
/* Pass the path string to C */
|
||||
/* Load the level into gameplay (MODE_PLAY) via main.c */
|
||||
if (typeof _game_load_level === 'function') {
|
||||
var len = lengthBytesUTF8(path) + 1;
|
||||
var buf = _malloc(len);
|
||||
stringToUTF8(path, buf, len);
|
||||
_editor_load_vfs_file(buf);
|
||||
_game_load_level(buf);
|
||||
_free(buf);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user