diff --git a/src/decomp/type-searcher/type-searcher.ts b/src/decomp/type-searcher/type-searcher.ts index ed1e7f3..9b41d83 100644 --- a/src/decomp/type-searcher/type-searcher.ts +++ b/src/decomp/type-searcher/type-searcher.ts @@ -94,7 +94,7 @@ function getWebviewContent() { const nameColumn = document.createElement("div"); nameColumn.className = "column column-25"; const nameField = document.createElement("sl-input"); - nameField.label = "Field Type?"; + nameField.label = "Field Type Name?"; nameColumn.appendChild(nameField); const offsetColumn = document.createElement("div"); @@ -110,6 +110,14 @@ function getWebviewContent() { document.getElementById("field-filters").appendChild(row); } + function clearFields(evt) { + document.getElementById("parent-name").value = ""; + document.getElementById("type-size").value = ""; + document.getElementById("method-id").value = ""; + document.getElementById("field-filters").innerHTML = ""; + addField(); + } + window.addEventListener('message', event => { document.getElementById("results").innerHTML = ""; const message = event.data; @@ -131,8 +139,6 @@ function getWebviewContent() { } } }); - - // TODO - implement clear

General Filters

@@ -165,7 +171,7 @@ function getWebviewContent() {
- +
@@ -176,7 +182,7 @@ function getWebviewContent() {
Add Another Field Search - Clear + Clear

Results

@@ -256,8 +262,10 @@ async function searchForTypes(message: any): Promise { offset: fieldOffset, }); } - args.push(`--fields`); - args.push(JSON.stringify(encodedFields)); + if (encodedFields.length > 0) { + args.push(`--fields`); + args.push(JSON.stringify(encodedFields)); + } } try { @@ -286,6 +294,7 @@ async function openPanel() { vscode.ViewColumn.One, { enableScripts: true, + retainContextWhenHidden: true, } );