Drag and drop in the editor improvements

Drag and drop fun in CGE editor

A few improvements to the drag-and-drop experience in our editor:

  1. You can drag-and-drop from “Files” to “Hierarchy” panel. This will add a child to the currently selected item in the tree view.

  2. You can drag-and-drop images from “Files” to the central design area even when you’re not over a viewport. From such image, we will create TCastleImageControl. You can also drag-and-drop with Shift pressed to force creating a TCastleImageControl (instead of the default TCastleImageTransform) even when dragging over a viewport.

  3. You can drag-and-drop also .castle-user-interface files (will create a TCastleDesign that references them) or .castle-transform files (will create TCastleTransformDesign that references them). If you want to test it out, see e.g. examples/advanced_editor/advanced_loading_designs project.

  4. I also reported drag-and-drop bug with cursor on Lazarus GTK2 widgetset that affects us.

In effect (summing up previous and new features):

You can drag-and-drop various files from “Files” to “Hierarchy” or central design area.

Enjoy, happy dragging and dropping 🙂

1 Like