Resolved some build errors occuring after previous commit.

This commit is contained in:
dfighter1985 2013-02-21 01:25:50 +01:00
parent fe456d91b6
commit 2bdceaecda
5 changed files with 21 additions and 10 deletions

View file

@ -733,7 +733,8 @@ bool CGroupMap::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup)
//if (pCB != NULL) pCB->setActive(false); //if (pCB != NULL) pCB->setActive(false);
} }
nlassert(!_FrustumView); nlassert(!_FrustumView);
_FrustumView = new CCtrlQuad; CViewBase::TCtorParam param;
_FrustumView = new CCtrlQuad( param );
_FrustumView->setActive(false); _FrustumView->setActive(false);
addView(_FrustumView); addView(_FrustumView);
_FrustumView->setParent(this); _FrustumView->setParent(this);

View file

@ -548,9 +548,10 @@ void CDisplayerVisualActivitySequence::setWorldMapNumEdges(uint count)
else else
{ {
uint left = count - (uint)_WorldMapEdges.size(); uint left = count - (uint)_WorldMapEdges.size();
CViewBase::TCtorParam param;
while (left --) while (left --)
{ {
CCtrlQuad *cq = new CCtrlQuad; CCtrlQuad *cq = new CCtrlQuad( param );
cq->setModulateGlobalColor(false); cq->setModulateGlobalColor(false);
cq->setActive(true); cq->setActive(true);
gm->addCtrl(cq); gm->addCtrl(cq);

View file

@ -54,7 +54,7 @@ namespace R2
class CCtrlPolygonSelectable : public CCtrlPolygon, public IDisplayerUIHandle class CCtrlPolygonSelectable : public CCtrlPolygon, public IDisplayerUIHandle
{ {
public: public:
CCtrlPolygonSelectable(CInstance &instance) : Instance(instance) {} CCtrlPolygonSelectable( CViewBase::TCtorParam &param, CInstance &instance) : Instance(instance), CCtrlPolygon( param ) {}
// from IDisplayerUIHandle // from IDisplayerUIHandle
virtual CInstance &getDisplayedInstance() { return Instance; } virtual CInstance &getDisplayedInstance() { return Instance; }
// from IDisplayerUIHandle // from IDisplayerUIHandle
@ -99,7 +99,7 @@ protected:
class CCtrlQuadSelectable : public CCtrlQuad, public IDisplayerUIHandle class CCtrlQuadSelectable : public CCtrlQuad, public IDisplayerUIHandle
{ {
public: public:
CCtrlQuadSelectable(CInstance &instance, uint edgeIndex) : Instance(instance), EdgeIndex(edgeIndex) {} CCtrlQuadSelectable( CViewBase::TCtorParam &param, CInstance &instance, uint edgeIndex) : Instance(instance), EdgeIndex(edgeIndex), CCtrlQuad( param ){}
// from IDisplayerUIHandle // from IDisplayerUIHandle
virtual CInstance &getDisplayedInstance() { return Instance; } virtual CInstance &getDisplayedInstance() { return Instance; }
// from IDisplayerUIHandle // from IDisplayerUIHandle
@ -179,7 +179,8 @@ CCtrlPolygon *CDisplayerVisualGroup::CSelectablePrimRender::newCtrlPolygon() con
{ {
//H_AUTO(R2_CDisplayerVisualGroup_CSelectablePrimRender) //H_AUTO(R2_CDisplayerVisualGroup_CSelectablePrimRender)
nlassert(DisplayedInstance); nlassert(DisplayedInstance);
CCtrlPolygonSelectable *result = new CCtrlPolygonSelectable(*DisplayedInstance); CViewBase::TCtorParam param;
CCtrlPolygonSelectable *result = new CCtrlPolygonSelectable( param, *DisplayedInstance);
result->setId(DisplayedInstance->getId()); result->setId(DisplayedInstance->getId());
result->setToolTipParent(CCtrlBase::TTMouse); result->setToolTipParent(CCtrlBase::TTMouse);
result->setToolTipParentPosRef(Hotspot_BR); result->setToolTipParentPosRef(Hotspot_BR);
@ -192,7 +193,8 @@ CCtrlQuad *CDisplayerVisualGroup::CSelectablePrimRender::newCtrlQuad(uint edgeIn
{ {
//H_AUTO(R2_CDisplayerVisualGroup_CSelectablePrimRender) //H_AUTO(R2_CDisplayerVisualGroup_CSelectablePrimRender)
nlassert(DisplayedInstance); nlassert(DisplayedInstance);
CCtrlQuadSelectable *result = new CCtrlQuadSelectable(*DisplayedInstance, edgeIndex); CViewBase::TCtorParam param;
CCtrlQuadSelectable *result = new CCtrlQuadSelectable( param, *DisplayedInstance, edgeIndex);
result->setToolTipParent(CCtrlBase::TTMouse); result->setToolTipParent(CCtrlBase::TTMouse);
result->setToolTipParentPosRef(Hotspot_BR); result->setToolTipParentPosRef(Hotspot_BR);
result->setToolTipPosRef(Hotspot_TL); result->setToolTipPosRef(Hotspot_TL);

View file

@ -110,7 +110,8 @@ CCtrlQuad *CInstanceMapDeco::newQuad(CGroupMap &owner)
{ {
//H_AUTO(R2_CInstanceMapDeco_newQuad) //H_AUTO(R2_CInstanceMapDeco_newQuad)
nlassert(_Instance); nlassert(_Instance);
CCtrlQuad *q = new CCtrlQuad; CViewBase::TCtorParam param;
CCtrlQuad *q = new CCtrlQuad( param );
q->setActive(false); q->setActive(false);
q->setModulateGlobalColor(false); q->setModulateGlobalColor(false);
owner.addCtrl(q); owner.addCtrl(q);
@ -156,9 +157,11 @@ void CInstanceMapDeco::onAdd(CGroupMap &owner)
CInterfaceGroup *window = owner.getParentContainer(); CInterfaceGroup *window = owner.getParentContainer();
if (window) if (window)
{ {
CViewBase::TCtorParam param;
for(uint k = 0; k < 2; ++k) for(uint k = 0; k < 2; ++k)
{ {
_GlowStar[k] = new CCtrlQuad; _GlowStar[k] = new CCtrlQuad( param );
_GlowStar[k]->setActive(false); _GlowStar[k]->setActive(false);
_GlowStar[k]->setModulateGlobalColor(false); _GlowStar[k]->setModulateGlobalColor(false);
window->addCtrl(_GlowStar[k]); window->addCtrl(_GlowStar[k]);

View file

@ -188,6 +188,8 @@ CCtrlPolygon *CPrimRender::newCtrlPolygon() const
//H_AUTO(R2_CPrimRender_newCtrlPolygon) //H_AUTO(R2_CPrimRender_newCtrlPolygon)
class CCtrlMapPolygon : public CCtrlPolygon class CCtrlMapPolygon : public CCtrlPolygon
{ {
public:
CCtrlMapPolygon( CViewBase::TCtorParam &param ) : CCtrlPolygon( param ){}
protected: protected:
// from CCtrlPolygon // from CCtrlPolygon
void computeScaledVertex(NLMISC::CVector2f &dest, const NLMISC::CVector2f &src) void computeScaledVertex(NLMISC::CVector2f &dest, const NLMISC::CVector2f &src)
@ -197,14 +199,16 @@ CCtrlPolygon *CPrimRender::newCtrlPolygon() const
gm->worldToWindow(dest, src); gm->worldToWindow(dest, src);
} }
}; };
return new CCtrlMapPolygon; CViewBase::TCtorParam param;
return new CCtrlMapPolygon( param );
} }
// ********************************************************* // *********************************************************
CCtrlQuad *CPrimRender::newCtrlQuad(uint /* edgeIndex */) const CCtrlQuad *CPrimRender::newCtrlQuad(uint /* edgeIndex */) const
{ {
//H_AUTO(R2_CPrimRender_newCtrlQuad) //H_AUTO(R2_CPrimRender_newCtrlQuad)
return new CCtrlQuad; CViewBase::TCtorParam param;
return new CCtrlQuad( param );
} }
// ********************************************************* // *********************************************************