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