Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is pretty much the same as my other pull request, but this time it's to the dev branch instead of master, and this time I didn't merge master into it (meaning the only files that were changed are the files I changed (I hope I did it right this time)).
This adds the ability to copy / paste scripts and comments. It works by setting a value to the block xml, which it then loads as if the user dropped a file into the script area. This makes sure that blocks are properly pasted, so if a custom block that doesn't exist in that scene or sprite, it creates the custom block. The only issue with this implementation is that when a user copies a custom block, then changes the custom block and then pastes, the custom block will be replaced by the old definition.
If you right click a block, there will be 3 new options:
Comments also have new options
When you copy a comment, the width is also copies, so when you paste it, it stays the same width.
When you right click the editor area, there is a new option to paste (it only shows if you have already copied something).
There are also some keyboard shortcuts
I know this would make editing faster, because you don't have to drag blocks a very long distance now. You can just cut the script, then scroll to where you need the script, and paste (and it helps with accidentally dropping it in a c slot while dragging it up or down).
Again, the only issue with this is that when you copy a custom block, edit it, then paste, the definition will revert back to when you copied the block. I don't know of an elegant way of fixing this, as it would require modifying the
IDE_Morph.prototype.droppedText
function.I am open to talking about this, and modifications. I don't think it would be best to merge this as it is currently, because I'm not sure if the function names should be renamed.