replaced checkboxes in custom block context menus with symbols

snap7
jmoenig 2021-07-05 23:27:20 +02:00
rodzic e934f14745
commit e34acb2653
2 zmienionych plików z 11 dodań i 3 usunięć

Wyświetl plik

@ -24,6 +24,7 @@
* added new "serial ports" library
* added jshint esversion tags
* gui: unified palette: don't animate scrolling if delta is zero
* byob: replaced checkboxes in custom block context menus with symbols
### 2021-07-04
* fixed audio_comp library "plot sound" block to work with translations, thanks, Hans, for the report!

Wyświetl plik

@ -1081,10 +1081,17 @@ CustomCommandBlockMorph.prototype.userMenu = function () {
menu;
function addOption(label, toggle, test, onHint, offHint) {
var on = '\u2611 ',
off = '\u2610 ';
menu.addItem(
(test ? on : off) + localize(label),
[
test ? new SymbolMorph(
'checkedBox',
MorphicPreferences.menuFontSize * 0.75
) : new SymbolMorph(
'rectangle',
MorphicPreferences.menuFontSize * 0.75
),
localize(label)
],
toggle,
test ? onHint : offHint
);