editor: scroll to top when loading file

This commit is contained in:
Steven Hugg 2020-07-21 11:36:15 -05:00
parent 5445db5773
commit be505566ee
9 changed files with 28 additions and 2 deletions

View File

@ -1,3 +1,7 @@
/*
LZG decompression library.
See lzh.h and https://liblzg.bitsnbites.eu/
*/
#include <string.h> #include <string.h>

View File

@ -1,3 +1,7 @@
/*
Test of the LZG decompression library
with a hires graphics image.
*/
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>

View File

@ -1,3 +1,7 @@
/*
Text-based version of a Blockade-style game.
For more information, see "Making Arcade Games in C".
*/
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>

View File

@ -1,3 +1,7 @@
/*
Text-based version of a Blockade-style game.
For more information, see "Making Arcade Games in C".
*/
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>

View File

@ -1,3 +1,7 @@
/*
Text-based version of a Blockade-style game.
For more information, see "Making Arcade Games in C".
*/
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>

View File

@ -1,6 +1,5 @@
/* /*
Demonstration game. Text-based version of a Blockade-style game.
For more information, see "Making Arcade Games in C". For more information, see "Making Arcade Games in C".
*/ */

View File

@ -1,3 +1,7 @@
/*
Text-based version of a Blockade-style game.
For more information, see "Making Arcade Games in C".
*/
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>

View File

@ -2,7 +2,9 @@
A character-based surround-the-opponent game. A character-based surround-the-opponent game.
Reads from nametable RAM to determine collisions, and also Reads from nametable RAM to determine collisions, and also
to help the AI avoid walls. to help the AI avoid walls.
For more information, see "Making Arcade Games in C".
*/ */
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <nes.h> #include <nes.h>

View File

@ -97,6 +97,7 @@ export class SourceEditor implements ProjectView {
this.newEditor(div, asmOverride); this.newEditor(div, asmOverride);
if (text) { if (text) {
this.setText(text); // TODO: this calls setCode() and builds... it shouldn't this.setText(text); // TODO: this calls setCode() and builds... it shouldn't
this.editor.setSelection({line:0,ch:0}, {line:0,ch:0}, {scroll:true});
} }
this.setupEditor(); this.setupEditor();
return div; return div;