mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-17 21:11:39 +00:00
CHANGED: #1471 CGroupTable and CGroupCell no longer depend on CInterfaceManager, and a Ryzom game global.
This commit is contained in:
parent
0c8698d7f0
commit
e209a6c77d
4 changed files with 15 additions and 18 deletions
|
@ -51,6 +51,7 @@ namespace NLGUI
|
|||
virtual void addLuaClassAssociation( CInterfaceGroup *group, const std::string &luaScript ) = 0;
|
||||
virtual CInterfaceGroup* createGroupInstance( const std::string &templateName, const std::string &parentID, const std::pair< std::string, std::string > *templateParams, uint numParams, bool updateLinks = true ) = 0;
|
||||
virtual CInterfaceGroup* createGroupInstance( const std::string &templateName, const std::string &parentID, std::vector< std::pair< std::string, std::string > > &templateParams, bool updateLinks = true ) = 0;
|
||||
virtual bool parseGroupChildren( xmlNodePtr cur, CInterfaceGroup * parentGroup, bool reload );
|
||||
};
|
||||
|
||||
/// Manages the GUI widgets
|
||||
|
|
|
@ -15,27 +15,21 @@
|
|||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
#include "stdpch.h"
|
||||
|
||||
#include "group_table.h"
|
||||
#include "interface_manager.h"
|
||||
#include "nel/gui/widget_manager.h"
|
||||
#include "nel/gui/interface_element.h"
|
||||
#include "../client_chat_manager.h"
|
||||
#include "nel/gui/view_bitmap.h"
|
||||
#include "nel/gui/view_text_id.h"
|
||||
#include "nel/gui/group_container.h"
|
||||
|
||||
#include "nel/misc/i_xml.h"
|
||||
#include "nel/misc/i18n.h"
|
||||
|
||||
#include "nel/misc/xml_auto_ptr.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace NLMISC;
|
||||
|
||||
extern CClientChatManager ChatMngr;
|
||||
extern bool DebugUICell;
|
||||
|
||||
bool CGroupCell::DebugUICell = false;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
CGroupCell::CGroupCell(const TCtorParam ¶m)
|
||||
|
@ -91,7 +85,7 @@ bool CGroupCell::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup, uint colum
|
|||
Group->setId(parentGroup->getId() + Group->getId());
|
||||
setEnclosedGroupDefaultParams();
|
||||
// parse the children
|
||||
bool ok = CInterfaceManager::getInstance()->parseGroupChildren(cur, Group, false);
|
||||
bool ok = CWidgetManager::parser->parseGroupChildren(cur, Group, false);
|
||||
if (!ok) return false;
|
||||
// align
|
||||
ptr = (char*) xmlGetProp( cur, (xmlChar*)"align" );
|
||||
|
@ -191,8 +185,7 @@ bool CGroupCell::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup, uint colum
|
|||
// ----------------------------------------------------------------------------
|
||||
void CGroupCell::draw ()
|
||||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
if (DebugUICell)
|
||||
if ( CGroupCell::DebugUICell )
|
||||
{
|
||||
// Draw cell
|
||||
CViewRenderer &rVR = *CViewRenderer::getInstance();
|
||||
|
@ -791,7 +784,7 @@ void CGroupTable::checkCoords ()
|
|||
}
|
||||
else
|
||||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
|
||||
CCtrlBase *pCB = CWidgetManager::getInstance()->getCapturePointerLeft();
|
||||
if (pCB != NULL)
|
||||
{
|
||||
|
@ -944,7 +937,6 @@ void CGroupTable::draw ()
|
|||
sint32 border = Border + CellSpacing + CellPadding;
|
||||
if (border)
|
||||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
CRGBA finalColor;
|
||||
finalColor.modulateFromColor (BgColor, CWidgetManager::getInstance()->getGlobalColor());
|
||||
finalColor.A = CurrentAlpha;
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
#include "nel/misc/types_nl.h"
|
||||
#include "nel/gui/group_frame.h"
|
||||
#include "nel/gui/view_text.h"
|
||||
#include "view_link.h"
|
||||
#include "nel/gui/ctrl_button.h"
|
||||
|
||||
/**
|
||||
|
@ -101,8 +100,12 @@ public:
|
|||
void setTextureTile(bool tiled);
|
||||
void setTextureScale(bool scaled);
|
||||
|
||||
static void setDebugUICell( bool d ){ DebugUICell = d; }
|
||||
static bool getDebugUICell(){ return DebugUICell; }
|
||||
|
||||
private:
|
||||
void setEnclosedGroupDefaultParams();
|
||||
static bool DebugUICell;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -146,6 +146,7 @@
|
|||
#include "string_manager_client.h"
|
||||
|
||||
#include "nel/gui/lua_manager.h"
|
||||
#include "interface_v3/group_table.h"
|
||||
|
||||
|
||||
///////////
|
||||
|
@ -317,7 +318,6 @@ uint32 OldWidth; // Last Width of the window.
|
|||
uint32 OldHeight; // Last Height of the window.
|
||||
|
||||
bool ShowInterface = true; // Do the Chat OSD have to be displayed.
|
||||
bool DebugUICell = false;
|
||||
bool DebugUIView = false;
|
||||
bool DebugUICtrl = false;
|
||||
bool DebugUIGroup = false;
|
||||
|
@ -4394,7 +4394,8 @@ NLMISC_COMMAND(debugUI, "Debug the ui : show/hide quads of bboxs and hotspots",
|
|||
else
|
||||
fromString(args[0], on);
|
||||
}
|
||||
DebugUICell = on;
|
||||
|
||||
CGroupCell::setDebugUICell( on );
|
||||
DebugUIView = on;
|
||||
DebugUICtrl = on;
|
||||
DebugUIGroup = on;
|
||||
|
@ -4426,7 +4427,7 @@ NLMISC_COMMAND(debugUIGroup, "Debug the ui : show/hide quads of bboxs and hotspo
|
|||
// show hide the debuging of cells
|
||||
NLMISC_COMMAND(debugUICell, "Debug the ui : show/hide quads of bboxs for cells", "")
|
||||
{
|
||||
DebugUICell = !DebugUICell;
|
||||
CGroupCell::setDebugUICell( !CGroupCell::getDebugUICell() )
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue