diff --git a/editor/script/tools/blip.js b/editor/script/tools/blip.js index 1c10766d..48284bc8 100644 --- a/editor/script/tools/blip.js +++ b/editor/script/tools/blip.js @@ -83,7 +83,6 @@ function makeBlipTool() { function generate() { var curBlip = blip[selectedId]; - curBlip.name = CreateDefaultName(blipNames[curGenerator], blip); switch (curGenerator) { case BlipGenerator.PICKUP: @@ -513,6 +512,15 @@ function makeBlipTool() { } }); + tool.menu.push({ + control: "button", + icon: "loop", + description: "Regenerate blip", + onclick : function(e) { + generate() + }, + }); + tool.menu.pop({ control: "group" }); }; @@ -538,6 +546,7 @@ function makeBlipTool() { } selectedId = nextId; + blip[selectedId].name = CreateDefaultName(blipNames[curGenerator], blip); generate(); };