mirror of
https://github.com/JannisX11/blockbench.git
synced 2025-02-17 16:20:13 +08:00
Add event hook for adding model loaders
Fix #1568 "Other" menu category appears when nothing is inside it Add how to set source to Copy Brush description
This commit is contained in:
parent
2143cca0a4
commit
49f2fed12c
@ -237,10 +237,14 @@ onVueSetup(function() {
|
||||
categories[format.category].entries.push(format);
|
||||
}
|
||||
for (let key in this.formats) {
|
||||
add(key, this.formats[key])
|
||||
if (this.formats[key].show_on_start_screen != false) {
|
||||
add(key, this.formats[key]);
|
||||
}
|
||||
}
|
||||
for (let key in this.loaders) {
|
||||
add(key, this.loaders[key])
|
||||
if (this.loaders[key].show_on_start_screen != false) {
|
||||
add(key, this.loaders[key]);
|
||||
}
|
||||
}
|
||||
return categories;
|
||||
},
|
||||
@ -289,7 +293,7 @@ onVueSetup(function() {
|
||||
class="format_entry" :class="{[format_entry instanceof ModelFormat ? 'format' : 'loader']: true, selected: format_entry.id == selected_format_id}"
|
||||
:title="format_entry.description"
|
||||
:format="format_entry.id"
|
||||
v-if="format_entry.show_on_start_screen && (!redact_names || !format_entry.confidential)"
|
||||
v-if="(!redact_names || !format_entry.confidential)"
|
||||
@click="loadFormat(format_entry)"
|
||||
@dblclick="confirmSetupScreen(format_entry)"
|
||||
>
|
||||
@ -435,12 +439,14 @@ class ModelLoader {
|
||||
if (this.format_page && this.format_page.component) {
|
||||
Vue.component(`format_page_${this.id}`, this.format_page.component)
|
||||
}
|
||||
Blockbench.dispatchEvent('construct_model_loader', {loader: this});
|
||||
}
|
||||
new() {
|
||||
this.onStart();
|
||||
}
|
||||
delete() {
|
||||
delete ModelLoader.loaders[this.id];
|
||||
Blockbench.dispatchEvent('delete_model_loader', {loader: this});
|
||||
}
|
||||
}
|
||||
ModelLoader.loaders = {};
|
||||
|
@ -939,7 +939,7 @@
|
||||
"action.brush_tool": "Paint Brush",
|
||||
"action.brush_tool.desc": "Colored brush to draw on textures",
|
||||
"action.copy_brush": "Copy Brush",
|
||||
"action.copy_brush.desc": "Brush to clone parts of your texture or draw patterns",
|
||||
"action.copy_brush.desc": "Brush to clone parts of your texture or draw patterns. Hold Ctrl and click to select a copy source.",
|
||||
"action.fill_tool": "Paint Bucket",
|
||||
"action.fill_tool.desc": "Paint bucket to fill entire faces with one color",
|
||||
"action.eraser": "Eraser",
|
||||
|
Loading…
Reference in New Issue
Block a user