mirror of
https://github.com/JannisX11/blockbench.git
synced 2025-01-30 15:42:42 +08:00
Fix #1198 Alt tool function issue on webapp
Fix #1194 copy paste tool issue Fix #1195 Resize tool modifier suggestion issue Add missing modifier suggestions, closes #1196
This commit is contained in:
parent
4ca824c1f7
commit
9d7b7d24c7
@ -1416,6 +1416,7 @@
|
||||
float: left;
|
||||
color: var(--color-bright_ui_text);
|
||||
text-align: center;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
#texture_pasting_overlay > div.control > div:hover {
|
||||
background-color: var(--color-accent);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* W3.CSS 4.04 Apr 2017 by Jan Egil and Borge Refsnes */
|
||||
/* W3.CSS 4.04 Apr 2017 by Jan Egil and Borge Refsnes */
|
||||
html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}
|
||||
/* Extract from normalize.css by Nicolas Gallagher and Jonathan Neal git.io/normalize */
|
||||
html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}
|
||||
|
@ -126,6 +126,15 @@ function updateSelection(options = {}) {
|
||||
}
|
||||
if (Outliner.selected.length) {
|
||||
document.querySelectorAll('.selection_only').forEach(node => node.style.setProperty('visibility', 'visible'));
|
||||
if (Modes.edit && Toolbox.selected.id == 'resize_tool' && Format.meshes) {
|
||||
if (Mesh.selected.length) {
|
||||
Interface.removeSuggestedModifierKey('alt', 'modifier_actions.resize_both_sides');
|
||||
Interface.addSuggestedModifierKey('alt', 'modifier_actions.resize_one_side');
|
||||
} else {
|
||||
Interface.removeSuggestedModifierKey('alt', 'modifier_actions.resize_one_side');
|
||||
Interface.addSuggestedModifierKey('alt', 'modifier_actions.resize_both_sides');
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (Format.bone_rig && Group.selected) {
|
||||
document.querySelectorAll('.selection_only').forEach(node => node.style.setProperty('visibility', 'hidden'));
|
||||
|
@ -677,6 +677,7 @@ addEventListeners(document, 'keydown mousedown', function(e) {
|
||||
var orig = Toolbox.selected;
|
||||
var alt = BarItems[Toolbox.selected.alt_tool]
|
||||
if (alt && Condition(alt) && (Modes.paint || BarItems.swap_tools.keybind.key == 18)) {
|
||||
e.preventDefault();
|
||||
alt.select()
|
||||
Toolbox.original = orig
|
||||
}
|
||||
|
@ -1090,6 +1090,10 @@ BARS.defineActions(function() {
|
||||
},
|
||||
onSelect: function() {
|
||||
Painter.updateNslideValues()
|
||||
Interface.addSuggestedModifierKey('shift', 'modifier_actions.uniform_scaling');
|
||||
},
|
||||
onUnselect() {
|
||||
Interface.removeSuggestedModifierKey('shift', 'modifier_actions.uniform_scaling');
|
||||
}
|
||||
})
|
||||
new Tool('gradient_tool', {
|
||||
@ -1110,6 +1114,10 @@ BARS.defineActions(function() {
|
||||
},
|
||||
onSelect: function() {
|
||||
Painter.updateNslideValues()
|
||||
Interface.addSuggestedModifierKey('shift', 'modifier_actions.snap_direction');
|
||||
},
|
||||
onUnselect() {
|
||||
Interface.removeSuggestedModifierKey('shift', 'modifier_actions.snap_direction');
|
||||
}
|
||||
})
|
||||
new Tool('copy_paste_tool', {
|
||||
|
@ -250,6 +250,7 @@ const UVEditor = {
|
||||
ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height);
|
||||
ctx.drawImage(temp_canvas, ctx.canvas.width, 0, -ctx.canvas.width, ctx.canvas.height);
|
||||
ctx.restore();
|
||||
UVEditor.updatePastingOverlay()
|
||||
})
|
||||
overlay.find('.button_mirror_y').click(e => {
|
||||
let temp_canvas = getCanvasCopy()
|
||||
|
@ -162,6 +162,7 @@
|
||||
"modifier_actions.select_range": "Select range",
|
||||
"modifier_actions.drag_to_duplicate": "Drag to duplicate",
|
||||
"modifier_actions.uniform_scaling": "Uniform Scaling",
|
||||
"modifier_actions.snap_direction": "Snap Direction",
|
||||
|
||||
"message.canvas_limit_error.title": "Canvas Limit Error",
|
||||
"message.canvas_limit_error.message": "The action could not be performed correctly because the format limits the canvas to 48 units. Shift the pivot point to prevent this.",
|
||||
|
Loading…
Reference in New Issue
Block a user