mirror of
https://github.com/JannisX11/blockbench.git
synced 2024-11-27 04:21:46 +08:00
Update animate textures icon after texture resize
Fix unsaved animations saving Add tooltips to animation list Add Blockbench.isNewerThan
This commit is contained in:
parent
9714ff6067
commit
d2592eff0a
@ -1376,7 +1376,7 @@ const Animator = {
|
||||
|
||||
if (isApp && path && fs.existsSync(path)) {
|
||||
Animator.animations.forEach(function(a) {
|
||||
if (a.path == filter_path) {
|
||||
if (a.path == filter_path && !a.saved) {
|
||||
a.save();
|
||||
}
|
||||
})
|
||||
@ -1600,7 +1600,7 @@ Interface.definePanels(function() {
|
||||
<li v-for="(file, key) in files" :key="key" class="animation_file">
|
||||
<div class="animation_file_head" v-on:click.stop="toggle(key)">
|
||||
<i v-on:click.stop="toggle(key)" class="icon-open-state fa" :class=\'{"fa-angle-right": files_folded[key], "fa-angle-down": !files_folded[key]}\'></i>
|
||||
<label>{{ file.name }}</label>
|
||||
<label :title="key">{{ file.name }}</label>
|
||||
<div class="in_list_button" v-if="!file.saved" v-on:click.stop="saveFile(key, file)">
|
||||
<i class="material-icons">save</i>
|
||||
</div>
|
||||
@ -1620,7 +1620,7 @@ Interface.definePanels(function() {
|
||||
@contextmenu.prevent.stop="animation.showContextMenu($event)"
|
||||
>
|
||||
<i class="material-icons">movie</i>
|
||||
<label>{{ animation.name }}</label>
|
||||
<label :title="animation.name">{{ animation.name }}</label>
|
||||
<div class="in_list_button" v-bind:class="{unclickable: animation.saved}" v-on:click.stop="animation.save()">
|
||||
<i v-if="animation.saved" class="material-icons">check_circle</i>
|
||||
<i v-else class="material-icons">save</i>
|
||||
|
@ -34,6 +34,9 @@ const Blockbench = {
|
||||
location.reload()
|
||||
}
|
||||
},
|
||||
isNewerThan(version) {
|
||||
return compareVersions(Blockbench.version, version);
|
||||
},
|
||||
registerEdit() {
|
||||
console.warn('Blockbench.registerEdit is outdated. Please use Undo.initEdit and Undo.finishEdit')
|
||||
},
|
||||
|
@ -786,10 +786,10 @@ class Texture {
|
||||
Project.texture_height = Project.texture_height * (formResult.height / old_height);
|
||||
Canvas.updateAllUVs()
|
||||
}
|
||||
updateSelection()
|
||||
return new_canvas
|
||||
|
||||
})
|
||||
setTimeout(updateSelection, 100);
|
||||
|
||||
dialog.hide()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user