Dragging and dropping between two windows
All modern graphical user interfaces include being able to drag-and-drop objects from one location to another. Torque 3D's GUI also supports drag-and-drop operations with a little bit of setup. In this recipe, we will create two windows that demonstrate how to drag-and-drop items between them. The first window will stand for an RPG inventory, while the second window will represent an RPG paper doll display.
Getting ready
For this recipe, we will be working with the GUI Editor, a text editor such as Torsion, and the console. We begin by starting up our game (such as the one built using the Full
template) with the main menu currently displayed.
How to do it…
In the following steps, we will be creating two windows to perform a drag-and-drop operation between. We will then test out our work.
On the main menu screen, open the GUI Editor by pressing F10.
We will now build the inventory window. From the File menu select New Gui. The Create new GUI dialog box...