Click and drag issue

I have a menu from which you can click and drag things into the game. However, if the mouse hits something else, they are both brought to the mouse position and moved together and cannot be seperated!

imageshack.us/photo/my-images/233/problemfg.png/

The image above demonstrates the problem. I can click on the text at the top left to make a new blue block, but when I click + drag it across the screen, if the mouse goes over another blue block, it will pick it up too and those two blue blocks will be forever combined at the same position.

I tried already to use a bool to say the mouse button is already pressed, but it seems to not let you click and drag anything at all when you do that method. :confused:

Be sure to correctly set the “bool” when mouse button is pressed and release. When clicking on an object, check if the bool is to the state “released”.
Here is an example of a simple editor :
Game_editor.zip (5.35 KB)

You can adapt it to your need.

Works brilliantly! Thank you very much Florian!