kopia lustrzana https://github.com/backface/turtlestitch
added microphone "resolution" settings to GUI
rodzic
25b5313ca5
commit
63b51d6309
|
@ -54,6 +54,7 @@
|
|||
* new "text costumes" library for generating costumes from letters or words of text
|
||||
* took out "b block" costume from catalog
|
||||
* added microphone "resolution" concept governing "bins" (buffer / bin sizes)
|
||||
* added microphone "resolution" settings to GUI
|
||||
|
||||
### 2019-03-10
|
||||
* Objects, Blocks, Threads: added microphone note and pitch detection
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<script type="text/javascript" src="src/blocks.js?version=2019-03-11"></script>
|
||||
<script type="text/javascript" src="src/threads.js?version=2019-03-11"></script>
|
||||
<script type="text/javascript" src="src/objects.js?version=2019-03-11"></script>
|
||||
<script type="text/javascript" src="src/gui.js?version=2019-03-06"></script>
|
||||
<script type="text/javascript" src="src/gui.js?version=2019-03-11"></script>
|
||||
<script type="text/javascript" src="src/paint.js?version=2019-02-22"></script>
|
||||
<script type="text/javascript" src="src/lists.js?version=2019-02-07"></script>
|
||||
<script type="text/javascript" src="src/byob.js?version=2019-02-15"></script>
|
||||
|
|
40
src/gui.js
40
src/gui.js
|
@ -75,7 +75,7 @@ isRetinaSupported, SliderMorph, Animation, BoxMorph, MediaRecorder*/
|
|||
|
||||
// Global stuff ////////////////////////////////////////////////////////
|
||||
|
||||
modules.gui = '2019-March-06';
|
||||
modules.gui = '2019-March-11';
|
||||
|
||||
// Declarations
|
||||
|
||||
|
@ -2773,12 +2773,10 @@ IDE_Morph.prototype.settingsMenu = function () {
|
|||
new Color(100, 0, 0)
|
||||
);
|
||||
}
|
||||
if (stage.microphone.isReady) {
|
||||
menu.addItem(
|
||||
'\u2611 ' + localize('Microphone'),
|
||||
function () {stage.microphone.stop(); }
|
||||
);
|
||||
}
|
||||
menu.addItem(
|
||||
'Microphone resolution...',
|
||||
'microphoneMenu'
|
||||
);
|
||||
menu.addLine();
|
||||
/*
|
||||
addPreference(
|
||||
|
@ -5123,6 +5121,34 @@ IDE_Morph.prototype.saveProjectsBrowser = function () {
|
|||
new ProjectDialogMorph(this, 'save').popUp();
|
||||
};
|
||||
|
||||
// IDE_Morph microphone settings
|
||||
|
||||
IDE_Morph.prototype.microphoneMenu = function () {
|
||||
var menu = new MenuMorph(this),
|
||||
world = this.world(),
|
||||
pos = this.controlBar.settingsButton.bottomLeft(),
|
||||
resolutions = ['low', 'normal', 'high', 'max'],
|
||||
microphone = this.stage.microphone;
|
||||
|
||||
if (microphone.isReady) {
|
||||
menu.addItem(
|
||||
'\u2611 ' + localize('Microphone on'),
|
||||
function () {microphone.stop(); }
|
||||
);
|
||||
menu.addLine();
|
||||
}
|
||||
resolutions.forEach(function (res, i) {
|
||||
menu.addItem(
|
||||
(microphone.resolution === i + 1 ? '\u2713 ' : ' ') +
|
||||
res,
|
||||
function () {
|
||||
microphone.setResolution(i + 1);
|
||||
}
|
||||
);
|
||||
});
|
||||
menu.popup(world, pos);
|
||||
};
|
||||
|
||||
// IDE_Morph localization
|
||||
|
||||
IDE_Morph.prototype.languageMenu = function () {
|
||||
|
|
Ładowanie…
Reference in New Issue