mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-17 21:11:39 +00:00
CHANGED: #1471 CViewBitmap no longer depends on CGroupContainer.
This commit is contained in:
parent
1854b8e33a
commit
0370f77424
6 changed files with 12 additions and 24 deletions
|
@ -81,10 +81,15 @@ namespace NLGUI
|
||||||
|
|
||||||
// Get the header color draw. NB: depends if grayed, and if active.
|
// Get the header color draw. NB: depends if grayed, and if active.
|
||||||
virtual NLMISC::CRGBA getDrawnHeaderColor () const{ return NLMISC::CRGBA(); };
|
virtual NLMISC::CRGBA getDrawnHeaderColor () const{ return NLMISC::CRGBA(); };
|
||||||
|
|
||||||
|
uint8 getCurrentContainerAlpha() const{ return _CurrentContainerAlpha; }
|
||||||
|
uint8 getCurrentContentAlpha() const{ return _CurrentContentAlpha; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void triggerAlphaSettingsChangedAH();
|
void triggerAlphaSettingsChangedAH();
|
||||||
|
|
||||||
|
uint8 _CurrentContainerAlpha;
|
||||||
|
uint8 _CurrentContentAlpha;
|
||||||
uint8 _ContainerAlpha;
|
uint8 _ContainerAlpha;
|
||||||
uint8 _ContentAlpha;
|
uint8 _ContentAlpha;
|
||||||
uint8 _RolloverAlphaContainer; // Alpha for the window when mouse not over it
|
uint8 _RolloverAlphaContainer; // Alpha for the window when mouse not over it
|
||||||
|
|
|
@ -23,6 +23,8 @@ namespace NLGUI
|
||||||
CGroupContainerBase::CGroupContainerBase( const CViewBase::TCtorParam ¶m ) :
|
CGroupContainerBase::CGroupContainerBase( const CViewBase::TCtorParam ¶m ) :
|
||||||
CInterfaceGroup( param )
|
CInterfaceGroup( param )
|
||||||
{
|
{
|
||||||
|
_CurrentContainerAlpha = 255;
|
||||||
|
_CurrentContentAlpha = 255;
|
||||||
_ContentAlpha = 255;
|
_ContentAlpha = 255;
|
||||||
_ContainerAlpha = 255;
|
_ContainerAlpha = 255;
|
||||||
_RolloverAlphaContainer = 0;
|
_RolloverAlphaContainer = 0;
|
||||||
|
|
|
@ -1201,8 +1201,6 @@ CGroupContainer::CGroupContainer(const TCtorParam ¶m)
|
||||||
// faster than a virual call
|
// faster than a virual call
|
||||||
_IsGroupContainer = true;
|
_IsGroupContainer = true;
|
||||||
|
|
||||||
_CurrentContainerAlpha = 255;
|
|
||||||
_CurrentContentAlpha = 255;
|
|
||||||
_CurrentRolloverAlphaContainer = 0.f;
|
_CurrentRolloverAlphaContainer = 0.f;
|
||||||
_CurrentRolloverAlphaContent = 0.f;
|
_CurrentRolloverAlphaContent = 0.f;
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,6 @@ namespace NLGUI
|
||||||
class CViewText;
|
class CViewText;
|
||||||
}
|
}
|
||||||
|
|
||||||
class CInterfaceList;
|
|
||||||
class COptionsContainerInsertion;
|
class COptionsContainerInsertion;
|
||||||
class COptionsContainerMove;
|
class COptionsContainerMove;
|
||||||
class CGroupContainer;
|
class CGroupContainer;
|
||||||
|
@ -366,9 +365,6 @@ public:
|
||||||
|
|
||||||
sint32 getRefW() const { return _RefW; }
|
sint32 getRefW() const { return _RefW; }
|
||||||
|
|
||||||
uint8 getCurrentContainerAlpha() const { return _CurrentContainerAlpha; }
|
|
||||||
uint8 getCurrentContentAlpha() const { return _CurrentContentAlpha; }
|
|
||||||
|
|
||||||
/** Increase the rollover alpha for the current frame.
|
/** Increase the rollover alpha for the current frame.
|
||||||
* Example of use : an edit box that has focus in a group container
|
* Example of use : an edit box that has focus in a group container
|
||||||
*/
|
*/
|
||||||
|
@ -463,8 +459,6 @@ public:
|
||||||
sint32 getTitleDeltaMaxW() const { return _TitleDeltaMaxW; }
|
sint32 getTitleDeltaMaxW() const { return _TitleDeltaMaxW; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
uint8 _CurrentContainerAlpha;
|
|
||||||
uint8 _CurrentContentAlpha;
|
|
||||||
uint8 _ICurrentRolloverAlphaContainer;
|
uint8 _ICurrentRolloverAlphaContainer;
|
||||||
uint8 _HighLightedAlpha;
|
uint8 _HighLightedAlpha;
|
||||||
float _CurrentRolloverAlphaContainer;
|
float _CurrentRolloverAlphaContainer;
|
||||||
|
|
|
@ -16,16 +16,11 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#include "stdpch.h"
|
|
||||||
|
|
||||||
#include "view_bitmap.h"
|
#include "view_bitmap.h"
|
||||||
#include "interface_manager.h"
|
|
||||||
#include "nel/misc/xml_auto_ptr.h"
|
#include "nel/misc/xml_auto_ptr.h"
|
||||||
#include "group_container.h"
|
#include "nel/gui/widget_manager.h"
|
||||||
|
#include "nel/gui/interface_group.h"
|
||||||
// ----------------------------------------------------------------------------
|
#include "nel/gui/group_container_base.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace NLMISC;
|
using namespace NLMISC;
|
||||||
|
@ -144,7 +139,6 @@ bool CViewBitmap::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup)
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
void CViewBitmap::draw ()
|
void CViewBitmap::draw ()
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
|
||||||
CViewRenderer &rVR = *CViewRenderer::getInstance();
|
CViewRenderer &rVR = *CViewRenderer::getInstance();
|
||||||
|
|
||||||
CRGBA col;
|
CRGBA col;
|
||||||
|
@ -166,7 +160,7 @@ void CViewBitmap::draw ()
|
||||||
{
|
{
|
||||||
if (gr->isGroupContainer())
|
if (gr->isGroupContainer())
|
||||||
{
|
{
|
||||||
CGroupContainer *gc = static_cast<CGroupContainer *>(gr);
|
CGroupContainerBase *gc = static_cast<CGroupContainerBase*>(gr);
|
||||||
col.A = (uint8)(((sint32)col.A*((sint32)gc->getCurrentContainerAlpha()+1))>>8);
|
col.A = (uint8)(((sint32)col.A*((sint32)gc->getCurrentContainerAlpha()+1))>>8);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -208,7 +202,6 @@ void CViewBitmap::updateCoords()
|
||||||
{
|
{
|
||||||
if (!_Scale)
|
if (!_Scale)
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
|
||||||
CViewRenderer &rVR = *CViewRenderer::getInstance();
|
CViewRenderer &rVR = *CViewRenderer::getInstance();
|
||||||
sint32 txw, txh;
|
sint32 txw, txh;
|
||||||
rVR.getTextureSizeFromId (_TextureId, txw, txh);
|
rVR.getTextureSizeFromId (_TextureId, txw, txh);
|
||||||
|
@ -230,7 +223,6 @@ void CViewBitmap::setTexture(const std::string & TxName)
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
std::string CViewBitmap::getTexture () const
|
std::string CViewBitmap::getTexture () const
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
|
||||||
CViewRenderer &rVR = *CViewRenderer::getInstance();
|
CViewRenderer &rVR = *CViewRenderer::getInstance();
|
||||||
return rVR.getTextureNameFromId (_TextureId);
|
return rVR.getTextureNameFromId (_TextureId);
|
||||||
}
|
}
|
||||||
|
@ -238,7 +230,6 @@ std::string CViewBitmap::getTexture () const
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
void CViewBitmap::fitTexture()
|
void CViewBitmap::fitTexture()
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
|
||||||
CViewRenderer &rVR = *CViewRenderer::getInstance();
|
CViewRenderer &rVR = *CViewRenderer::getInstance();
|
||||||
sint32 w, h;
|
sint32 w, h;
|
||||||
rVR.getTextureSizeFromId(_TextureId, w, h);
|
rVR.getTextureSizeFromId(_TextureId, w, h);
|
||||||
|
@ -286,7 +277,6 @@ NLMISC::CRGBA CViewBitmap::getColorRGBA() const
|
||||||
sint32 CViewBitmap::getMaxUsedW() const
|
sint32 CViewBitmap::getMaxUsedW() const
|
||||||
{
|
{
|
||||||
sint32 txw, txh;
|
sint32 txw, txh;
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
|
||||||
CViewRenderer &rVR = *CViewRenderer::getInstance();
|
CViewRenderer &rVR = *CViewRenderer::getInstance();
|
||||||
rVR.getTextureSizeFromId (_TextureId, txw, txh);
|
rVR.getTextureSizeFromId (_TextureId, txw, txh);
|
||||||
return txw;
|
return txw;
|
||||||
|
|
|
@ -133,7 +133,6 @@ protected:
|
||||||
sint32 _TxtWidth; // Width of the single texture
|
sint32 _TxtWidth; // Width of the single texture
|
||||||
sint32 _TxtHeight; // Height of the single texture
|
sint32 _TxtHeight; // Height of the single texture
|
||||||
|
|
||||||
friend class CInterfaceList;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue