Update animate textures icon after texture resize

Fix unsaved animations saving
Add tooltips to animation list
Add Blockbench.isNewerThan
This commit is contained in:
JannisX11 2020-10-01 18:24:20 +02:00
parent 9714ff6067
commit d2592eff0a
3 changed files with 7 additions and 4 deletions

View File

@ -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>

View File

@ -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')
},

View File

@ -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()
}