mirror of
https://github.com/JannisX11/blockbench.git
synced 2024-11-27 04:21:46 +08:00
Add New Window action in file menu
This commit is contained in:
parent
f46e9ea855
commit
e45f1f64c4
@ -1478,6 +1478,14 @@ const BARS = {
|
||||
})
|
||||
|
||||
//File
|
||||
new Action('new_window', {
|
||||
icon: 'open_in_new',
|
||||
category: 'file',
|
||||
condition: isApp,
|
||||
click: function () {
|
||||
ipcRenderer.send('new-window');
|
||||
}
|
||||
})
|
||||
new Action('open_model_folder', {
|
||||
icon: 'folder_open',
|
||||
category: 'file',
|
||||
|
@ -542,6 +542,7 @@ const MenuBar = {
|
||||
},
|
||||
'open_model',
|
||||
'open_from_link',
|
||||
'new_window',
|
||||
'_',
|
||||
'save_project',
|
||||
'save_project_as',
|
||||
|
@ -782,6 +782,7 @@ class Texture {
|
||||
showContextMenu(event) {
|
||||
var scope = this;
|
||||
scope.select()
|
||||
Prop.active_panel = 'textures'
|
||||
this.menu.open(event, scope)
|
||||
}
|
||||
openMenu() {
|
||||
@ -1135,14 +1136,7 @@ class Texture {
|
||||
name: 'menu.texture.change',
|
||||
click: function(texture) { texture.reopen()}
|
||||
},
|
||||
{
|
||||
icon: 'delete',
|
||||
name: 'generic.delete',
|
||||
click: function(texture) {
|
||||
Undo.initEdit({textures: [texture], selected_texture: true, bitmap: true})
|
||||
texture.remove()
|
||||
Undo.finishEdit('Delete texture', {textures: [], selected_texture: true, bitmap: true})
|
||||
}},
|
||||
'delete',
|
||||
'_',
|
||||
{
|
||||
icon: 'list',
|
||||
|
@ -819,6 +819,8 @@
|
||||
|
||||
"action.project_window": "Project...",
|
||||
"action.project_window.desc": "Opens the project window, where you can edit metadata of your model",
|
||||
"action.new_window": "New Window",
|
||||
"action.new_window.desc": "Opens a new Blockbench window",
|
||||
"action.open_model_folder": "Open Model Folder",
|
||||
"action.open_model_folder.desc": "Opens the folder that the model is contained in",
|
||||
"action.open_backup_folder": "Open Backup Folder",
|
||||
|
3
main.js
3
main.js
@ -184,6 +184,9 @@ ipcMain.on('edit-launch-setting', (event, arg) => {
|
||||
ipcMain.on('add-recent-project', (event, path) => {
|
||||
app.addRecentDocument(path);
|
||||
})
|
||||
ipcMain.on('new-window', (event, path) => {
|
||||
createWindow(true);
|
||||
})
|
||||
ipcMain.on('request-color-picker', async (event, arg) => {
|
||||
const color = await getColorHexRGB().catch((error) => {
|
||||
console.warn('[Error] Failed to pick color', error)
|
||||
|
Loading…
Reference in New Issue
Block a user