Game Development Community

dev|Pro Game Development Curriculum

Context sensitive crosshair/object interaction

by Gareth Fouche · 02/28/2006 (6:57 pm) · 38 comments

Download Code File

As described in my plan a while ago, this resource adds a context sensitive crosshair to your game. Its based on the guiCrossHairHud that comes with TGE.

The crosshair is basically continually firing a ray into the scene on the client side, and storing a reference to the first object that intersects that ray. Then, when it comes time to render, it calls a script function to determine which "mode" it is in, based on that object. I put this in script so you can easily change the logic without recompiling the engine code. Based on which mode its in, it renders a different cursor. The modes are :

- normal
- hostile
- talk
- interact

I took a page from one of the gui components here, guiBitmapButtonCtrl, in the way I handled loading up the different bitmaps. In code, where you define the crosshair, you specify a bitmap string field. This is the name of the bitmap used in normal mode. For the other modes, the bitmaps must be named the same as the basic one, with "_[modename]" added to the end. I've included example bitmaps, which are named according to this convention :

- crossHair.png
- crossHair_hostile.png
- crossHair_talk.png
- crossHair_interact.png


Ok, to add this to your project, first add guiAdvancedCrossHairHud.cc to your project. Also, you need to modify the existing guiBitmapControl, which is in the \gui\controls\ subfolder. The setbitmap() functions need to be virtual, so that when the advanced crosshair calls setbitmap(), its overriden function is called, not guiBitmapControls (its ancestor). I've included the modified header file "guiBitmapControl.h", so you can just copy this over it. If you find the cursor turning into a black square instead of the bitmap when you look at something, its probably because you left this out ;)

Next, copy the .png files into the " \starter.fps\client\scripts\" folder, so that the game finds them when it loads.

Add "guiAdvancedCrossHairHud.cs" into the same folder. This is the bit of scripted logic that determines what the mode is based on the object. You'll see that it sets the mode to "normal" if the found object is the terrain (or it didn't find an object), "hostile" if its another player, and "interact" if its anything else (ie trees, houses, shapes etc). You can change this to suit whatever your game requirements are.

Again in the " \starter.fps\client\scripts\" folder, modify "default.bind.cs" by adding the following at the end (note this only works if your crosshair is named "CrossHair", but we will handle that in a minute ;)) :

moveMap.bind(keyboard, "m",  "Interact");

function Interact(%val)
{
   if(%val)
   {
      %obj = CrossHair.getSelectedObject();
      if(%obj !$= -1)
	   commandToServer('Interact',%obj.getGhostID());      
   }
}


So you press "m" to interact with the object under your cursor (it can be any distance away, if you want to change that so theres limited range, modify the code to do a check, I'm leaving that up to you guys)

Now open "\starter.fps\client\init.cs" and add the following :

exec("./scripts/guiAdvancedCrossHairHud.cs");

just after the line that says

exec("./scripts/centerPrint.cs");


In the "\starter.fps\client\" folder, make sure to delete config.cs and config.cs.dso, so that your key binding takes effect.

Now, in the "\starter.fps\client\ui" folder, open playGui.gui and find the line where they define the crosshair :

new GuiCrossHairHud() {

and change it to define an Advanced Crosshair, named "CrossHair" :

new GuiAdvancedCrossHairHud(CrossHair) {

You'll see a little further down where the base bitmap name is defined (./crossHair), notice you dont need the image type extension on the end, ie no .png. You dont need to make any changes here, unless your cursor bitmaps are named something else.

Almost done now, just need to put in the server side stuff. Open up "\starter.fps\server\commands.cs" and add the following at the bottom :

function serverCmdInteract(%client, %objID)
{
  onInteractWith(%client, %objID);
}

Now you need to define the function that actually handles interaction between your player and the object. What it does is very dependant on your game specifics, but I'm going to give you an example so you have an idea of how to do it. You could just put this code in the same file, but I put it at the end of "\starter.fps\server\game.cs", its up to you really :

function onInteractWith(%client, %objID)
{

  %obj = %client.resolveObjectFromGhostIndex(%objID);
  echo("(SERVER) INTERACTING WITH " @ %obj);

  if(%obj.getType() & $TypeMasks::PlayerObjectType)
  {
      echo("Your Death Stare does " @ %obj.getShapeName() @ " 200 points of damage! ZAP!");
      %obj.applyDamage(200);     
  }
}

All this piece of code does is check if the target object is a player, and if it is damages it. If you wanted to do something to Items (say pick them up, or use them), you would need to add another "if statement" checking for the right TypeMask (you can find the available types in the objectTypes.h file, just copy how I do the "if" there, replacing PlayerObjectType with something else ;)), and call an appropriate function, like %client.player.pickup(%obj).

Another thing to note there is the "resolveObjectFromGhostIndex" call. This is important, and a useful thing to remember. When the client sends the server an ID, it is the ID of a "ghost" object, ie a copy. You need this call for the server to figure out which of its objects corresponds to the ghost object on the clients side.


Ok, thats it, hope you enjoy it, have fun slaughtering Kork with a nasty look ;).
Page«First 1 2 Next»
#21
06/24/2006 (3:53 pm)
Excellent resourse.

I just need to get it also working in the 3rd person view.. or has someone already managed to get that in?
#22
10/29/2006 (12:31 pm)
Haven't used this resource for quite a while but implemented it into 1.5. I am having trouble getting the crosshair to change on items other than PlayerObjectType.

I have this added to the client-side script file and nothing happens. Any ideas?

if(%obj.getType() & $TypeMasks::ItemObjectType)
        {
         // echo("setting hostile");
          %this.setModeInteract();
        }
#23
11/24/2006 (7:12 am)
Hmm, Matt, I'm not sure. Are you seeing the same cursor when you mouse over an item, or an empty box? If so, then its this :

"The setbitmap() functions need to be virtual, so that when the advanced crosshair calls setbitmap(), its overriden function is called, not guiBitmapControls (its ancestor)."

When I ported it to 1.5, I forgot to do that and it caused a problem. Otherwise, I could send you my working 1.5 code?
#24
11/25/2006 (8:00 am)
If you have a working version of this for 1.5, could you post it as a new resource, or update this one? (Maybe a separate file, if you want to maintain the 1.4 version). This would come in very handy, thanks :)
#25
01/21/2007 (12:09 pm)
I've implemented this verbatim and seem to get the following problems. Was wondering if you guys have come across the same thing or would know how to solve them.

1) /default.bind.cs(571):Unable to find object: 'CrossHair' attempting to call function 'getSelectedObject'

I have created an GuiAdvancedCrossHairhud named CrossHair as this suggests but it can't seem to find it.

2)/default.bind.cs(571):Unable to find object: '1' attempting to call function 'getGhostID'

Also can't find the object that I am attempting to interact with.

Any suggestions? Thanks for any help offered in advance.
#26
01/22/2007 (8:47 am)
1>c:\afx_combopack\engine\gui\controls\guibitmapctrl.cc(21) : error C2039: 'setBitmapName' : is not a member of 'GuiBitmapCtrl'

1> c:\afx_combopack\engine\gui\controls\guibitmapctrl.h(17) : see declaration of 'GuiBitmapCtrl'

Also getting that when recompiling.
#27
06/08/2007 (12:44 pm)
Nice resource! Had some hiccups integrating it, though. When I change setBitmap in guiBitmapControl to virtual void, I get link errors. Not changing this will allow the engine to compile, but when I look at something, the crosshair just turns into a black square (as you said).
Though for my game, I don't need the crosshair to change - just the interaction part. So five stars from me!
#28
06/30/2007 (4:40 pm)
Here is the file ported over to TGEA 1.01. You will still need to add virtual to the two setBitmap in definitions guiBitmapCtrl.h. Enjoy :)

www.matt3d.com/files/guiAdvancedCrossHairHud_TGEA.zip
#29
09/28/2007 (3:15 pm)
"1>c:\afx_combopack\engine\gui\controls\guibitmapctrl.cc(21) : error C2039: 'setBitmapName' : is not a member of 'GuiBitmapCtrl'

1> c:\afx_combopack\engine\gui\controls\guibitmapctrl.h(17) : see declaration of 'GuiBitmapCtrl'

Also getting that when recompiling.
"

I get the exact same error. Fresh install of 1.5.2..any suggestions?
#30
01/14/2008 (4:12 am)
@Wayne & John

I had the same problem, and it compiled when I made this change to guiBitmapCtrl.h:
class GuiBitmapCtrl : public GuiControl
{
...
protected:
	static bool setBitmapName( void *obj, const char *data );
...
}
#31
04/04/2008 (2:01 pm)
I had no problems compiling under 1.5 -- just make sure you don't overwrite guiBitmapCtrl.h. Instead, find these two functions in your unmodified version of the file:

void setBitmap(const char *name,bool resize = false);
void setBitmap(const TextureHandle &handle,bool resize = false);

Comment those two out, and under them place:

virtual void setBitmap(const char *name,bool resize = false);
virtual void setBitmap(const TextureHandle &handle,bool resize = false);

So essentially, just place virtual in front of them. :P

I have a question though -- it looks like I can interact with objects that are way too far. Any ideas? I can't use the usual castRay method because of a bug that I can't solve. :\
#32
07/02/2010 (6:03 pm)
Torque 3D 1.1 Beta 1 Port

guiAdvancedCrossHairHud.cpp
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
#include "gfx/gfxDevice.h"
#include "gui/core/guiControl.h"
#include "gui/controls/guiBitmapCtrl.h"
#include "console/consoleTypes.h"
#include "sceneGraph/sceneGraph.h"
#include "T3D/gameBase/gameConnection.h"
#include "T3D/shapeBase.h"
#include "gfx/gfxDrawUtil.h"

//-----------------------------------------------------------------------------
/// Vary basic cross hair hud.
/// Uses the base bitmap control to render a bitmap, and decides whether
/// to draw or not depending on the current control object and it's state.
/// If there is ShapeBase object under the cross hair and it's named,
/// then a small health bar is displayed.



///-------------------------------------

/// Set 'bitmap' comsole field to base name of bitmaps to use.  This control will
/// append '_hostile' for hostile
/// append '_talk' for talk
/// append '_interact' for interact
///
/// if bitmap cannot be found it will use the default bitmap to render.

class GuiAdvancedCrossHairHud : public GuiBitmapCtrl
{
   typedef GuiBitmapCtrl Parent;

   ColorF   mDamageFillColor;
   ColorF   mDamageFrameColor;
   Point2I  mDamageRectSize;
   Point2I  mDamageOffset;

	SceneObject* mSelectedObj;


protected:

	enum CrossHairMode
	{
		normal,
		hostile,
		interact,
		talk
	};


	CrossHairMode mMode;

	//	
	GFXTexHandle mTextureHandle_Hostile;
	GFXTexHandle mTextureHandle_Interact;
	GFXTexHandle mTextureHandle_Talk;

   void drawDamage(Point2I offset, F32 damage, F32 opacity);
	void renderCrossHair(GFXTexHandle &textureHandle, Point2I offset, const RectI &updateRect);

public:
   GuiAdvancedCrossHairHud();

	void onSleep();
   void onRender( Point2I, const RectI &);
   static void initPersistFields();

	virtual void setBitmap(const char *name, bool resize = false);

	SceneObject* getSelectedObject()  { return  mSelectedObj; }


	void setModeNormal(){mMode = normal;}
	void setModeHostile(){mMode = hostile;}
	void setModeInteract(){mMode = interact;}
	void setModeTalk(){mMode = talk;}


   DECLARE_CONOBJECT( GuiAdvancedCrossHairHud );
};

/// Valid object types for which the cross hair will render, this
/// should really all be script controlled.
static const U32 ObjectMask = PlayerObjectType | VehicleObjectType;


//-----------------------------------------------------------------------------

IMPLEMENT_CONOBJECT( GuiAdvancedCrossHairHud );

GuiAdvancedCrossHairHud::GuiAdvancedCrossHairHud()
{
   mDamageFillColor.set( 0, 1, 0, 1 );
   mDamageFrameColor.set( 1.0f, 0.6f, 0.0f, 1.0f );
   mDamageRectSize.set(50, 4);
   mDamageOffset.set(0,32);

	mSelectedObj = NULL;
	mMode = normal;
}

void GuiAdvancedCrossHairHud::initPersistFields()
{
   Parent::initPersistFields();
   addGroup("Damage");		
   addField( "damageFillColor", TypeColorF, Offset( mDamageFillColor, GuiAdvancedCrossHairHud ) );
   addField( "damageFrameColor", TypeColorF, Offset( mDamageFrameColor, GuiAdvancedCrossHairHud ) );
   addField( "damageRect", TypePoint2I, Offset( mDamageRectSize, GuiAdvancedCrossHairHud ) );
   addField( "damageOffset", TypePoint2I, Offset( mDamageOffset, GuiAdvancedCrossHairHud ) );
   endGroup("Damage");		
}
#33
07/02/2010 (6:05 pm)
guiAdvancedCrossHairHud.cpp continued...
//-----------------------------------------------------------------------------

void GuiAdvancedCrossHairHud::onRender(Point2I offset, const RectI &updateRect)
{
   // Must have a connection and player control object
   GameConnection* conn = GameConnection::getConnectionToServer();
   if (!conn)
      return;
   ShapeBase* control = dynamic_cast<ShapeBase*>(conn->getControlObject());
  if (!control || !(control->getType() & ObjectMask) || !conn->isFirstPerson())
      return;

   // Get control camera info
   MatrixF cam;
   Point3F camPos;
   conn->getControlCameraTransform(0,&cam);
   cam.getColumn(3, &camPos);

   // Extend the camera vector to create an endpoint for our ray
   Point3F endPos;
   cam.getColumn(1, &endPos);
   endPos *= gClientSceneGraph->getVisibleDistance();
   //endPos *= 4.0f;   //range check!
   endPos += camPos;

   // Collision info. We're going to be running LOS tests and we
   // don't want to collide with the control object.
   static U32 losMask = TerrainObjectType | InteriorObjectType | ShapeBaseObjectType | StaticShapeObjectType | StaticRenderedObjectType;
   control->disableCollision();

   RayInfo info;

	// GF - Object Selection
	mSelectedObj = NULL;

   if (gClientContainer.castRay(camPos, endPos, losMask, &info)) {
      // Hit something... but we'll only display health for named
      // ShapeBase objects.  Could mask against the object type here
      // and do a static cast if it's a ShapeBaseObjectType, but this
      // isn't a performance situation, so I'll just use dynamic_cast.

		mSelectedObj = info.object;

		/*
      if (ShapeBase* obj = dynamic_cast<ShapeBase*>(info.object))
		{
			// GF - Object Selection			
         if (obj->getShapeName()) {
            //offset.x = updateRect.point.x + updateRect.extent.x / 2;
            //offset.y = updateRect.point.y + updateRect.extent.y / 2;
            //drawDamage(offset + mDamageOffset, obj->getDamageValue(), 1);
         }
		}*/		
   }
	
	

	Con::executef(this, "selectMode");

//	Con::executef(mDataBlock,2,"doDismount",scriptThis());

   // Parent render.
	if(mMode == normal)
		renderCrossHair(mTextureObject, offset,updateRect);
	if(mMode == hostile)
		renderCrossHair(mTextureHandle_Hostile, offset,updateRect);
	if(mMode == interact)
		renderCrossHair(mTextureHandle_Interact, offset,updateRect);
	if(mMode == talk)
		renderCrossHair(mTextureHandle_Talk, offset,updateRect);

	
	

   // Restore control object collision
   control->enableCollision();

	// GF - Object Selection
/*	if(mSelectedObj)
	{
		//mSelectedObj->getId();
		//mSelectedObj->getNetIndex();

		if(mSelectedObj->isClientObject())
			Con::printf(" CLI : Selected something %d %d!", mSelectedObj->getId(), mSelectedObj->getNetIndex());
		else
			Con::printf(" SERV : Selected something %d %d!", mSelectedObj->getId(), mSelectedObj->getNetIndex());

		//mMode = interact;
  }
	else
	{
		//mMode = normal;
	}
*/
	// script callback to determine status of crosshair here.
	





}


//-----------------------------------------------------------------------------
/**
   Display a damage bar above the shape.
   This is a support funtion, called by onRender.
*/
void GuiAdvancedCrossHairHud::drawDamage(Point2I offset, F32 damage, F32 opacity)
{
   mDamageFillColor.alpha = mDamageFrameColor.alpha = opacity;

   // Damage should be 0->1 (0 being no damage,or healthy), but
   // we'll just make sure here as we flip it.
   damage = mClampF(1 - damage, 0, 1);

   // Center the bar
   RectI rect(offset, mDamageRectSize);
   rect.point.x -= mDamageRectSize.x / 2;

   // Draw the border
   GFX->getDrawUtil()->drawRect(rect, mDamageFrameColor);

   // Draw the damage % fill
   rect.point += Point2I(1, 1);
   rect.extent -= Point2I(1, 1);
   rect.extent.x = (S32)(rect.extent.x * damage);
   if (rect.extent.x == 1)
      rect.extent.x = 2;
   if (rect.extent.x > 0)
	   GFX->getDrawUtil()->drawRectFill(rect, mDamageFillColor);
}
#34
07/02/2010 (6:06 pm)
guiAdvancedCrossHairHud.cpp continued...
//--------------------------------------------------------------------------
// GF - object selection 

ConsoleMethod( GuiAdvancedCrossHairHud, getSelectedObject, S32, 2, 2, "()")
{
   SimObject* so = object->getSelectedObject();

   return so? so->getId(): -1;
}



//-------------------------------------
void GuiAdvancedCrossHairHud::onSleep()
{
   mTextureHandle_Hostile = NULL;
   mTextureHandle_Talk = NULL;
   mTextureHandle_Interact = NULL;
   Parent::onSleep();
}


//-------------------------------------
void GuiAdvancedCrossHairHud::setBitmap(const char *name, bool resize )
{
	
	Parent::setBitmap(name, resize);
   
   if(!isAwake())
      return;

   if (*mBitmapName)
   {
		
      char buffer[1024];
      char *p;
      dStrcpy(buffer, name);
      p = buffer + dStrlen(buffer);

      dStrcpy(p, "_hostile");
	  const String texName(buffer);
	  mTextureHandle_Hostile = GFXTexHandle(buffer, &GFXDefaultGUIProfile,texName);
      if (!mTextureHandle_Hostile)
         mTextureHandle_Hostile = mTextureObject;
      dStrcpy(p, "_talk");
       mTextureHandle_Talk = GFXTexHandle(buffer, &GFXDefaultGUIProfile,texName);
      if (!mTextureHandle_Talk)
         mTextureHandle_Talk = mTextureObject;
      dStrcpy(p, "_interact");
	  mTextureHandle_Interact = GFXTexHandle(buffer, &GFXDefaultGUIProfile,texName);
      if (!mTextureHandle_Interact)
         mTextureHandle_Interact = mTextureObject;
   }
   else
   {   
		
      mTextureHandle_Hostile = NULL;
      mTextureHandle_Talk = NULL;
      mTextureHandle_Interact = NULL;
   }
   setUpdate();
}

//-------------------------------------

void GuiAdvancedCrossHairHud::renderCrossHair(GFXTexHandle &textureHandle, Point2I offset, const RectI &updateRect)
{
	if (textureHandle)
   {
	   GFX->getDrawUtil()->clearBitmapModulation();
		if(mWrap)
		{
 			GFXTextureObject* texture = (GFXTextureObject *) textureHandle;
			RectI srcRegion;
			RectI dstRegion;
			float xdone = ((float)mBounds.extent.x/(float)texture->getWidth())+1;
			float ydone = ((float)mBounds.extent.y/(float)texture->getHeight())+1;

			int xshift = mStartPoint.x%texture->getWidth();
			int yshift = mStartPoint.y%texture->getHeight();
			for(int y = 0; y < ydone; ++y)
				for(int x = 0; x < xdone; ++x)
				{
		 			srcRegion.set(0,0,texture->getWidth(),texture->getHeight());
  					dstRegion.set( ((texture->getWidth()*x)+offset.x)-xshift,
								      ((texture->getHeight()*y)+offset.y)-yshift,
								      texture->getWidth(),	
								      texture->getHeight());
   					GFX->getDrawUtil()->drawBitmapStretchSR(texture,dstRegion, srcRegion, GFXBitmapFlip_None);
				}
		}
		else
      {
         RectI rect(offset, mBounds.extent);
	      GFX->getDrawUtil()->drawBitmapStretch(textureHandle, rect);
      }
   }

   if (mProfile->mBorder || !textureHandle)
   {
      RectI rect(offset.x, offset.y, mBounds.extent.x, mBounds.extent.y);
      GFX->getDrawUtil()->drawRect(rect, mProfile->mBorderColor);
   }

   renderChildControls(offset, updateRect);
}
#35
07/02/2010 (6:07 pm)
guiAdvancedCrossHairHud.cpp continued...
ConsoleMethod( GuiAdvancedCrossHairHud, setBitmap, void, 3, 3, "(filepath name)")
{
   object->setBitmap(argv[2]);
}


ConsoleMethod( GuiAdvancedCrossHairHud, setModeNormal, void, 2, 2, "")
{
	//Con::printf("NORMAL");
   object->setModeNormal();
}

ConsoleMethod( GuiAdvancedCrossHairHud, setModeHostile, void, 2, 2, "")
{
	//Con::printf("HOSTILE");
   object->setModeHostile();
}

ConsoleMethod( GuiAdvancedCrossHairHud, setModeInteract, void, 2, 2, "")
{
	//Con::printf("INTERACT");
   object->setModeInteract();
}

ConsoleMethod( GuiAdvancedCrossHairHud, setModeTalk, void, 2, 2, "")
{
	//Con::printf("TALK");
   object->setModeTalk();
}

guiAdvancedCrossHairHud.cpp finished.
#36
12/21/2010 (1:37 pm)
@ BrokeAss Games
Thank you for modify this for T3D 1.1 Beta 1! But for me it doesn't work, I have a Crosshair in the First Person Mode but haven't a crosshair in the Third Person Mode.
Why???
#37
12/21/2010 (7:51 pm)
Thank you very much, I have solved my problem!
#38
03/29/2013 (3:36 am)
I'm trying to add this to T3D 1.2 but I'm doing something wrong;

1. The codefile is not there anymore so I toke the code posted by BrokeAss Games for guiAdvancedCrossHairHud.cpp
2. #include "sceneGraph/sceneGraph.h" doesn't work becasue it is removed from T3D, I changed this to
#include "scene/sceneManager.h"

Is this correct?

3. I have added virtual:
virtual void setBitmap(const char *name,bool resize = false);
and
virtual void setBitmapHandle(GFXTexHandle handle, bool resize = false);

To guiBitmapCtrl.h

When I try to compile the project I end up with this:

1>------ Build started: Project: DeadlyMatter DLL, Configuration: Release Win32 ------
1>  guiAdvancedCrossHairHud.cpp
1>  guiCrossHairHud.cpp
1>  guiSpeedometer.cpp
1>  guiBitmapCtrl.cpp
1>guiAdvancedCrossHairHud.cpp(128): error C2039: 'getType' : is not a member of 'ShapeBase'
1>          C:/Torque/Torque 3D 1.2/Engine/source/T3D/shapeBase.h(645) : see declaration of 'ShapeBase'
1>guiAdvancedCrossHairHud.cpp(146): error C2065: 'StaticRenderedObjectType' : undeclared identifier
1>guiAdvancedCrossHairHud.cpp(320): error C2248: 'GuiControl::mBounds' : cannot access private member declared in class 'GuiControl'
1>          C:/Torque/Torque 3D 1.2/Engine/source/gui/core/guiControl.h(125) : see declaration of 'GuiControl::mBounds'
1>          C:/Torque/Torque 3D 1.2/Engine/source/gui/core/guiControl.h(86) : see declaration of 'GuiControl'
1>guiAdvancedCrossHairHud.cpp(321): error C2248: 'GuiControl::mBounds' : cannot access private member declared in class 'GuiControl'
1>          C:/Torque/Torque 3D 1.2/Engine/source/gui/core/guiControl.h(125) : see declaration of 'GuiControl::mBounds'
1>          C:/Torque/Torque 3D 1.2/Engine/source/gui/core/guiControl.h(86) : see declaration of 'GuiControl'
1>guiAdvancedCrossHairHud.cpp(338): error C2248: 'GuiControl::mBounds' : cannot access private member declared in class 'GuiControl'
1>          C:/Torque/Torque 3D 1.2/Engine/source/gui/core/guiControl.h(125) : see declaration of 'GuiControl::mBounds'
1>          C:/Torque/Torque 3D 1.2/Engine/source/gui/core/guiControl.h(86) : see declaration of 'GuiControl'
1>guiAdvancedCrossHairHud.cpp(345): error C2248: 'GuiControl::mBounds' : cannot access private member declared in class 'GuiControl'
1>          C:/Torque/Torque 3D 1.2/Engine/source/gui/core/guiControl.h(125) : see declaration of 'GuiControl::mBounds'
1>          C:/Torque/Torque 3D 1.2/Engine/source/gui/core/guiControl.h(86) : see declaration of 'GuiControl'
1>guiAdvancedCrossHairHud.cpp(345): error C2248: 'GuiControl::mBounds' : cannot access private member declared in class 'GuiControl'
1>          C:/Torque/Torque 3D 1.2/Engine/source/gui/core/guiControl.h(125) : see declaration of 'GuiControl::mBounds'
1>          C:/Torque/Torque 3D 1.2/Engine/source/gui/core/guiControl.h(86) : see declaration of 'GuiControl'
1>  guiFadeinBitmapCtrl.cpp
1>  guiIdleCamFadeBitmapCtrl.cpp
1>  guiMissionArea.cpp
1>  paraboloidLightShadowMap.cpp
1>  pssmLightShadowMap.cpp
1>  postEffectVis.cpp
========== Build: 0 succeeded, 1 failed, 16 up-to-date, 0 skipped ==========

So basically 3 types of errors. Anyone an idea how to solve this in the proper manner?
Page«First 1 2 Next»