1) Create a new window.
2) Edit it in WindowEdit, delete everything, set the window's "Transparent" property to true.
3) Add a new static control and name it e.g. "sel_rect".
4) Assign a tiled image to the static control (see the forementioned docs).
5) In the window's script add convenience methods for setting the restangle position and for hiding it.
method ResizeRect(left, top, right, bottom)
{
rect.
Width = right - left;
}
method HideRect()
{
}
6) In game.script, load the window.
7) Also in game.script, change "var origPos;" to "global origPos;" so that we can access the drag start point from another script.
7) In game_loop.script resize the rectangle if dragging is in progress.
function HandleDragging()
{
global g_IsDragging;
global origPos;
global winSelection;
// not dragging, just hide the rectangle
if (!g_IsDragging)
{
winSelection.HideRect();
return;
}
// get curect drag rectangle (same code as above)
var left, right, top, bottom;
{
}
else
{
}
{
}
else
{
}
// resize the restangle
winSelection.ResizeRect(left, top, right, bottom);
}
Again, it's totally untested.
Note that this is relatively advanced scripting, and since you may not be experienced enough yet, maybe it would be better to start with something simpler.