diff options
Diffstat (limited to 'src/ui/target.cpp')
-rw-r--r-- | src/ui/target.cpp | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/src/ui/target.cpp b/src/ui/target.cpp index db478fe..f0ae70e 100644 --- a/src/ui/target.cpp +++ b/src/ui/target.cpp @@ -17,21 +17,7 @@ // target.cpp -//#include <windows.h> -//#include <stdio.h> -//#include <d3d.h> - -//#include "common/struct.h" -//#include "old/d3dengine.h" -//#include "old/math3d.h" -#include "graphics/engine/engine.h" -#include "common/event.h" -#include "common/misc.h" -#include "common/iman.h" -#include "object/robotmain.h" -#include "object/object.h" -#include "common/restext.h" -#include "ui/target.h" +#include <ui/target.h> @@ -137,7 +123,7 @@ bool CTarget::EventProcess(const Event &event) { if ( CControl::Detect(event.pos) ) { - if ( !m_main->RetFriendAim() ) + if ( !m_main->GetFriendAim() ) { Event newEvent = event; newEvent.type = EVENT_OBJECT_FIRE; @@ -162,7 +148,7 @@ void CTarget::Draw() // Returns the tooltip. -bool CTarget::GetTooltip(Math::Point pos, char* name) +bool CTarget::GetTooltip(Math::Point pos, std::string &name) { #if 0 if ( (m_state&STATE_VISIBLE) && Detect(pos) ) // in the window? @@ -181,9 +167,9 @@ bool CTarget::GetTooltip(Math::Point pos, char* name) { //? pObj = DetectFriendObject(pos); //? if ( pObj == 0 ) - if ( !m_main->RetFriendAim() ) + if ( !m_main->GetFriendAim() ) { - strcpy(name, m_tooltip); + m_tooltip = name; return true; // does not detect objects below! } } |