Focus menu search bars on open

Fix issue with optifine cem texture import
This commit is contained in:
JannisX11 2022-05-27 22:56:21 +02:00
parent 9069f9fc37
commit 54ac723b30
2 changed files with 5 additions and 2 deletions

View File

@ -235,6 +235,9 @@ class Menu {
}
})
}
if (menu_node == ctxmenu) {
input.focus();
}
} else {
list.forEach((object) => {

View File

@ -178,9 +178,9 @@ var codec = new Codec('optifine_entity', {
let texture_path = string.replace(/[\\/]/g, osfs);
if (texture_path.match(/^textures/)) {
texture_path = path.replace(/[\\/]optifine[\\/][\\\w .-]+$/i, '\\'+texture_path);
texture_path = path.replace(/[\\/]optifine[\\/].+$/i, osfs+texture_path);
} else {
texture_path = path.replace(/\\[\w .-]+$/, '\\'+texture_path);
texture_path = path.replace(/[\\/][^\\/]+$/, osfs+texture_path);
}
return new Texture().fromPath(texture_path).add(false);
}