Moved SetHighlight to CControllableObject
parent
00e9684e6d
commit
f37d2a338e
|
@ -44,6 +44,8 @@ public:
|
|||
virtual bool GetSelect() = 0;
|
||||
virtual bool GetSelectable() = 0;
|
||||
|
||||
virtual void SetHighlight(bool highlight) = 0;
|
||||
|
||||
virtual void SetCameraType(Gfx::CameraType type) = 0;
|
||||
virtual Gfx::CameraType GetCameraType() = 0;
|
||||
virtual void SetCameraDist(float dist) = 0;
|
||||
|
|
|
@ -2505,9 +2505,9 @@ bool COldObject::GetCameraLock()
|
|||
|
||||
// Management of the demonstration of the object.
|
||||
|
||||
void COldObject::SetHighlight(bool mode)
|
||||
void COldObject::SetHighlight(bool highlight)
|
||||
{
|
||||
if (mode)
|
||||
if (highlight)
|
||||
{
|
||||
int list[OBJECTMAXPART+1];
|
||||
|
||||
|
|
|
@ -230,7 +230,7 @@ public:
|
|||
void SetCameraLock(bool lock) override;
|
||||
bool GetCameraLock() override;
|
||||
|
||||
void SetHighlight(bool mode) override;
|
||||
void SetHighlight(bool highlight) override;
|
||||
|
||||
void SetSelect(bool select, bool bDisplayError = true) override;
|
||||
bool GetSelect() override;
|
||||
|
|
|
@ -147,14 +147,6 @@ bool COldObjectInterface::GetVirusMode()
|
|||
}
|
||||
|
||||
|
||||
void COldObjectInterface::SetHighlight(bool mode)
|
||||
{
|
||||
// TODO: temporary hack
|
||||
return;
|
||||
//throw std::logic_error("SetHighlight: not implemented!");
|
||||
}
|
||||
|
||||
|
||||
void COldObjectInterface::SetEnable(bool bEnable)
|
||||
{
|
||||
throw std::logic_error("SetEnable: not implemented!");
|
||||
|
|
|
@ -111,9 +111,6 @@ public:
|
|||
virtual void SetVirusMode(bool bEnable);
|
||||
virtual bool GetVirusMode();
|
||||
|
||||
// This sets highlight on mouse over object, goes to CControllableObject
|
||||
virtual void SetHighlight(bool mode);
|
||||
|
||||
// Main CObject class?
|
||||
virtual void SetEnable(bool bEnable);
|
||||
virtual bool GetEnable();
|
||||
|
|
|
@ -2154,10 +2154,11 @@ void CRobotMain::HiliteClear()
|
|||
|
||||
for (CObject* obj : m_objMan->GetAllObjects())
|
||||
{
|
||||
obj->SetHighlight(false);
|
||||
m_map->SetHighlight(0);
|
||||
m_short->SetHighlight(0);
|
||||
if (!obj->Implements(ObjectInterfaceType::Controllable)) continue;
|
||||
dynamic_cast<CControllableObject*>(obj)->SetHighlight(false);
|
||||
}
|
||||
m_map->SetHighlight(0);
|
||||
m_short->SetHighlight(0);
|
||||
|
||||
m_hilite = false;
|
||||
}
|
||||
|
@ -2213,7 +2214,8 @@ void CRobotMain::HiliteObject(Math::Point pos)
|
|||
|
||||
if (IsSelectable(obj))
|
||||
{
|
||||
obj->SetHighlight(true);
|
||||
assert(obj->Implements(ObjectInterfaceType::Controllable));
|
||||
dynamic_cast<CControllableObject*>(obj)->SetHighlight(true);
|
||||
m_map->SetHighlight(obj);
|
||||
m_short->SetHighlight(obj);
|
||||
m_hilite = true;
|
||||
|
|
Loading…
Reference in New Issue