GuiObjectSelectionHud (TGEA)
by Matt Huston · 07/06/2007 (5:35 pm) · 4 comments
Download Code File
Tested with TGEA 1.01
Overview
Object selection similar to Deus Ex, System Shock and other Action-RPGs. A outline rectangle is drawn and the objects name is printed at the top right corner. To add new objects, check the ObjectMask but remember you will need to make sure the object type being added has its own CastRay function or it won't be picked up. ItemObjectType for instance doesn't have one so you will need to add it yourself.
Add guiObjectSelectionHud.cpp to your project in the engine/game/fps directory.
Compile!
Add the following to the bottom of you playGui.gui.
OutlineColor - Object selection rectangle color.
TextColor - Object names text color.
TextOutlineColor - Text rectangles outline color.
iTextFillColor - Rectangle behind texts fill color.
Offset - Offset from the objects bounding box to the actual rectangle.
Tested with TGEA 1.01
Overview
Object selection similar to Deus Ex, System Shock and other Action-RPGs. A outline rectangle is drawn and the objects name is printed at the top right corner. To add new objects, check the ObjectMask but remember you will need to make sure the object type being added has its own CastRay function or it won't be picked up. ItemObjectType for instance doesn't have one so you will need to add it yourself.
Add guiObjectSelectionHud.cpp to your project in the engine/game/fps directory.
Compile!
Add the following to the bottom of you playGui.gui.
new GuiObjectSelectionHud() {
canSaveDynamicFields = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "relative";
VertSizing = "relative";
Position = "0 0";
Extent = "640 480";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
hovertime = "1000";
TextColor = "1 1 1 1";
TextOutlineColor = "1 1 1 1";
TextFillColor = "0.3 0.3 0.3 0.75";
OutlineColor = "1 1 1 1";
Offset = "10";
};OutlineColor - Object selection rectangle color.
TextColor - Object names text color.
TextOutlineColor - Text rectangles outline color.
iTextFillColor - Rectangle behind texts fill color.
Offset - Offset from the objects bounding box to the actual rectangle.
About the author
www.atomicbanzai.com
#2
Go right ahead, you can send me your code and I can put it up in the main body of the resource.
07/07/2007 (12:48 pm)
@bankGo right ahead, you can send me your code and I can put it up in the main body of the resource.
#3
10/10/2007 (2:02 pm)
Can u explain how to add ItemObjectType?
#4
Add castRay from the player.cpp to item.cpp, renaming its function definition to Item::castRay.
12/11/2007 (3:58 pm)
@TarasAdd castRay from the player.cpp to item.cpp, renaming its function definition to Item::castRay.
Associate Fyodor "bank" Osokin
Dedicated Logic