mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-05 14:59:01 +00:00
CHANGED: #1471 CWidgetManager no longer depends on CGroupInScene.
This commit is contained in:
parent
d9e1fcad72
commit
9f09f4d080
6 changed files with 16 additions and 13 deletions
|
@ -59,7 +59,7 @@ CGroupInScene::CGroupInScene(const TCtorParam ¶m)
|
|||
Position= CVector::Null;
|
||||
|
||||
_ProjCenter= CVector::Null;
|
||||
_DepthForZSort= 0.f;
|
||||
_IsGroupInScene = true;
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
|
|
@ -66,9 +66,6 @@ public:
|
|||
sint32 getOffsetY() const { return _OffsetY; }
|
||||
void setOffsetY(sint32 dmh) { _OffsetY = dmh; }
|
||||
|
||||
// Return the current Depth, with no ZBias applied.
|
||||
float getDepthForZSort() const { return _DepthForZSort; }
|
||||
|
||||
// set/return the ZBias for this group in scene (default 0)
|
||||
void setZBias(float zbias) {_ZBias= zbias;}
|
||||
float getZBias() const {return _ZBias;}
|
||||
|
@ -80,9 +77,6 @@ protected:
|
|||
// Projected Position memorized. x/y is in window coordinate, while z in is world/camera coordinate
|
||||
NLMISC::CVector _ProjCenter;
|
||||
|
||||
// Projected Depth with no ZBias applied
|
||||
float _DepthForZSort;
|
||||
|
||||
// Offset
|
||||
sint32 _OffsetX, _OffsetY;
|
||||
|
||||
|
|
|
@ -16,8 +16,6 @@
|
|||
|
||||
|
||||
|
||||
#include "stdpch.h"
|
||||
|
||||
#include "group_modal.h"
|
||||
#include "interface_manager.h"
|
||||
#include "interface_element.h"
|
||||
|
|
|
@ -55,6 +55,7 @@ CInterfaceGroup::CInterfaceGroup(const TCtorParam ¶m) : CCtrlBase(param)
|
|||
_UseCursor = true;
|
||||
_IsGroupContainer = false;
|
||||
_IsGroupScrollText = false;
|
||||
_IsGroupInScene = false;
|
||||
_AHOnActive = NULL;
|
||||
_AHOnDeactive = NULL;
|
||||
_AHOnLeftClick = NULL;
|
||||
|
@ -63,6 +64,7 @@ CInterfaceGroup::CInterfaceGroup(const TCtorParam ¶m) : CCtrlBase(param)
|
|||
_AHOnEscape = NULL;
|
||||
_NeedFrameUpdatePos= false;
|
||||
_LUAEnvTableCreated= false;
|
||||
_DepthForZSort= 0.f;
|
||||
|
||||
#ifdef AJM_DEBUG_TRACK_INTERFACE_GROUPS
|
||||
CInterfaceManager::getInstance()->DebugTrackGroupsCreated( this );
|
||||
|
|
|
@ -249,6 +249,7 @@ public:
|
|||
// quick way to know if the group is a CGroupContainer
|
||||
bool isGroupContainer() const { return _IsGroupContainer; }
|
||||
bool isGroupScrollText() const{ return _IsGroupScrollText; }
|
||||
bool isGroupInScene() const{ return _IsGroupInScene; }
|
||||
|
||||
CInterfaceGroup* getEnclosingContainer();
|
||||
|
||||
|
@ -305,6 +306,9 @@ public:
|
|||
virtual CInterfaceElement *clone();
|
||||
virtual void serial(NLMISC::IStream &f);
|
||||
|
||||
// Return the current Depth, with no ZBias applied.
|
||||
float getDepthForZSort() const { return _DepthForZSort; }
|
||||
|
||||
protected:
|
||||
|
||||
void makeNewClip (sint32 &oldClipX, sint32 &oldClipY, sint32 &oldClipW, sint32 &oldClipH);
|
||||
|
@ -347,11 +351,15 @@ protected:
|
|||
bool _UseCursor : 1;
|
||||
bool _IsGroupContainer : 1; // faster than a virual call
|
||||
bool _IsGroupScrollText : 1;
|
||||
bool _IsGroupInScene : 1;
|
||||
bool _NeedFrameUpdatePos : 1; // typically For CGroupInScene
|
||||
sint32 _ResizeFromChildWMargin;
|
||||
sint32 _ResizeFromChildHMargin;
|
||||
sint32 _GroupSizeRef;
|
||||
|
||||
// Projected Depth with no ZBias applied
|
||||
float _DepthForZSort;
|
||||
|
||||
// handler for activation
|
||||
IActionHandler *_AHOnActive;
|
||||
CStringShared _AHOnActiveParams;
|
||||
|
|
|
@ -17,9 +17,10 @@
|
|||
#include "widget_manager.h"
|
||||
#include "interface_group.h"
|
||||
#include "group_container.h"
|
||||
#include "group_in_scene.h"
|
||||
#include "view_pointer_base.h"
|
||||
#include "group_modal.h"
|
||||
|
||||
#include "nel/gui/view_renderer.h"
|
||||
#include "view_pointer_base.h"
|
||||
#include "group_editbox_base.h"
|
||||
#include "ctrl_draggable.h"
|
||||
|
||||
|
@ -38,7 +39,7 @@ void CWidgetManager::SMasterGroup::addWindow(CInterfaceGroup *pIG, uint8 nPrio)
|
|||
|
||||
// Priority WIN_PRIORITY_WORLD_SPACE is only for CGroupInScene !
|
||||
// Add this group in another priority list
|
||||
nlassert ((nPrio!=WIN_PRIORITY_MAX) || (dynamic_cast<CGroupInScene*>(pIG)!=NULL));
|
||||
nlassert ((nPrio!=WIN_PRIORITY_MAX) || pIG->isGroupInScene() );
|
||||
|
||||
for (uint8 i = 0; i < WIN_PRIORITY_MAX; ++i)
|
||||
{
|
||||
|
@ -239,7 +240,7 @@ void CWidgetManager::SMasterGroup::sortWorldSpaceGroup ()
|
|||
sortTable.push_back (CElementToSort ());
|
||||
CElementToSort &elm = sortTable.back();
|
||||
elm.pIG = *it;
|
||||
elm.Distance = (static_cast<CGroupInScene*>(*it))->getDepthForZSort();
|
||||
elm.Distance = (*it)->getDepthForZSort();
|
||||
|
||||
it++;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue