1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2025-02-20 14:29:16 +00:00

added checkmarks to window list; fixed test

This commit is contained in:
Steven Hugg 2018-07-14 15:10:09 -05:00
parent 8cfc15ecb7
commit 12ad4648dc
6 changed files with 16 additions and 5 deletions

View File

@ -274,3 +274,9 @@ canvas.pixelated {
.twitter-follow-button:hover { .twitter-follow-button:hover {
color:#99ffff; color:#99ffff;
} }
.dropdown-item-checked::before {
position: absolute;
left: .4rem;
content: '\2713';
font-weight: 400;
}

View File

@ -46,7 +46,6 @@ TODO:
- show tool-specific (readonly) include files - show tool-specific (readonly) include files
- verilog debugging makes it slow - verilog debugging makes it slow
- fix VCS mame - fix VCS mame
- checkmarks for active window
- remove FPS and play controls when Verilog scope paused - remove FPS and play controls when Verilog scope paused

View File

@ -120,8 +120,10 @@ function refreshWindowList() {
ul.append(li); ul.append(li);
if (createfn) { if (createfn) {
projectWindows.setCreateFunc(id, createfn); projectWindows.setCreateFunc(id, createfn);
$(a).click(function() { $(a).click(function(e) {
projectWindows.createOrShow(id); projectWindows.createOrShow(id);
ul.find('a').removeClass("dropdown-item-checked");
ul.find(e.target).addClass("dropdown-item-checked");
}); });
} }
} }
@ -194,7 +196,7 @@ function loadProject(preset_id:string) {
// we need this to build create functions for the editor (TODO?) // we need this to build create functions for the editor (TODO?)
refreshWindowList(); refreshWindowList();
// show main file // show main file
projectWindows.createOrShow(preset_id); projectWindows.createOrShow(preset_id); // TODO: add checkmark
} }
}); });
} }

View File

@ -14,6 +14,7 @@ export class ProjectWindows {
id2window : {[id:string]:ProjectView} = {}; id2window : {[id:string]:ProjectView} = {};
id2createfn : {[id:string]:WindowCreateFunction} = {}; id2createfn : {[id:string]:WindowCreateFunction} = {};
id2div : {[id:string]:HTMLElement} = {}; id2div : {[id:string]:HTMLElement} = {};
activeid : string;
activewnd : ProjectView; activewnd : ProjectView;
activediv : HTMLElement; activediv : HTMLElement;
lasterrors : WorkerError[]; lasterrors : WorkerError[];
@ -47,6 +48,7 @@ export class ProjectWindows {
this.refresh(); this.refresh();
this.refreshErrors(); this.refreshErrors();
} }
this.activeid = id;
return wnd; return wnd;
} }
@ -80,6 +82,8 @@ export class ProjectWindows {
getActive() : ProjectView { return this.activewnd; } getActive() : ProjectView { return this.activewnd; }
getActiveID() : string { return this.activeid; }
getCurrentText() : string { getCurrentText() : string {
if (this.activewnd && this.activewnd.getValue) if (this.activewnd && this.activewnd.getValue)
return this.activewnd.getValue(); return this.activewnd.getValue();

View File

@ -1169,7 +1169,7 @@ function compileVerilator(step) {
noInitialRun:true, noInitialRun:true,
print:print_fn, print:print_fn,
printErr:match_fn, printErr:match_fn,
//TOTAL_MEMORY:64*1024*1024, TOTAL_MEMORY:256*1024*1024,
}); });
var topmod = detectTopModuleName(code); var topmod = detectTopModuleName(code);
var FS = verilator_mod['FS']; var FS = verilator_mod['FS'];

View File

@ -196,7 +196,7 @@ describe('Worker', function() {
assert.ok(fn); assert.ok(fn);
done(err, msg); done(err, msg);
}; };
doBuild(msgs, done2, 253177, 0, 0); doBuild(msgs, done2, 1996909, 0, 0);
}); });
it('should NOT preprocess SDCC', function(done) { it('should NOT preprocess SDCC', function(done) {
compile('sdcc', 'int x=0\n#bah\n', 'mw8080bw', done, 0, 0, 1); compile('sdcc', 'int x=0\n#bah\n', 'mw8080bw', done, 0, 0, 1);