Skip to content

Commit 95bc867

Browse files
committed
Merge branch 'master' into gh-pages
2 parents c87d6ab + cd266d7 commit 95bc867

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+716
-360
lines changed

assets/missing.png

6 Bytes
Loading

css/dialogs.css

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1559,8 +1559,9 @@
15591559
overflow: hidden;
15601560
max-width: unset;
15611561
}
1562-
#plugin_browser_details {
1562+
.plugin_browser_tabbed_page {
15631563
padding: 8px 24px;
1564+
overflow-y: auto;
15641565
}
15651566
#plugin_browser_details tr:nth-child(even) {
15661567
background-color: var(--color-back);
@@ -1569,10 +1570,6 @@
15691570
padding: 5px 2px;
15701571
line-height: 20px;
15711572
}
1572-
#plugin_browser_changelog {
1573-
padding: 4px 20px;
1574-
overflow-y: auto;
1575-
}
15761573
#plugin_browser_changelog > li {
15771574
padding: 7px 8px;
15781575
}
@@ -1608,12 +1605,6 @@
16081605
font-size: 20px;
16091606
margin-right: 2px;
16101607
}
1611-
#plugin_browser_page .settings_list {
1612-
padding: 4px 20px;
1613-
}
1614-
#plugin_browser_page .features_list {
1615-
padding: 4px 20px;
1616-
}
16171608
li.plugin_feature_entry {
16181609
display: flex;
16191610
gap: 8px;
@@ -2336,14 +2327,24 @@
23362327
align-items: center;
23372328
cursor: pointer;
23382329
padding: 2px;
2330+
position: relative;
23392331
}
23402332
.flipbook_frame:hover {
2341-
background-color: var(--color-hover);
23422333
color: var(--color-light);
2334+
background-color: var(--color-back);
2335+
}
2336+
.flipbook_frame.viewing::before {
2337+
content: "";
2338+
position: absolute;
2339+
left: 0;
2340+
top: 10px;
2341+
bottom: 10px;
2342+
border-top: 40px solid transparent;
2343+
border-bottom: 40px solid transparent;
2344+
border-left: 8px solid var(--color-accent);
23432345
}
23442346
.flipbook_frame.viewing {
2345-
background-color: var(--color-accent);
2346-
color: var(--color-accent_text);
2347+
background-color: var(--color-back);
23472348
}
23482349
.flipbook_frame.selected {
23492350
background-color: var(--color-accent);

css/setup.css

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -738,15 +738,12 @@
738738
display: inline-block;
739739
width: 20px;
740740
height: 24px;
741-
margin-top: -28px;
741+
margin-top: -29px;
742742
user-select: none;
743743
margin-left: -42px;
744744
overflow: hidden;
745745
text-align: center;
746746
}
747-
div.nslide_arrow.na_right {
748-
margin-left: 16px;
749-
}
750747
div.nslide.editing {
751748
cursor: text;
752749
}

js/animations/timeline.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ const Timeline = {
8585
return
8686
};
8787

88+
if (Timeline.selector.interval) clearInterval(Timeline.selector.interval);
8889
Timeline.selector.interval = setInterval(Timeline.selector.move, 1000/60);
8990
document.addEventListener('mouseup', Timeline.selector.end, false);
9091

@@ -195,8 +196,8 @@ const Timeline = {
195196
end(e) {
196197
e.stopPropagation();
197198
document.removeEventListener('mousemove', Timeline.selector.move);
198-
clearInterval(Timeline.selector.interval);
199199
document.removeEventListener('mouseup', Timeline.selector.end);
200+
clearInterval(Timeline.selector.interval);
200201

201202
if (!Timeline.selector.selecting) {
202203
if (settings.canvas_unselect.value) {

js/api.js

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,14 +209,35 @@ const Blockbench = {
209209
showMessageBox(options = 0, cb) {
210210
return new MessageBox(options, cb).show();
211211
},
212-
async textPrompt(title, value, callback, placeholder = null) {
212+
/**
213+
*
214+
* @param {*} title
215+
* @param {*} value
216+
* @param {*} callback
217+
* @param {object} options Options
218+
* @param {string} options.info Info text
219+
* @param {string} options.description Description for the text input
220+
* @returns {Promise<string>} Input value
221+
*/
222+
async textPrompt(title, value, callback, options = 0) {
223+
if (typeof options == 'string') {
224+
options = {placeholder: options};
225+
console.warn('textPrompt: 4th argument is expected to be a string');
226+
}
213227
let answer = await new Promise((resolve) => {
228+
let form = {
229+
text: {full_width: true, placeholder: options.placeholder, value, description: options.description}
230+
};
231+
if (options.info) {
232+
form.description = {
233+
type: 'info',
234+
text: tl(options.info)
235+
}
236+
}
214237
new Dialog({
215238
id: 'text_input',
216239
title: title || 'dialog.input.title',
217-
form: {
218-
text: {full_width: true, placeholder, value}
219-
},
240+
form,
220241
onConfirm({text}) {
221242
if (callback) callback(text);
222243
resolve(text);

js/display_mode.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,11 @@ class refModel {
298298
setDisplayArea(0, 0, -6, 90, 180, 0, 1, 1, 1);
299299
}
300300
break;
301+
case 'block':
302+
this.updateBasePosition = function() {
303+
setDisplayArea(8, 4, 8, 0, 0, 0, 1, 1, 1)
304+
}
305+
break;
301306
case 'zombie':
302307
this.updateBasePosition = function() {
303308
if (display_slot === 'thirdperson_righthand') {

js/interface/actions.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -853,15 +853,15 @@ class NumSlider extends Widget {
853853
'<div class="nslide_arrow na_right"><i class="material-icons">navigate_next</i></div>'
854854
)
855855

856-
var n = limitNumber(scope.node.clientWidth/2-24, 6, 1000)
856+
var n = limitNumber(scope.node.clientWidth/2-22, 6, 1000)
857857

858858
scope.jq_outer.find('.nslide_arrow.na_left').click(function(e) {
859859
scope.arrow(-1, e)
860-
}).css('margin-left', (-n-24)+'px')
860+
}).css('margin-left', (-n-22)+'px')
861861

862862
scope.jq_outer.find('.nslide_arrow.na_right').click(function(e) {
863863
scope.arrow(1, e)
864-
}).css('margin-left', n+'px')
864+
}).css('margin-left', (n)+'px')
865865
})
866866
.on('mouseleave', function() {
867867
scope.jq_outer.find('.nslide_arrow').remove()

js/interface/interface.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1053,10 +1053,13 @@ BARS.defineActions(function() {
10531053
panel.resetCustomLayout();
10541054
}
10551055

1056+
Prop.show_left_bar = true;
1057+
Prop.show_right_bar = true;
1058+
10561059
Blockbench.dispatchEvent('reset_layout', {});
10571060

1058-
updateInterface();
10591061
updateSidebarOrder();
1062+
resizeWindow();
10601063
}
10611064
})
10621065
})

js/interface/menu_bar.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,11 +389,12 @@ const MenuBar = {
389389

390390
new BarMenu('timeline', Timeline.menu.structure, {
391391
name: 'panel.timeline',
392+
icon: 'timeline',
392393
condition: {modes: ['animate'], method: () => !AnimationController.selected},
393394
onOpen() {
394395
setActivePanel('timeline');
395396
}
396-
}, {icon: 'timeline'})
397+
})
397398

398399
new BarMenu('display', [
399400
new MenuSeparator('copypaste'),
@@ -455,6 +456,7 @@ const MenuBar = {
455456
'pixel_grid',
456457
'painting_grid',
457458
new MenuSeparator('references'),
459+
'bedrock_animation_mode',
458460
'preview_scene',
459461
'edit_reference_images',
460462
new MenuSeparator('interface'),
@@ -507,7 +509,6 @@ const MenuBar = {
507509
singleButton: true
508510
}).show();
509511
}},
510-
'reset_layout',
511512
{name: 'menu.help.developer.reset_storage', icon: 'fas.fa-hdd', click: () => {
512513
factoryResetAndReload();
513514
}},
@@ -526,6 +527,7 @@ const MenuBar = {
526527
}},
527528
'reload',
528529
]},
530+
'reset_layout',
529531
'about_window'
530532
], {icon: 'help'})
531533
MenuBar.update();

js/interface/panels.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class Panel extends EventSystem {
2323
this.toolbars = [];
2424

2525
if (!Interface.data.panels[this.id]) Interface.data.panels[this.id] = {};
26+
if (!Interface.getModeData().panels[this.id]) Interface.getModeData().panels[this.id] = {};
2627
this.position_data = Interface.getModeData().panels[this.id];
2728
let defaultp = this.default_position = data.default_position || 0;
2829
if (defaultp && defaultp.slot) this.previous_slot = defaultp.slot;

0 commit comments

Comments
 (0)