CHANGED: #1471 decoupled CViewText from CGroupContainer and CCtrlResizer.
--HG-- branch : gui-refactoring
This commit is contained in:
parent
1222e35012
commit
f4823200fc
4 changed files with 10 additions and 5 deletions
|
@ -50,6 +50,7 @@ namespace NLGUI
|
|||
// see interface.txt for meaning of auto
|
||||
_ToolTipParentPosRef= Hotspot_TTAuto;
|
||||
_ToolTipPosRef= Hotspot_TTAuto;
|
||||
resizer = false;
|
||||
}
|
||||
|
||||
/// Destructor
|
||||
|
@ -125,6 +126,8 @@ namespace NLGUI
|
|||
// true if this ctrl is capturable (true by default, false for tooltip)
|
||||
virtual bool isCapturable() const {return true;}
|
||||
|
||||
bool isResizer() const{ return resizer; }
|
||||
|
||||
// from CInterfaceElement
|
||||
virtual void visit(CInterfaceElementVisitor *visitor);
|
||||
|
||||
|
@ -158,6 +161,7 @@ namespace NLGUI
|
|||
THotSpot _ToolTipPosRefAlt : 6;
|
||||
protected:
|
||||
void convertTooltipHotSpot(const char *prop, THotSpot &parentHS, THotSpot &childHS);
|
||||
bool resizer;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -76,6 +76,8 @@ namespace NLGUI
|
|||
REFLECT_STRING("on_alpha_settings_changed_aparams", getAHOnAlphaSettingsChangedParams, setAHOnAlphaSettingsChangedParams);
|
||||
REFLECT_EXPORT_END
|
||||
|
||||
virtual bool isMoving() const{ return false; }
|
||||
|
||||
protected:
|
||||
void triggerAlphaSettingsChangedAH();
|
||||
|
||||
|
|
|
@ -107,6 +107,7 @@ CCtrlResizer::CCtrlResizer(const TCtorParam ¶m)
|
|||
_MouseDown = false;
|
||||
_XBias = 0;
|
||||
_YBias = 0;
|
||||
resizer = true;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -21,9 +21,8 @@
|
|||
#include "interface_manager.h"
|
||||
#include "nel/gui/view_renderer.h"
|
||||
#include "nel/gui/widget_manager.h"
|
||||
#include "group_container.h" // CCtrlResizer
|
||||
#include "nel/gui/group_container_base.h"
|
||||
#include "nel/gui/ctrl_tooltip.h"
|
||||
|
||||
#include "nel/misc/xml_auto_ptr.h"
|
||||
#include "nel/gui/lua_ihm.h"
|
||||
|
||||
|
@ -381,8 +380,7 @@ void CViewText::checkCoords ()
|
|||
CCtrlBase *pCB = CWidgetManager::getInstance()->getCapturePointerLeft();
|
||||
if (pCB != NULL)
|
||||
{
|
||||
CCtrlResizer *pCR = dynamic_cast<CCtrlResizer*>(pCB);
|
||||
if (pCR != NULL)
|
||||
if( pCB->isResizer() )
|
||||
{
|
||||
// We are resizing !!!!
|
||||
}
|
||||
|
@ -644,7 +642,7 @@ void CViewText::draw ()
|
|||
if(bFound)
|
||||
{
|
||||
// last check: the window must not be currently moved
|
||||
CGroupContainer *gc= dynamic_cast<CGroupContainer*>(pIG);
|
||||
CGroupContainerBase *gc= dynamic_cast<CGroupContainerBase*>(pIG);
|
||||
if(!gc || !gc->isMoving())
|
||||
{
|
||||
CRGBA col= pIM->getSystemOption(CInterfaceManager::OptionViewTextOverBackColor).getValColor();
|
||||
|
|
Loading…
Reference in a new issue