Game Development Community

Overlapping GUIs issues

by Wendell Brown · in Torque Game Engine · 07/16/2002 (8:26 am) · 2 replies

Humm, I hope I can be clear with these questions.
The setup that I am running is the Realm Wars game code as a testbed for my edits at 800x600 resolution.

I have hacked the gameTSCtrl.cc code to include mouse object selection as supplied in the WorldEditor.cc. I liked being able to select multiple/individual objects via mouse select/dragging with the SHIFT key for objects in PlayGUI.
Upon inclusion into gameTSCtrl.cc, I noticed that the other overlapping GUIs called ShapeNameHud and MainChatHud on top of PlayGUI cause their mouse movement code to be executed because of their ::pointInControl() code which is as it should be.
The first problem lies in trying to get ShapeNameHud to render the cursor set in gameTSCtrl since it is the mouse parent for ShapeNameHud. The code for gameTSCtrl::onMouseMoved() sets the cursor "setCursor(ArrowCursor);" but it never gets render properly. I was assuming that the ::onRender function for gameTSCtrl would get it displayed. Where is my logic wrong? Does ShapeNameHud even get used in the rw (Realm Wars) game mod? Should it be deleted?
Second. Looking at the MainChatHud gui component users.adelphia.net/~wfbrown53/images/MainChatHudImage.png one can see that its' extent bounds is huge. I believe the extent in the GuiEditor states 400 300 and in the game it is set to 500 300. Any reason why it is so large and beyound the bounds of the other MainChatHud components? Do I just need to reduce its' size and save? Doing so confines the hitpoint to just the Message area and allows PlayGui mouse controls to work.

#1
07/16/2002 (8:35 am)
Just noticed another issue. If MainChatHud has its' components resized to the main message window area then the "p" keybound for message resizing get whacked.
I suppose a better Gui operation for those GUIs that only display info is to have them not affect mouse controls for layers under them ie. PlayGui. Is that the best solution here?
#2
07/16/2002 (8:53 am)
Hehe. I like posting as it makes me focus on what is happening with the code. Some things become clearer as one bonders and plays.
I believe what needs to happen to make MainChatHud behave properly is to allow the GUIControl extent to be resized along with outerChatHud changes that "p" key resizing generates. I don't mind not allowing mouse selections inside the messageHud as it is apparent within the game display that cursor/mouse components are not needed inside a message display component.
So the question now becomes why does the GuiDefaultProfile get its' extent so large for GuiControl? It seems that no GuiEditor changes can correct this as it appear to get resized for some reason.