CHANGED: #1471 CCtrlTextButton no longer depends on CGroupContainer.

This commit is contained in:
dfighter1985 2012-06-21 21:28:13 +02:00
parent 4de283c561
commit 89d58d54e1
3 changed files with 8 additions and 16 deletions

View file

@ -19,6 +19,7 @@
#define GROUP_CONTAINER_BASE_H #define GROUP_CONTAINER_BASE_H
#include "nel/gui/interface_group.h" #include "nel/gui/interface_group.h"
#include "nel/misc/rgba.h"
namespace NLGUI namespace NLGUI
{ {
@ -76,7 +77,10 @@ namespace NLGUI
REFLECT_STRING("on_alpha_settings_changed_aparams", getAHOnAlphaSettingsChangedParams, setAHOnAlphaSettingsChangedParams); REFLECT_STRING("on_alpha_settings_changed_aparams", getAHOnAlphaSettingsChangedParams, setAHOnAlphaSettingsChangedParams);
REFLECT_EXPORT_END REFLECT_EXPORT_END
virtual bool isMoving() const{ return false; } virtual bool isMoving() const{ return false; }
// Get the header color draw. NB: depends if grayed, and if active.
virtual NLMISC::CRGBA getDrawnHeaderColor () const{ return NLMISC::CRGBA(); };
protected: protected:
void triggerAlphaSettingsChangedAH(); void triggerAlphaSettingsChangedAH();

View file

@ -14,23 +14,14 @@
// You should have received a copy of the GNU Affero General Public License // You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdpch.h"
#include "ctrl_text_button.h" #include "ctrl_text_button.h"
#include "interface_manager.h"
#include "nel/misc/xml_auto_ptr.h" #include "nel/misc/xml_auto_ptr.h"
#include "nel/gui/view_text.h" #include "nel/gui/view_text.h"
#include "nel/gui/view_text_id.h" #include "nel/gui/view_text_id.h"
#include "group_container.h" #include "nel/gui/group_container_base.h"
#include "nel/gui/lua_ihm.h" #include "nel/gui/lua_ihm.h"
#include "lua_ihm_ryzom.h" #include "nel/gui/widget_manager.h"
// ***************************************************************************
using namespace std; using namespace std;
using namespace NLMISC; using namespace NLMISC;
using namespace NL3D; using namespace NL3D;
@ -69,7 +60,6 @@ CCtrlTextButton::CCtrlTextButton(const TCtorParam &param)
bool CCtrlTextButton::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup) bool CCtrlTextButton::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup)
{ {
CXMLAutoPtr prop; CXMLAutoPtr prop;
CInterfaceManager *pIM = CInterfaceManager::getInstance();
CViewRenderer &rVR = *CViewRenderer::getInstance(); CViewRenderer &rVR = *CViewRenderer::getInstance();
//try to get props that can be inherited from groups //try to get props that can be inherited from groups
@ -272,7 +262,6 @@ void CCtrlTextButton::draw ()
CViewRenderer::CTextureId *pTxId = NULL; CViewRenderer::CTextureId *pTxId = NULL;
CRGBA color; CRGBA color;
CInterfaceManager *pIM = CInterfaceManager::getInstance();
CViewRenderer &rVR = *CViewRenderer::getInstance(); CViewRenderer &rVR = *CViewRenderer::getInstance();
CRGBA globalColor= CWidgetManager::getInstance()->getGlobalColorForContent(); CRGBA globalColor= CWidgetManager::getInstance()->getGlobalColorForContent();
@ -392,7 +381,7 @@ void CCtrlTextButton::draw ()
CInterfaceGroup *pIG= getRootWindow(); CInterfaceGroup *pIG= getRootWindow();
if(pIG->isGroupContainer()) if(pIG->isGroupContainer())
{ {
CGroupContainer *pGC= static_cast<CGroupContainer*>(pIG); CGroupContainerBase *pGC = static_cast<CGroupContainerBase*>(pIG);
viewTextColor= pGC->getDrawnHeaderColor(); viewTextColor= pGC->getDrawnHeaderColor();
} }
} }

View file

@ -28,7 +28,6 @@ namespace NLGUI
class CEventDescriptor; class CEventDescriptor;
class CViewText; class CViewText;
} }
class CInterfaceManager;
// *************************************************************************** // ***************************************************************************
/** /**