kopia lustrzana https://github.com/backface/turtlestitch
library browser: import selected library on pressing enter
rodzic
77384731bf
commit
abb5693ff1
|
@ -5,6 +5,7 @@
|
||||||
### 2020-07-27
|
### 2020-07-27
|
||||||
* threads: fixed binding contexts to other receivers (variable scope for ASK / TELL)
|
* threads: fixed binding contexts to other receivers (variable scope for ASK / TELL)
|
||||||
* gui: updated "About Snap!" dialog box
|
* gui: updated "About Snap!" dialog box
|
||||||
|
* gui: library browser: import selected library on pressing enter
|
||||||
|
|
||||||
### 2020-07-26
|
### 2020-07-26
|
||||||
* objects: fixed sprite speech balloon display for sounds
|
* objects: fixed sprite speech balloon display for sounds
|
||||||
|
|
|
@ -7766,6 +7766,7 @@ LibraryImportDialogMorph.prototype.init = function (ide, librariesData) {
|
||||||
|
|
||||||
this.ide = ide;
|
this.ide = ide;
|
||||||
this.key = 'importLibrary';
|
this.key = 'importLibrary';
|
||||||
|
this.action = 'importLibrary';
|
||||||
this.librariesData = librariesData; // [{name: , fileName: , description:}]
|
this.librariesData = librariesData; // [{name: , fileName: , description:}]
|
||||||
|
|
||||||
// I contain a cached version of the libaries I have displayed,
|
// I contain a cached version of the libaries I have displayed,
|
||||||
|
@ -7793,7 +7794,7 @@ LibraryImportDialogMorph.prototype.buildContents = function () {
|
||||||
this.initializeLibraryDescription();
|
this.initializeLibraryDescription();
|
||||||
this.installLibrariesList();
|
this.installLibrariesList();
|
||||||
|
|
||||||
this.addButton('importLibrary', 'Import');
|
this.addButton('ok', 'Import');
|
||||||
this.addButton('cancel', 'Cancel');
|
this.addButton('cancel', 'Cancel');
|
||||||
|
|
||||||
this.setExtent(new Point(460, 455));
|
this.setExtent(new Point(460, 455));
|
||||||
|
@ -7989,6 +7990,8 @@ LibraryImportDialogMorph.prototype.cachedLibrary = function (key) {
|
||||||
};
|
};
|
||||||
|
|
||||||
LibraryImportDialogMorph.prototype.importLibrary = function () {
|
LibraryImportDialogMorph.prototype.importLibrary = function () {
|
||||||
|
if (!this.listField.selected) {return; }
|
||||||
|
|
||||||
var blocks,
|
var blocks,
|
||||||
ide = this.ide,
|
ide = this.ide,
|
||||||
selectedLibrary = this.listField.selected.fileName,
|
selectedLibrary = this.listField.selected.fileName,
|
||||||
|
@ -8011,8 +8014,6 @@ LibraryImportDialogMorph.prototype.importLibrary = function () {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.destroy();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
LibraryImportDialogMorph.prototype.displayBlocks = function (libraryKey) {
|
LibraryImportDialogMorph.prototype.displayBlocks = function (libraryKey) {
|
||||||
|
|
Ładowanie…
Reference in New Issue