Skip to content

Commit ab25a08

Browse files
committed
Merge pull request scratchfoundation#173 from nathan/context-menu-info
Added "info" menu item to sprite context menu
2 parents 9be7d2e + 3af3947 commit ab25a08

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/scratch/ScratchSprite.as

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,8 @@ public class ScratchSprite extends ScratchObj {
450450

451451
public function menu(evt:MouseEvent):Menu {
452452
var m:Menu = new Menu();
453+
m.addItem('info', showDetails);
454+
m.addLine();
453455
m.addItem('duplicate', duplicateSprite);
454456
m.addItem('delete', deleteSprite);
455457
m.addLine();
@@ -487,6 +489,12 @@ public class ScratchSprite extends ScratchObj {
487489
}
488490
}
489491

492+
public function showDetails():void {
493+
var app:Scratch = Scratch.app;
494+
app.selectSprite(this);
495+
app.libraryPart.showSpriteDetails(true);
496+
}
497+
490498
public function unusedSpriteName(baseName:String):String {
491499
var stg:ScratchStage = parent as ScratchStage;
492500
return stg ? stg.unusedSpriteName(baseName) : baseName;

0 commit comments

Comments
 (0)