Add UV overlay toggle to UV editor in paint mode

Fix issue with loading custom icons offline in PWA (hopefully)
This commit is contained in:
JannisX11 2021-11-30 17:20:37 +01:00
parent 2ecc8ee87b
commit 75f084dffe
2 changed files with 6 additions and 2 deletions

View File

@ -117,9 +117,10 @@
}
@font-face {
font-family: 'icomoon';
src: url('../font/icomoon.woff?t564px') format('woff');
font-weight: normal;
font-style: normal;
src: local('icomoon'),
url('../font/icomoon.woff') format('woff');
}
/*Icons*/

View File

@ -2460,7 +2460,7 @@ Interface.definePanels(function() {
<div id="uv_frame" @click.stop="reverseSelect($event)" ref="frame" :class="{overlay_mode: uv_overlay && mode == 'paint'}" :style="{width: inner_width + 'px', height: inner_height + 'px'}" v-if="texture !== null">
<template id="uv_allocations" v-if="mode == 'uv' || uv_overlay" v-for="element in (display_uv === 'all_elements' ? all_mappable_elements : mappable_elements)">
<template id="uv_allocations" v-if="mode == 'uv' || uv_overlay" v-for="element in ((display_uv === 'all_elements' || mode == 'paint') ? all_mappable_elements : mappable_elements)">
<template v-if="element.type == 'cube' && !box_uv">
<div class="cube_uv_face"
@ -2570,6 +2570,7 @@ Interface.definePanels(function() {
<span style="color: var(--color-subtle_text);">{{ mouse_coords.x < 0 ? '-' : (mouse_coords.x + ' ⨉ ' + mouse_coords.y) }}</span>
<span v-if="texture">{{ texture.name }}</span>
<span style="color: var(--color-subtle_text);">{{ Math.round(this.zoom*100).toString() + '%' }}</span>
<div id="toggle_uv_overlay_anchor"></div>
</div>
<div v-if="mode == 'properties'">
@ -2585,6 +2586,8 @@ Interface.definePanels(function() {
Toolbars.uv_editor.toPlace()
BarItems.paint_mode_uv_overlay.toElement('#toggle_uv_overlay_anchor');
let {slider_bar} = UVEditor.vue.$refs;
var onBefore = function() {