kopia lustrzana https://github.com/backface/turtlestitch
double-clicking a corral sprite icon flashes the sprite onstage
so it can be identified. Likewise double-clicking a sprite onstage selects its corral icon (in edit mode)upd4.1
rodzic
ce75402fc4
commit
93d96140ca
10
gui.js
10
gui.js
|
@ -75,7 +75,7 @@ isRetinaSupported, SliderMorph, Animation*/
|
||||||
|
|
||||||
// Global stuff ////////////////////////////////////////////////////////
|
// Global stuff ////////////////////////////////////////////////////////
|
||||||
|
|
||||||
modules.gui = '2017-September-28';
|
modules.gui = '2017-October-17';
|
||||||
|
|
||||||
// Declarations
|
// Declarations
|
||||||
|
|
||||||
|
@ -7114,6 +7114,14 @@ SpriteIconMorph.prototype.showSpriteOnStage = function () {
|
||||||
this.object.showOnStage();
|
this.object.showOnStage();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// SpriteIconMorph events
|
||||||
|
|
||||||
|
SpriteIconMorph.prototype.mouseDoubleClick = function () {
|
||||||
|
if (this.object instanceof SpriteMorph) {
|
||||||
|
this.object.flash();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// SpriteIconMorph drawing
|
// SpriteIconMorph drawing
|
||||||
|
|
||||||
SpriteIconMorph.prototype.createBackgrounds = function () {
|
SpriteIconMorph.prototype.createBackgrounds = function () {
|
||||||
|
|
|
@ -3711,6 +3711,7 @@ Fixes:
|
||||||
* Blocks: show all own vars and attributes in INHERIT drop-down when inside a ring
|
* Blocks: show all own vars and attributes in INHERIT drop-down when inside a ring
|
||||||
* Objects: made 'myself' default input for "a new clone of" reporter
|
* Objects: made 'myself' default input for "a new clone of" reporter
|
||||||
* German translation update
|
* German translation update
|
||||||
|
* GUI, Objects: double-clicking a corral sprite icon flashes the sprite onstage
|
||||||
|
|
||||||
|
|
||||||
v4.1 Features:
|
v4.1 Features:
|
||||||
|
@ -3748,6 +3749,7 @@ v4.1 Features:
|
||||||
* experimental "download script" feature
|
* experimental "download script" feature
|
||||||
* new "Animation" library
|
* new "Animation" library
|
||||||
* new "Pixels" library for MediaComp
|
* new "Pixels" library for MediaComp
|
||||||
|
* double-clicking a corral sprite icon flashes the sprite onstage
|
||||||
|
|
||||||
Fixes:
|
Fixes:
|
||||||
* changed keyboard shortcut indicator for “find blocks” to “^”
|
* changed keyboard shortcut indicator for “find blocks” to “^”
|
||||||
|
|
16
objects.js
16
objects.js
|
@ -69,7 +69,7 @@
|
||||||
|
|
||||||
/*global PaintEditorMorph, ListWatcherMorph, PushButtonMorph, ToggleMorph,
|
/*global PaintEditorMorph, ListWatcherMorph, PushButtonMorph, ToggleMorph,
|
||||||
DialogBoxMorph, InputFieldMorph, SpriteIconMorph, BlockMorph, SymbolMorph,
|
DialogBoxMorph, InputFieldMorph, SpriteIconMorph, BlockMorph, SymbolMorph,
|
||||||
ThreadManager, VariableFrame, detect, BlockMorph, BoxMorph, Color,
|
ThreadManager, VariableFrame, detect, BlockMorph, BoxMorph, Color, Animation,
|
||||||
CommandBlockMorph, FrameMorph, HatBlockMorph, MenuMorph, Morph, MultiArgMorph,
|
CommandBlockMorph, FrameMorph, HatBlockMorph, MenuMorph, Morph, MultiArgMorph,
|
||||||
Point, ReporterBlockMorph, ScriptsMorph, StringMorph, SyntaxElementMorph,
|
Point, ReporterBlockMorph, ScriptsMorph, StringMorph, SyntaxElementMorph,
|
||||||
TextMorph, contains, degrees, detect, newCanvas, nop, radians, Array,
|
TextMorph, contains, degrees, detect, newCanvas, nop, radians, Array,
|
||||||
|
@ -6014,6 +6014,20 @@ SpriteMorph.prototype.destroy = function () {
|
||||||
|
|
||||||
// SpriteMorph highlighting
|
// SpriteMorph highlighting
|
||||||
|
|
||||||
|
SpriteMorph.prototype.flash = function () {
|
||||||
|
var world = this.world(),
|
||||||
|
myself = this;
|
||||||
|
this.addHighlight();
|
||||||
|
world.animations.push(new Animation(
|
||||||
|
nop,
|
||||||
|
nop,
|
||||||
|
0,
|
||||||
|
800,
|
||||||
|
nop,
|
||||||
|
function () {myself.removeHighlight(); }
|
||||||
|
));
|
||||||
|
};
|
||||||
|
|
||||||
SpriteMorph.prototype.addHighlight = function (oldHighlight) {
|
SpriteMorph.prototype.addHighlight = function (oldHighlight) {
|
||||||
var isHidden = !this.isVisible,
|
var isHidden = !this.isVisible,
|
||||||
highlight;
|
highlight;
|
||||||
|
|
Ładowanie…
Reference in New Issue