Game Development Community

Moveable controls

by DejaBlue · in Torque Game Engine · 12/01/2005 (3:25 pm) · 1 replies

I made a maphud using a GuiMapOverviewCtrl but even using a guictrl seems that ingame ( i do have cursor) i cannot move the control around in the playgui.

am i missing something? or controls have to be in its own gui and popped visible to me moved around?

or is there away to add control within playgui to move a control around? having just default windows where they are placed isn't the best idea since everyone has there own idea where they might want a window(chat,health bar, energy bar and such)

so is there any resources that are out there to accomplish this? since i have been looking to no avail. and i dont have the coding experience to code mousr stuff on my own. any refrence or help would be highly appreciated.

Just for example:
i have a ctrl already inside of playgui. i want to be able to click and drag this where i want to on the screen

#1
12/01/2005 (4:59 pm)
This is a fairly common hurdle. We ran in to this when we were creating our first interfaces.

The easiest way is to create a guiwindowctrl and place your guimapoverviewctrl "inside" it. Then you can bind a key or another button to "pop" the window. Voila! Now you can move your control. You will, however, need to create a custom profile to change the look-and-feel of your guiwindowctrl. If you don't it'll look like a very vanilla windows dialog.

We didn't have much luck creating separate .gui files simply to get the dragging functionality. The problem with popping from separate .guis that are not a part of the main hud gui is that you end up with a modal window and cannot interact with the rest of the game while it is open.

If this explanation is too general, let me know and I can provide you with some torque gui examples that should point you in the right direction.

Just let me know... and good luck!

-Robert