kopia lustrzana https://github.com/backface/turtlestitch
commit
01b9417b87
|
@ -155,7 +155,7 @@ DialogBoxMorph, BlockInputFragmentMorph, PrototypeHatBlockMorph, Costume*/
|
|||
|
||||
// Global stuff ////////////////////////////////////////////////////////
|
||||
|
||||
modules.blocks = '2014-February-11';
|
||||
modules.blocks = '2014-May-02';
|
||||
|
||||
|
||||
var SyntaxElementMorph;
|
||||
|
@ -1635,6 +1635,12 @@ SyntaxElementMorph.prototype.showBubble = function (value) {
|
|||
morphToShow.silentSetWidth(img.width);
|
||||
morphToShow.silentSetHeight(img.height);
|
||||
morphToShow.image = img;
|
||||
} else if (value instanceof Costume) {
|
||||
img = value.thumbnail(new Point(40, 40));
|
||||
morphToShow = new Morph();
|
||||
morphToShow.silentSetWidth(img.width);
|
||||
morphToShow.silentSetHeight(img.height);
|
||||
morphToShow.image = img;
|
||||
} else if (value instanceof Context) {
|
||||
img = value.image();
|
||||
morphToShow = new Morph();
|
||||
|
|
13
byob.js
13
byob.js
|
@ -106,7 +106,7 @@ SymbolMorph, isNil*/
|
|||
|
||||
// Global stuff ////////////////////////////////////////////////////////
|
||||
|
||||
modules.byob = '2014-January-10';
|
||||
modules.byob = '2014-May-02';
|
||||
|
||||
// Declarations
|
||||
|
||||
|
@ -372,8 +372,12 @@ CustomCommandBlockMorph.prototype.refresh = function () {
|
|||
this.setCategory(def.category);
|
||||
if (this.blockSpec !== newSpec) {
|
||||
oldInputs = this.inputs();
|
||||
if (!this.zebraContrast) {
|
||||
this.forceNormalColoring();
|
||||
} else {
|
||||
this.fixBlockColor();
|
||||
}
|
||||
this.setSpec(newSpec);
|
||||
this.fixBlockColor();
|
||||
this.fixLabelColor();
|
||||
this.restoreInputs(oldInputs);
|
||||
} else { // update all input slots' drop-downs
|
||||
|
@ -2579,7 +2583,10 @@ InputSlotDialogMorph.prototype.symbolMenu = function () {
|
|||
myself = this;
|
||||
SymbolMorph.prototype.names.forEach(function (symbol) {
|
||||
symbols.push([
|
||||
[new SymbolMorph(symbol, myself.fontSize, symbolColor), symbol],
|
||||
[
|
||||
new SymbolMorph(symbol, myself.fontSize, symbolColor),
|
||||
localize(symbol)
|
||||
],
|
||||
'$' + symbol
|
||||
]);
|
||||
});
|
||||
|
|
22
history.txt
22
history.txt
|
@ -2103,3 +2103,25 @@ ______
|
|||
* Widgets: new “promptVector” dialog box feature
|
||||
* GUI: Use new vector prompter for stage dimensions
|
||||
* German translation update
|
||||
|
||||
140331
|
||||
------
|
||||
* Objects: experimental “wardrobe” and “jukebox” reporters in dev mode
|
||||
* Blocks, Objects: display costume thumbnails in speech/thought/value bubbles and watcher cells
|
||||
* Objects: let “switch to costume” block accept actual costume objects (in addition to names and numbers)
|
||||
|
||||
140430
|
||||
------
|
||||
* new Finnish translation, yay! Thanks, Jouni!
|
||||
* new Brazilian Portuguese translation, yay! Thanks, Aldo!
|
||||
* Russian translation update
|
||||
* Portuguese translation update
|
||||
* additional localisations, thanks, Manuel!
|
||||
* text-encoding fix for exporting variable contents, thanks, Blob!
|
||||
* set turbo mode block fix, thanks, Michael and Nathan!
|
||||
* enable storage and retrieval of first-class costumes in both file formats
|
||||
|
||||
140502
|
||||
------
|
||||
* error message when trying to import a non-text file into a variable, thanks, Nate!
|
||||
* fixed #407 (custom-block coloring w/ zebra off)
|
||||
|
|
Plik diff jest za duży
Load Diff
122
lang-pt.js
122
lang-pt.js
|
@ -1093,15 +1093,15 @@ SnapTranslator.dict.pt = {
|
|||
|
||||
// detecção de colisões
|
||||
'mouse-pointer':
|
||||
'ponteiro do rato',
|
||||
'o ponteiro do rato',
|
||||
'edge':
|
||||
'borda',
|
||||
'a borda',
|
||||
'pen trails':
|
||||
'traços da caneta',
|
||||
|
||||
// trajes
|
||||
'Turtle':
|
||||
'seta',
|
||||
'tartaruga',
|
||||
'Empty':
|
||||
'vazio',
|
||||
|
||||
|
@ -1225,7 +1225,7 @@ SnapTranslator.dict.pt = {
|
|||
'whitespace':
|
||||
'espaços em branco',
|
||||
'line':
|
||||
'avanços de linha',
|
||||
'linha',
|
||||
'tab':
|
||||
'tabuladores',
|
||||
'cr':
|
||||
|
@ -1385,5 +1385,117 @@ SnapTranslator.dict.pt = {
|
|||
'comment pic...':
|
||||
'fotografia do comentário…',
|
||||
'open a new window\nwith a picture of this comment':
|
||||
'Abrir uma nova janela com\numa fotografia deste comentário.'
|
||||
'Abrir uma nova janela com\numa fotografia deste comentário.',
|
||||
'undo':
|
||||
'desfazer',
|
||||
'Brush size':
|
||||
'Espessura do pincel',
|
||||
'Constrain proportions of shapes?\n(you can also hold shift)':
|
||||
'Preservar proporções das formas?\n(também pode pressionar shift)',
|
||||
'Eraser tool':
|
||||
'Borracha',
|
||||
'Paintbrush tool\n(free draw)':
|
||||
'Pincel\n(desenho livre)',
|
||||
'Line tool\n(shift: vertical/horizontal)':
|
||||
'Segmento de recta\n(shift: vertical/horizontal)',
|
||||
'Stroked Rectangle\n(shift: square)':
|
||||
'Rectângulo\n(shift: quadrado)',
|
||||
'Filled Rectangle\n(shift: square)':
|
||||
'Rectângulo preenchido\n(shift: quadrado)',
|
||||
'Stroked Ellipse\n(shift: circle)':
|
||||
'Elipse\n(shift: circunferência)',
|
||||
'Filled Ellipse\n(shift: circle)':
|
||||
'Elipse preenchida\n(shift: círculo)',
|
||||
'Fill a region':
|
||||
'Balde de tinta',
|
||||
'Set the rotation center':
|
||||
'Estabelecer centro de rotação',
|
||||
'Pipette tool\n(pick a color anywhere)':
|
||||
'Pipeta\n(recolher uma cor em qualquer lado)',
|
||||
'Paint Editor':
|
||||
'Editor de Pintura',
|
||||
'square':
|
||||
'quadrado',
|
||||
'pointRight':
|
||||
'triângulo para a direita',
|
||||
'gears':
|
||||
'roda dentada',
|
||||
'file':
|
||||
'arquivo',
|
||||
'fullScreen':
|
||||
'ecrã inteiro',
|
||||
'normalScreen':
|
||||
'ecrã normal',
|
||||
'smallStage':
|
||||
'palco pequeno',
|
||||
'normalStage':
|
||||
'palco normal',
|
||||
'turtle':
|
||||
'tartaruga',
|
||||
'stage':
|
||||
'palco',
|
||||
'turtleOutline':
|
||||
'contorno de tartaruga',
|
||||
'pause':
|
||||
'pausa',
|
||||
'flag':
|
||||
'bandeira',
|
||||
'octagon':
|
||||
'octógono',
|
||||
'cloud':
|
||||
'nuvem',
|
||||
'cloudOutline':
|
||||
'contorno de nuvem',
|
||||
'cloudGradient':
|
||||
'nuvem com gradiente',
|
||||
'turnRight':
|
||||
'girar à direita',
|
||||
'turnLeft':
|
||||
'girar à esquerda',
|
||||
'storage':
|
||||
'armazenagem',
|
||||
'poster':
|
||||
'póster',
|
||||
'flash':
|
||||
'relâmpago',
|
||||
'brush':
|
||||
'pincel',
|
||||
'rectangle':
|
||||
'rectângulo',
|
||||
'rectangleSolid':
|
||||
'rectângulo preenchido',
|
||||
'circle':
|
||||
'circunferência',
|
||||
'circleSolid':
|
||||
'círculo',
|
||||
'crosshairs':
|
||||
'mira',
|
||||
'paintbucket':
|
||||
'balde de tinta',
|
||||
'eraser':
|
||||
'borracha',
|
||||
'pipette':
|
||||
'pipeta',
|
||||
'speechBubble':
|
||||
'balão de fala',
|
||||
'speechBubbleOutline':
|
||||
'contorno de balão de fala',
|
||||
'arrowUp':
|
||||
'seta para cima',
|
||||
'arrowUpOutline':
|
||||
'contorno de seta para cima',
|
||||
'arrowLeft':
|
||||
'seta para a esquerda',
|
||||
'arrowLeftOutline':
|
||||
'contorno de seta para a esquerda',
|
||||
'arrowDown':
|
||||
'seta para baixo',
|
||||
'arrowDownOutline':
|
||||
'contorno de seta para baixo',
|
||||
'arrowRight':
|
||||
'seta para a direita',
|
||||
'arrowRightOutline':
|
||||
'contorno de seta para a direita',
|
||||
'robot':
|
||||
'robot'
|
||||
};
|
||||
|
|
Plik diff jest za duży
Load Diff
71
lang-ru.js
71
lang-ru.js
|
@ -168,7 +168,8 @@ SnapTranslator.dict.ru = {
|
|||
Special characters: (see <http://0xcc.net/jsescape/>)
|
||||
|
||||
, \u00c4, \u00e4
|
||||
, \u00d6, \u00f6
|
||||
|
||||
, \u00d6, \u00f6
|
||||
, \u00dc, \u00fc
|
||||
§ \u00df
|
||||
*/
|
||||
|
@ -186,15 +187,15 @@ SnapTranslator.dict.ru = {
|
|||
// GUI
|
||||
// control bar:
|
||||
'untitled':
|
||||
'неозаглавленный',
|
||||
'Безымянный',
|
||||
'development mode':
|
||||
'разрабатываемая версия',
|
||||
'Разрабатываемая версия',
|
||||
|
||||
// categories:
|
||||
'Motion':
|
||||
'Движение',
|
||||
'Looks':
|
||||
'Изображение',
|
||||
'Внешность',
|
||||
'Sound':
|
||||
'Звук',
|
||||
'Pen':
|
||||
|
@ -202,7 +203,7 @@ SnapTranslator.dict.ru = {
|
|||
'Control':
|
||||
'Управление',
|
||||
'Sensing':
|
||||
'Состояние',
|
||||
'Сенсоры',
|
||||
'Operators':
|
||||
'Операторы',
|
||||
'Variables':
|
||||
|
@ -220,13 +221,13 @@ SnapTranslator.dict.ru = {
|
|||
'Scripts':
|
||||
'Скрипты',
|
||||
'Costumes':
|
||||
'Маски',
|
||||
'Костюмы',
|
||||
'Sounds':
|
||||
'Звучания',
|
||||
'Звуки',
|
||||
|
||||
// names:
|
||||
'Sprite':
|
||||
'Образ',
|
||||
'Спрайт',
|
||||
'Stage':
|
||||
'Сцена',
|
||||
|
||||
|
@ -236,17 +237,17 @@ SnapTranslator.dict.ru = {
|
|||
'can rotate':
|
||||
'вращаемый',
|
||||
'only face left/right':
|
||||
'вращаемый только слева направо',
|
||||
'вращаемый только на лево и направо',
|
||||
|
||||
// new sprite button:
|
||||
'add a new sprite':
|
||||
'Добавить новый Образ',
|
||||
'Добавить новый спрайт',
|
||||
|
||||
// tab help
|
||||
'costumes tab help':
|
||||
'импорт изображение с другого веб-сайта\nили со своего компьютера скопировав его сюда',
|
||||
'импортируйте изображение с другого веб-сайта\nили со своего компьютера скопировав его сюда',
|
||||
'import a sound from your computer\nby dragging it into here':
|
||||
'импорт звук со своего компьютера\nскопировав его сюда',
|
||||
'импортируйте звук со своего компьютера\nскопировав его сюда',
|
||||
|
||||
// primitive blocks:
|
||||
|
||||
|
@ -282,7 +283,7 @@ SnapTranslator.dict.ru = {
|
|||
|
||||
// motion:
|
||||
'Stage selected:\nno motion primitives':
|
||||
'Сцена-клавиша нажата:\nДвижение-примитивы отключены',
|
||||
'Выбрана сцена:\nнет блоков движения',
|
||||
|
||||
'move %n steps':
|
||||
'передвинуть на %n шагов',
|
||||
|
@ -291,7 +292,7 @@ SnapTranslator.dict.ru = {
|
|||
'turn %counterclockwise %n degrees':
|
||||
'повернуть %counterclockwise на %n градусов',
|
||||
'point in direction %dir':
|
||||
'указывать в направл. %dir',
|
||||
'указывать в направлении %dir',
|
||||
'point towards %dst':
|
||||
'указывать на %dst',
|
||||
'go to x: %n y: %n':
|
||||
|
@ -319,17 +320,17 @@ SnapTranslator.dict.ru = {
|
|||
|
||||
// looks:
|
||||
'switch to costume %cst':
|
||||
'измен. маску на %cst',
|
||||
'изменить костюм на %cst',
|
||||
'next costume':
|
||||
'следующая маска',
|
||||
'следующий костюм',
|
||||
'costume #':
|
||||
'маска #',
|
||||
'костюм №',
|
||||
'say %s for %n secs':
|
||||
'произн. %s в теч. %n сек.',
|
||||
'говорить %s в течение %n сек',
|
||||
'say %s':
|
||||
'произнести %s',
|
||||
'говорить %s',
|
||||
'think %s for %n secs':
|
||||
'думать %s в теч. %n сек.',
|
||||
'думать %s в течение %n сек',
|
||||
'think %s':
|
||||
'думать %s',
|
||||
'Hello!':
|
||||
|
@ -337,25 +338,25 @@ SnapTranslator.dict.ru = {
|
|||
'Hmm...':
|
||||
'Хмм...',
|
||||
'change %eff effect by %n':
|
||||
'измен. %eff эфф. на %n',
|
||||
'изменить эффект %eff на %n',
|
||||
'set %eff effect to %n':
|
||||
'устан. %eff эфф. %n',
|
||||
'установить эффект %eff в %n',
|
||||
'clear graphic effects':
|
||||
'аннулировать графич. эфф-ты',
|
||||
'убрать эффекты',
|
||||
'change size by %n':
|
||||
'изменить размер на %n',
|
||||
'set size to %n %':
|
||||
'установить размер %n %',
|
||||
'установить размер в %n',
|
||||
'size':
|
||||
'размер',
|
||||
'show':
|
||||
'показывать',
|
||||
'показаться',
|
||||
'hide':
|
||||
'прятать',
|
||||
'спрятаться',
|
||||
'go to front':
|
||||
'переместить вперед',
|
||||
'переместиться на слой вперед',
|
||||
'go back %n layers':
|
||||
'перемест. на %n уровня назад',
|
||||
'переместиться на %n слоёв назад',
|
||||
|
||||
'development mode \ndebugging primitives:':
|
||||
'Разрабатываемая версия \nотладка примитивов:',
|
||||
|
@ -913,7 +914,7 @@ SnapTranslator.dict.ru = {
|
|||
|
||||
// About Snap
|
||||
'About Snap':
|
||||
'Snap! Реквизиты',
|
||||
'О Snap!',
|
||||
'Back...':
|
||||
'Bозврат...',
|
||||
'License...':
|
||||
|
@ -957,7 +958,7 @@ SnapTranslator.dict.ru = {
|
|||
|
||||
// coments
|
||||
'add comment here...':
|
||||
'добавить комментарий сюда...',
|
||||
'добавьте комментарий сюда...',
|
||||
|
||||
// drow downs
|
||||
// directions
|
||||
|
@ -974,17 +975,17 @@ SnapTranslator.dict.ru = {
|
|||
'mouse-pointer':
|
||||
'курсор мышки',
|
||||
'edge':
|
||||
'грань',
|
||||
'край',
|
||||
'pen trails':
|
||||
'линии пера',
|
||||
|
||||
// costumes
|
||||
'Turtle':
|
||||
'Горлица',
|
||||
'Черепашка',
|
||||
|
||||
// graphical effects
|
||||
'ghost':
|
||||
'прозрачн.',
|
||||
'прозрачность',
|
||||
|
||||
// keys
|
||||
'space':
|
||||
|
@ -1117,4 +1118,8 @@ SnapTranslator.dict.ru = {
|
|||
'последний',
|
||||
'any':
|
||||
'любой'
|
||||
'now connected':
|
||||
'вы вошли в систему'
|
||||
'undo':
|
||||
'отменить'
|
||||
};
|
||||
|
|
29
locale.js
29
locale.js
|
@ -42,7 +42,7 @@
|
|||
|
||||
/*global modules, contains*/
|
||||
|
||||
modules.locale = '2014-February-13';
|
||||
modules.locale = '2014-May-02';
|
||||
|
||||
// Global stuff
|
||||
|
||||
|
@ -368,4 +368,29 @@ SnapTranslator.dict.ca = {
|
|||
'tibabenfortlapalanca@gmail.com',
|
||||
'last_changed':
|
||||
'2013-11-26'
|
||||
};
|
||||
};
|
||||
|
||||
SnapTranslator.dict.fi = {
|
||||
// meta information
|
||||
'language_name':
|
||||
'suomi',
|
||||
'language_translator':
|
||||
'Jouni K. Sepp\u00e4nen',
|
||||
'translator_e-mail':
|
||||
'jks@iki.fi',
|
||||
'last_changed':
|
||||
'2014-04-18'
|
||||
};
|
||||
|
||||
SnapTranslator.dict.pt_BR = {
|
||||
// meta information
|
||||
'language_name':
|
||||
'Português do Brasil',
|
||||
'language_translator':
|
||||
'Aldo von Wangenheim',
|
||||
'translator_e-mail':
|
||||
'awangenh@inf.ufsc.br',
|
||||
'last_changed':
|
||||
'2014-04-20'
|
||||
};
|
||||
|
||||
|
|
107
objects.js
107
objects.js
|
@ -124,7 +124,7 @@ PrototypeHatBlockMorph*/
|
|||
|
||||
// Global stuff ////////////////////////////////////////////////////////
|
||||
|
||||
modules.objects = '2014-February-11';
|
||||
modules.objects = '2014-May-02';
|
||||
|
||||
var SpriteMorph;
|
||||
var StageMorph;
|
||||
|
@ -389,6 +389,12 @@ SpriteMorph.prototype.initBlocks = function () {
|
|||
},
|
||||
|
||||
// Looks - Debugging primitives for development mode
|
||||
reportCostumes: {
|
||||
type: 'reporter',
|
||||
category: 'looks',
|
||||
spec: 'wardrobe'
|
||||
},
|
||||
|
||||
alert: {
|
||||
type: 'command',
|
||||
category: 'looks',
|
||||
|
@ -446,6 +452,13 @@ SpriteMorph.prototype.initBlocks = function () {
|
|||
spec: 'tempo'
|
||||
},
|
||||
|
||||
// Sound - Debugging primitives for development mode
|
||||
reportSounds: {
|
||||
type: 'reporter',
|
||||
category: 'sound',
|
||||
spec: 'jukebox'
|
||||
},
|
||||
|
||||
// Pen
|
||||
clear: {
|
||||
type: 'command',
|
||||
|
@ -1620,6 +1633,8 @@ SpriteMorph.prototype.blockTemplates = function (category) {
|
|||
txt.setColor(this.paletteTextColor);
|
||||
blocks.push(txt);
|
||||
blocks.push('-');
|
||||
blocks.push(block('reportCostumes'));
|
||||
blocks.push('-');
|
||||
blocks.push(block('log'));
|
||||
blocks.push(block('alert'));
|
||||
}
|
||||
|
@ -1641,6 +1656,20 @@ SpriteMorph.prototype.blockTemplates = function (category) {
|
|||
blocks.push(watcherToggle('getTempo'));
|
||||
blocks.push(block('getTempo'));
|
||||
|
||||
// for debugging: ///////////////
|
||||
|
||||
if (this.world().isDevMode) {
|
||||
blocks.push('-');
|
||||
txt = new TextMorph(localize(
|
||||
'development mode \ndebugging primitives:'
|
||||
));
|
||||
txt.fontSize = 9;
|
||||
txt.setColor(this.paletteTextColor);
|
||||
blocks.push(txt);
|
||||
blocks.push('-');
|
||||
blocks.push(block('reportSounds'));
|
||||
}
|
||||
|
||||
} else if (cat === 'pen') {
|
||||
|
||||
blocks.push(block('clear'));
|
||||
|
@ -2262,6 +2291,11 @@ SpriteMorph.prototype.doWearPreviousCostume = function () {
|
|||
};
|
||||
|
||||
SpriteMorph.prototype.doSwitchToCostume = function (id) {
|
||||
if (id instanceof Costume) { // allow first-class costumes
|
||||
this.wearCostume(id);
|
||||
return;
|
||||
}
|
||||
|
||||
var num,
|
||||
arr = this.costumes.asArray(),
|
||||
costume;
|
||||
|
@ -2292,6 +2326,10 @@ SpriteMorph.prototype.doSwitchToCostume = function (id) {
|
|||
this.wearCostume(costume);
|
||||
};
|
||||
|
||||
SpriteMorph.prototype.reportCostumes = function () {
|
||||
return this.costumes;
|
||||
};
|
||||
|
||||
// SpriteMorph sound management
|
||||
|
||||
SpriteMorph.prototype.addSound = function (audio, name) {
|
||||
|
@ -2317,6 +2355,10 @@ SpriteMorph.prototype.playSound = function (name) {
|
|||
}
|
||||
};
|
||||
|
||||
SpriteMorph.prototype.reportSounds = function () {
|
||||
return this.sounds;
|
||||
};
|
||||
|
||||
// SpriteMorph user menu
|
||||
|
||||
SpriteMorph.prototype.userMenu = function () {
|
||||
|
@ -4353,6 +4395,8 @@ StageMorph.prototype.blockTemplates = function (category) {
|
|||
txt.setColor(this.paletteTextColor);
|
||||
blocks.push(txt);
|
||||
blocks.push('-');
|
||||
blocks.push(block('reportCostumes'));
|
||||
blocks.push('-');
|
||||
blocks.push(block('log'));
|
||||
blocks.push(block('alert'));
|
||||
}
|
||||
|
@ -4374,6 +4418,20 @@ StageMorph.prototype.blockTemplates = function (category) {
|
|||
blocks.push(watcherToggle('getTempo'));
|
||||
blocks.push(block('getTempo'));
|
||||
|
||||
// for debugging: ///////////////
|
||||
|
||||
if (this.world().isDevMode) {
|
||||
blocks.push('-');
|
||||
txt = new TextMorph(localize(
|
||||
'development mode \ndebugging primitives:'
|
||||
));
|
||||
txt.fontSize = 9;
|
||||
txt.setColor(this.paletteTextColor);
|
||||
blocks.push(txt);
|
||||
blocks.push('-');
|
||||
blocks.push(block('reportSounds'));
|
||||
}
|
||||
|
||||
} else if (cat === 'pen') {
|
||||
|
||||
blocks.push(block('clear'));
|
||||
|
@ -4832,6 +4890,9 @@ StageMorph.prototype.doWearPreviousCostume
|
|||
StageMorph.prototype.doSwitchToCostume
|
||||
= SpriteMorph.prototype.doSwitchToCostume;
|
||||
|
||||
StageMorph.prototype.reportCostumes
|
||||
= SpriteMorph.prototype.reportCostumes;
|
||||
|
||||
// StageMorph graphic effects
|
||||
|
||||
StageMorph.prototype.setEffect
|
||||
|
@ -4873,6 +4934,9 @@ StageMorph.prototype.resumeAllActiveSounds = function () {
|
|||
});
|
||||
};
|
||||
|
||||
StageMorph.prototype.reportSounds
|
||||
= SpriteMorph.prototype.reportSounds;
|
||||
|
||||
// StageMorph non-variable watchers
|
||||
|
||||
StageMorph.prototype.toggleWatcher
|
||||
|
@ -4999,6 +5063,12 @@ SpriteBubbleMorph.prototype.dataAsMorph = function (data) {
|
|||
contents.silentSetWidth(img.width);
|
||||
contents.silentSetHeight(img.height);
|
||||
contents.image = img;
|
||||
} else if (data instanceof Costume) {
|
||||
img = data.thumbnail(new Point(40, 40));
|
||||
contents = new Morph();
|
||||
contents.silentSetWidth(img.width);
|
||||
contents.silentSetHeight(img.height);
|
||||
contents.image = img;
|
||||
} else if (data instanceof HTMLCanvasElement) {
|
||||
contents = new Morph();
|
||||
contents.silentSetWidth(data.width);
|
||||
|
@ -5841,6 +5911,12 @@ CellMorph.prototype.drawNew = function () {
|
|||
this.contentsMorph.silentSetWidth(img.width);
|
||||
this.contentsMorph.silentSetHeight(img.height);
|
||||
this.contentsMorph.image = img;
|
||||
} else if (this.contents instanceof Costume) {
|
||||
img = this.contents.thumbnail(new Point(40, 40));
|
||||
this.contentsMorph = new Morph();
|
||||
this.contentsMorph.silentSetWidth(img.width);
|
||||
this.contentsMorph.silentSetHeight(img.height);
|
||||
this.contentsMorph.image = img;
|
||||
} else if (this.contents instanceof List) {
|
||||
if (this.isCircular()) {
|
||||
this.contentsMorph = new TextMorph(
|
||||
|
@ -6374,7 +6450,17 @@ WatcherMorph.prototype.userMenu = function () {
|
|||
inp.addEventListener(
|
||||
"change",
|
||||
function () {
|
||||
var file, i;
|
||||
var file;
|
||||
|
||||
function txtOnlyMsg(ftype) {
|
||||
ide.inform(
|
||||
'Unable to import',
|
||||
'Snap! can only import "text" files.\n' +
|
||||
'You selected a file of type "' +
|
||||
ftype +
|
||||
'".'
|
||||
);
|
||||
}
|
||||
|
||||
function readText(aFile) {
|
||||
var frd = new FileReader();
|
||||
|
@ -6384,18 +6470,19 @@ WatcherMorph.prototype.userMenu = function () {
|
|||
e.target.result
|
||||
);
|
||||
};
|
||||
frd.readAsText(aFile);
|
||||
|
||||
if (aFile.type.indexOf("text") === 0) {
|
||||
frd.readAsText(aFile);
|
||||
} else {
|
||||
txtOnlyMsg(aFile.type);
|
||||
}
|
||||
}
|
||||
|
||||
document.body.removeChild(inp);
|
||||
ide.filePicker = null;
|
||||
if (inp.files.length > 0) {
|
||||
for (i = 0; i < inp.files.length; i += 1) {
|
||||
file = inp.files[i];
|
||||
if (file.type.indexOf("text") === 0) {
|
||||
readText(file);
|
||||
}
|
||||
}
|
||||
file = inp.files[inp.files.length - 1];
|
||||
readText(file);
|
||||
}
|
||||
},
|
||||
false
|
||||
|
@ -6411,7 +6498,7 @@ WatcherMorph.prototype.userMenu = function () {
|
|||
'export...',
|
||||
function () {
|
||||
window.open(
|
||||
'data:text/plain,' +
|
||||
'data:text/plain;charset=utf-8,' +
|
||||
encodeURIComponent(this.currentValue.toString())
|
||||
);
|
||||
}
|
||||
|
|
5
paint.js
5
paint.js
|
@ -52,6 +52,7 @@
|
|||
September 16 - flood fill freeze fix (Kartik)
|
||||
Jan 08 - mouse leave dragging fix (Kartik)
|
||||
Feb 11 - dynamically adjust to stage dimensions (Jens)
|
||||
Apr 30 - localizations (Manuel)
|
||||
|
||||
*/
|
||||
|
||||
|
@ -65,7 +66,7 @@
|
|||
|
||||
// Global stuff ////////////////////////////////////////////////////////
|
||||
|
||||
modules.paint = '2014-February-11';
|
||||
modules.paint = '2014-May-02';
|
||||
|
||||
// Declarations
|
||||
|
||||
|
@ -372,7 +373,7 @@ PaintEditorMorph.prototype.populatePropertiesMenu = function () {
|
|||
c.add(pc.colorpicker);
|
||||
//c.add(pc.primaryColorButton);
|
||||
c.add(pc.primaryColorViewer);
|
||||
c.add(new TextMorph("Brush size"));
|
||||
c.add(new TextMorph(localize("Brush size")));
|
||||
c.add(alpen);
|
||||
c.add(pc.constrain);
|
||||
};
|
||||
|
|
14
store.js
14
store.js
|
@ -61,7 +61,7 @@ SyntaxElementMorph*/
|
|||
|
||||
// Global stuff ////////////////////////////////////////////////////////
|
||||
|
||||
modules.store = '2014-February-13';
|
||||
modules.store = '2014-May-02';
|
||||
|
||||
|
||||
// XML_Serializer ///////////////////////////////////////////////////////
|
||||
|
@ -457,8 +457,6 @@ SnapSerializer.prototype.loadProjectModel = function (xmlNode) {
|
|||
}
|
||||
});
|
||||
|
||||
this.objects = {};
|
||||
|
||||
/* Global Variables */
|
||||
|
||||
if (model.globalVariables) {
|
||||
|
@ -468,6 +466,8 @@ SnapSerializer.prototype.loadProjectModel = function (xmlNode) {
|
|||
);
|
||||
}
|
||||
|
||||
this.objects = {};
|
||||
|
||||
/* Watchers */
|
||||
|
||||
model.sprites.childrenNamed('watcher').forEach(function (model) {
|
||||
|
@ -521,7 +521,7 @@ SnapSerializer.prototype.loadProjectModel = function (xmlNode) {
|
|||
))
|
||||
);
|
||||
project.stage.add(watcher);
|
||||
watcher.update();
|
||||
watcher.onNextStep = function () {this.currentValue = null; };
|
||||
|
||||
// set watcher's contentsMorph's extent if it is showing a list and
|
||||
// its monitor dimensions are given
|
||||
|
@ -1302,6 +1302,12 @@ SnapSerializer.prototype.openProject = function (project, ide) {
|
|||
ide.createCorral();
|
||||
ide.selectSprite(sprite);
|
||||
ide.fixLayout();
|
||||
|
||||
// force watchers to update
|
||||
//project.stage.watchers().forEach(function (watcher) {
|
||||
// watcher.onNextStep = function () {this.currentValue = null;};
|
||||
//})
|
||||
|
||||
ide.world().keyboardReceiver = project.stage;
|
||||
};
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ ArgLabelMorph, localize, XML_Element, hex_sha512*/
|
|||
|
||||
// Global stuff ////////////////////////////////////////////////////////
|
||||
|
||||
modules.threads = '2014-Feb-10';
|
||||
modules.threads = '2014-May-02';
|
||||
|
||||
var ThreadManager;
|
||||
var Process;
|
||||
|
@ -1482,10 +1482,10 @@ Process.prototype.doSetFastTracking = function (bool) {
|
|||
if (this.homeContext.receiver) {
|
||||
ide = this.homeContext.receiver.parentThatIsA(IDE_Morph);
|
||||
if (ide) {
|
||||
if (ide.stage.isFastTracked) {
|
||||
ide.stopFastTracking();
|
||||
} else {
|
||||
if (bool) {
|
||||
ide.startFastTracking();
|
||||
} else {
|
||||
ide.stopFastTracking();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue