kopia lustrzana https://github.com/backface/turtlestitch
replaced unicode in microphone menu with new drawn symbols
rodzic
89219b25a2
commit
89faff9693
23
src/gui.js
23
src/gui.js
|
|
@ -5369,19 +5369,34 @@ IDE_Morph.prototype.microphoneMenu = function () {
|
||||||
world = this.world(),
|
world = this.world(),
|
||||||
pos = this.controlBar.settingsButton.bottomLeft(),
|
pos = this.controlBar.settingsButton.bottomLeft(),
|
||||||
resolutions = ['low', 'normal', 'high', 'max'],
|
resolutions = ['low', 'normal', 'high', 'max'],
|
||||||
microphone = this.stage.microphone;
|
microphone = this.stage.microphone,
|
||||||
|
tick = new SymbolMorph(
|
||||||
|
'tick',
|
||||||
|
MorphicPreferences.menuFontSize * 0.75
|
||||||
|
),
|
||||||
|
on = new SymbolMorph(
|
||||||
|
'checkedBox',
|
||||||
|
MorphicPreferences.menuFontSize * 0.75
|
||||||
|
),
|
||||||
|
empty = tick.fullCopy();
|
||||||
|
|
||||||
|
empty.render = nop;
|
||||||
if (microphone.isReady) {
|
if (microphone.isReady) {
|
||||||
menu.addItem(
|
menu.addItem(
|
||||||
'\u2611 ' + localize('Microphone'),
|
[
|
||||||
|
on,
|
||||||
|
localize('Microphone')
|
||||||
|
],
|
||||||
() => microphone.stop()
|
() => microphone.stop()
|
||||||
);
|
);
|
||||||
menu.addLine();
|
menu.addLine();
|
||||||
}
|
}
|
||||||
resolutions.forEach((res, i) => {
|
resolutions.forEach((res, i) => {
|
||||||
menu.addItem(
|
menu.addItem(
|
||||||
(microphone.resolution === i + 1 ? '\u2713 ' : ' ') +
|
[
|
||||||
localize(res),
|
microphone.resolution === i + 1 ? tick : empty,
|
||||||
|
localize(res)
|
||||||
|
],
|
||||||
() => microphone.setResolution(i + 1)
|
() => microphone.setResolution(i + 1)
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Ładowanie…
Reference in New Issue