CHANGED: #1471 CInterfaceGroup no longer depends on CGroupScrollText.

This commit is contained in:
dfighter1985 2012-06-07 03:30:27 +02:00
parent ecbdef6ab5
commit 617168c3b5
3 changed files with 6 additions and 5 deletions

View file

@ -43,8 +43,9 @@ CGroupScrollText::CGroupScrollText(const TCtorParam &param) :
_InvertScrollBar(true),
_ListHeight(0),
_StartHeight(0),
_EllapsedTime(0)
_EllapsedTime(0)
{
_IsGroupScrollText = true;
}
//========================================================================

View file

@ -23,10 +23,7 @@
#include "interface_group.h"
#include "interface_link.h"
#include "widget_manager.h"
#include "ctrl_scroll_base.h"
#include "group_editbox.h"
#include "group_scrolltext.h"
#include "lua_ihm_ryzom.h"
using namespace std;
@ -57,6 +54,7 @@ CInterfaceGroup::CInterfaceGroup(const TCtorParam &param) : CCtrlBase(param)
_Priority= WIN_PRIORITY_NORMAL;
_UseCursor = true;
_IsGroupContainer = false;
_IsGroupScrollText = false;
_AHOnActive = NULL;
_AHOnDeactive = NULL;
_AHOnLeftClick = NULL;
@ -973,7 +971,7 @@ void CInterfaceGroup::evalChildrenBBox(bool resizeFromChildW, bool resizeFromChi
// If it is a group, minimize with MaxHReal / MaxWReal
const CInterfaceGroup *sonGroup= dynamic_cast<const CInterfaceGroup*>(pIE);
// \todo yoyo: do not know why but don't work if this==scroll_text
if(sonGroup && !dynamic_cast<const CGroupScrollText*>(this))
if(sonGroup && !isGroupScrollText())
{
sint32 oldSciX= -16384;
sint32 oldSciY= -16384;

View file

@ -248,6 +248,7 @@ public:
// quick way to know if the group is a CGroupContainer
bool isGroupContainer() const { return _IsGroupContainer; }
bool isGroupScrollText() const{ return _IsGroupScrollText; }
CInterfaceGroup* getEnclosingContainer();
@ -345,6 +346,7 @@ protected:
bool _Escapable : 1;
bool _UseCursor : 1;
bool _IsGroupContainer : 1; // faster than a virual call
bool _IsGroupScrollText : 1;
bool _NeedFrameUpdatePos : 1; // typically For CGroupInScene
sint32 _ResizeFromChildWMargin;
sint32 _ResizeFromChildHMargin;