mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2024-11-29 14:51:17 +00:00
embed splits, ui tweaks
This commit is contained in:
parent
0e4ed8ce21
commit
9bc9992aec
@ -705,6 +705,12 @@ div.asset_toolbar {
|
|||||||
z-index: 5;
|
z-index: 5;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
.transcript-header {
|
||||||
|
color: #ccc;
|
||||||
|
text-align: right;
|
||||||
|
padding-right: 0.5em;
|
||||||
|
padding-top: 0.5em;
|
||||||
|
}
|
||||||
.tree-header {
|
.tree-header {
|
||||||
border: 2px solid #555;
|
border: 2px solid #555;
|
||||||
border-radius:8px;
|
border-radius:8px;
|
||||||
|
@ -170,7 +170,6 @@ export class TeleType {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
loadState(state) {
|
loadState(state) {
|
||||||
console.log(state);
|
|
||||||
this.curstyle = state.curstyle;
|
this.curstyle = state.curstyle;
|
||||||
this.reverse = state.reverse;
|
this.reverse = state.reverse;
|
||||||
this.col = state.col;
|
this.col = state.col;
|
||||||
|
@ -2092,8 +2092,12 @@ function revealTopBar() {
|
|||||||
|
|
||||||
export function setupSplits() {
|
export function setupSplits() {
|
||||||
const splitName = 'workspace-split3-' + platform_id;
|
const splitName = 'workspace-split3-' + platform_id;
|
||||||
var sizes = [0, 50, 50];
|
var sizes;
|
||||||
if (!(platform_id.startsWith('vcs') || qs['embed'] || Views.isMobileDevice))
|
if (platform_id.startsWith('vcs'))
|
||||||
|
sizes = [0, 50, 50];
|
||||||
|
else if (qs['embed'] || Views.isMobileDevice)
|
||||||
|
sizes = [0, 60, 40];
|
||||||
|
else
|
||||||
sizes = [12, 44, 44];
|
sizes = [12, 44, 44];
|
||||||
var sizesStr = hasLocalStorage && localStorage.getItem(splitName);
|
var sizesStr = hasLocalStorage && localStorage.getItem(splitName);
|
||||||
if (sizesStr) {
|
if (sizesStr) {
|
||||||
@ -2147,7 +2151,6 @@ function loadImportedURL(url : string) {
|
|||||||
async function loadFormDataUpload() {
|
async function loadFormDataUpload() {
|
||||||
var ignore = !!qs['ignore'];
|
var ignore = !!qs['ignore'];
|
||||||
var force = !!qs['force'];
|
var force = !!qs['force'];
|
||||||
setWaitDialog(true);
|
|
||||||
for (var i=0; i<20; i++) {
|
for (var i=0; i<20; i++) {
|
||||||
let path = qs['file'+i+'_name'];
|
let path = qs['file'+i+'_name'];
|
||||||
let dataenc = qs['file'+i+'_data'];
|
let dataenc = qs['file'+i+'_data'];
|
||||||
@ -2169,7 +2172,6 @@ async function loadFormDataUpload() {
|
|||||||
}
|
}
|
||||||
delete qs['ignore'];
|
delete qs['ignore'];
|
||||||
delete qs['force'];
|
delete qs['force'];
|
||||||
setWaitDialog(false);
|
|
||||||
replaceURLState();
|
replaceURLState();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2347,3 +2349,12 @@ function writeOutputROMFile() {
|
|||||||
putWorkspaceFile(`bin/${prefix}${suffix}`, current_output);
|
putWorkspaceFile(`bin/${prefix}${suffix}`, current_output);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
export function highlightSearch(query: string) { // TODO: filename?
|
||||||
|
var wnd = projectWindows.getActive();
|
||||||
|
if (wnd instanceof Views.SourceEditor) {
|
||||||
|
var sc = wnd.editor.getSearchCursor(query);
|
||||||
|
if (sc.findNext()) {
|
||||||
|
wnd.editor.setSelection(sc.pos.to, sc.pos.from);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -19,6 +19,7 @@ class SerialInOutViewer {
|
|||||||
constructor(div: HTMLElement) {
|
constructor(div: HTMLElement) {
|
||||||
div.style.overflowY = 'auto';
|
div.style.overflowY = 'auto';
|
||||||
var gameport = $('<div id="gameport"/>').appendTo(div);
|
var gameport = $('<div id="gameport"/>').appendTo(div);
|
||||||
|
$('<p class="transcript-header">Serial Output</p>').appendTo(gameport);
|
||||||
var windowport = $('<div id="windowport" class="transcript"/>').appendTo(gameport);
|
var windowport = $('<div id="windowport" class="transcript"/>').appendTo(gameport);
|
||||||
this.div = windowport[0];
|
this.div = windowport[0];
|
||||||
}
|
}
|
||||||
@ -78,7 +79,7 @@ export class SerialTestHarness implements SerialIOInterface {
|
|||||||
recvByte(): number {
|
recvByte(): number {
|
||||||
var index = this.readIndex();
|
var index = this.readIndex();
|
||||||
this.inputIndex = index;
|
this.inputIndex = index;
|
||||||
var b = this.inputBytes[index] | 0;
|
var b = (this.inputBytes && this.inputBytes[index]) | 0;
|
||||||
//this.bufin += byteToASCII(b);
|
//this.bufin += byteToASCII(b);
|
||||||
this.viewer.tty.addtext(byteToASCII(b), 2|16);
|
this.viewer.tty.addtext(byteToASCII(b), 2|16);
|
||||||
if (b == 10) this.viewer.tty.newline();
|
if (b == 10) this.viewer.tty.newline();
|
||||||
|
Loading…
Reference in New Issue
Block a user