CHANGED: #1471 Finally moved some of the basic widget classes and the widget manager, action handler manager to the GUI lib. Also moved some GUI related methods back to CLuaIHM.
This commit is contained in:
parent
7ddc76cc85
commit
529dd877fe
157 changed files with 738 additions and 728 deletions
|
@ -20,7 +20,7 @@
|
|||
#define RZ_CTRL_BASE_H
|
||||
|
||||
#include "nel/misc/types_nl.h"
|
||||
#include "view_base.h"
|
||||
#include "nel/gui/view_base.h"
|
||||
#include "nel/gui/event_descriptor.h"
|
||||
|
||||
class CCtrlBase : public CViewBase
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef CTRL_DRAGGABLE_H
|
||||
#define CTRL_DRAGGABLE_H
|
||||
|
||||
#include "ctrl_base.h"
|
||||
#include "nel/gui/ctrl_base.h"
|
||||
|
||||
class CCtrlDraggable : public CCtrlBase
|
||||
{
|
|
@ -17,7 +17,7 @@
|
|||
#ifndef CTRL_SCROLL_BASE_H
|
||||
#define CTRL_SCROLL_BASE_H
|
||||
|
||||
#include "ctrl_base.h"
|
||||
#include "nel/gui/ctrl_base.h"
|
||||
|
||||
class CInterfaceGroup;
|
||||
|
|
@ -20,6 +20,7 @@
|
|||
#define RZ_EVENT_DESCRIPTOR_H
|
||||
|
||||
#include "nel/misc/types_nl.h"
|
||||
#include "nel/misc/events.h"
|
||||
|
||||
namespace NLGUI
|
||||
{
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#ifndef GROUP_CONTAINER_BASE_H
|
||||
#define GROUP_CONTAINER_BASE_H
|
||||
|
||||
#include "interface_group.h"
|
||||
#include "nel/gui/interface_group.h"
|
||||
|
||||
|
||||
class CGroupContainerBase : public CInterfaceGroup
|
|
@ -18,7 +18,7 @@
|
|||
#ifndef GROUP_EDITBOX_BASE_H
|
||||
#define GROUP_EDITBOX_BASE_H
|
||||
|
||||
#include "interface_group.h"
|
||||
#include "nel/gui/interface_group.h"
|
||||
|
||||
class CGroupEditBoxBase : public CInterfaceGroup
|
||||
{
|
|
@ -20,7 +20,7 @@
|
|||
#define NL_GROUP_FRAME_H
|
||||
|
||||
#include "nel/misc/types_nl.h"
|
||||
#include "interface_group.h"
|
||||
#include "nel/gui/interface_group.h"
|
||||
|
||||
|
||||
// ***************************************************************************
|
|
@ -20,7 +20,7 @@
|
|||
#define NL_GROUP_MODAL_H
|
||||
|
||||
#include "nel/misc/types_nl.h"
|
||||
#include "group_frame.h"
|
||||
#include "nel/gui/group_frame.h"
|
||||
|
||||
|
||||
// ***************************************************************************
|
|
@ -22,6 +22,7 @@
|
|||
#include "nel/misc/types_nl.h"
|
||||
#include "nel/misc/string_mapper.h"
|
||||
#include "nel/misc/smart_ptr.h"
|
||||
#include "nel/misc/vector.h"
|
||||
#include "nel/gui/interface_property.h"
|
||||
#include "nel/gui/reflect.h"
|
||||
#include "nel/gui/interface_common.h"
|
|
@ -19,8 +19,8 @@
|
|||
#ifndef NL_INTERFACE_GROUP_H
|
||||
#define NL_INTERFACE_GROUP_H
|
||||
|
||||
#include "ctrl_base.h"
|
||||
#include "action_handler.h"
|
||||
#include "nel/gui/ctrl_base.h"
|
||||
#include "nel/gui/action_handler.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
class CInterfaceGroup : public CCtrlBase
|
|
@ -19,12 +19,13 @@
|
|||
#ifndef RZ_INTERFACE_LAYER_H
|
||||
#define RZ_INTERFACE_LAYER_H
|
||||
|
||||
#include "nel/misc/debug.h"
|
||||
#include "nel/misc/smart_ptr.h"
|
||||
|
||||
#include "nel/misc/rgba.h"
|
||||
|
||||
namespace NL3D
|
||||
{
|
||||
class UAnimationSet;
|
||||
class UAnimationSet;
|
||||
}
|
||||
|
||||
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
#include "nel/misc/types_nl.h"
|
||||
#include "nel/gui/lua_helper.h"
|
||||
#include "nel/gui/interface_element.h"
|
||||
|
||||
#define IHM_LUA_METATABLE "__ui_metatable"
|
||||
#define IHM_LUA_ENVTABLE "__ui_envtable"
|
||||
|
@ -123,13 +124,28 @@ namespace NLGUI
|
|||
// NB : no check is done that 'property' is part of the class info of 'reflectedObject'
|
||||
static void luaValueFromReflectedProperty(CLuaState &ls, CReflectable &reflectedObject, const CReflectedProperty &property);
|
||||
|
||||
|
||||
|
||||
private:
|
||||
// Functions for the ui metatable
|
||||
static class CInterfaceElement* getUIRelative( CInterfaceElement *pIE, const std::string &propName );
|
||||
static int luaUIIndex( CLuaState &ls );
|
||||
static int luaUINewIndex( CLuaState &ls );
|
||||
static int luaUIEq( CLuaState &ls );
|
||||
static int luaUINext( CLuaState &ls );
|
||||
static int luaUIDtor( CLuaState &ls );
|
||||
|
||||
|
||||
static void registerBasics(CLuaState &ls);
|
||||
static void registerIHM(CLuaState &ls);
|
||||
static void createLuaEnumTable(CLuaState &ls, const std::string &str);
|
||||
|
||||
public:
|
||||
static void pushUIOnStack(CLuaState &ls, CInterfaceElement *pIE);
|
||||
static bool isUIOnStack(CLuaState &ls, sint index);
|
||||
static CInterfaceElement *getUIOnStack(CLuaState &ls, sint index);
|
||||
static void checkArgTypeUIElement(CLuaState &ls, const char *funcName, uint index);
|
||||
|
||||
private:
|
||||
|
||||
//////////////////////////////////////////// Exported functions //////////////////////////////////////////////////////
|
||||
|
||||
static uint32 getLocalTime();
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#include "nel/misc/types_nl.h"
|
||||
#include "nel/misc/factory.h"
|
||||
#include "interface_element.h"
|
||||
#include "nel/gui/interface_element.h"
|
||||
|
||||
class CViewBase : public CInterfaceElement
|
||||
{
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef VIEW_POINTER_BASE_H
|
||||
#define VIEW_POINTER_BASE_H
|
||||
|
||||
#include "view_base.h"
|
||||
#include "nel/gui/view_base.h"
|
||||
|
||||
class CViewPointerBase : public CViewBase
|
||||
{
|
|
@ -14,14 +14,13 @@
|
|||
// 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/>.
|
||||
|
||||
#include "action_handler.h"
|
||||
//#include "group_container.h"
|
||||
#include "group_container_base.h"
|
||||
#include "nel/gui/action_handler.h"
|
||||
#include "nel/gui/group_container_base.h"
|
||||
#include "nel/gui/interface_property.h"
|
||||
#include "nel/gui/interface_expr.h"
|
||||
#include "nel/gui/db_manager.h"
|
||||
#include "interface_link.h"
|
||||
#include "widget_manager.h"
|
||||
#include "nel/gui/interface_link.h"
|
||||
#include "nel/gui/widget_manager.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace NLMISC;
|
|
@ -14,11 +14,13 @@
|
|||
// 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/>.
|
||||
|
||||
|
||||
#include "libxml/globals.h"
|
||||
#include "nel/misc/debug.h"
|
||||
#include "nel/misc/xml_auto_ptr.h"
|
||||
#include "ctrl_base.h"
|
||||
#include "interface_group.h"
|
||||
#include "widget_manager.h"
|
||||
#include "nel/gui/ctrl_base.h"
|
||||
#include "nel/gui/interface_group.h"
|
||||
#include "nel/gui/widget_manager.h"
|
||||
#include "nel/misc/i18n.h"
|
||||
|
||||
using namespace NLMISC;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
#include "ctrl_draggable.h"
|
||||
#include "nel/gui/ctrl_draggable.h"
|
||||
|
||||
CCtrlDraggable* CCtrlDraggable::_LastDraggedSheet = NULL;
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
// 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/>.
|
||||
|
||||
#include "ctrl_scroll_base.h"
|
||||
#include "nel/gui/ctrl_scroll_base.h"
|
||||
|
||||
CCtrlScrollBase::CCtrlScrollBase( const TCtorParam ¶m ) :
|
||||
CCtrlBase( param )
|
|
@ -15,7 +15,7 @@
|
|||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
#include "group_container_base.h"
|
||||
#include "nel/gui/group_container_base.h"
|
||||
|
||||
CGroupContainerBase::CGroupContainerBase( const CViewBase::TCtorParam ¶m ) :
|
||||
CInterfaceGroup( param )
|
|
@ -1,4 +1,4 @@
|
|||
#include "group_editbox_base.h"
|
||||
#include "nel/gui/group_editbox_base.h"
|
||||
|
||||
CGroupEditBoxBase *CGroupEditBoxBase::_CurrSelection = NULL;
|
||||
|
|
@ -14,10 +14,10 @@
|
|||
// 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/>.
|
||||
|
||||
#include "group_frame.h"
|
||||
#include "widget_manager.h"
|
||||
#include "interface_options.h"
|
||||
#include "interface_element.h"
|
||||
#include "nel/gui/group_frame.h"
|
||||
#include "nel/gui/widget_manager.h"
|
||||
#include "nel/gui/interface_options.h"
|
||||
#include "nel/gui/interface_element.h"
|
||||
#include "nel/gui/view_renderer.h"
|
||||
#include "nel/misc/xml_auto_ptr.h"
|
||||
|
|
@ -16,8 +16,8 @@
|
|||
|
||||
|
||||
|
||||
#include "group_modal.h"
|
||||
#include "interface_element.h"
|
||||
#include "nel/gui/group_modal.h"
|
||||
#include "nel/gui/interface_element.h"
|
||||
#include "nel/misc/xml_auto_ptr.h"
|
||||
#include "nel/gui/view_renderer.h"
|
||||
|
|
@ -14,15 +14,15 @@
|
|||
// 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/>.
|
||||
|
||||
#include "interface_group.h"
|
||||
#include "nel/gui/interface_group.h"
|
||||
#include "nel/gui/interface_property.h"
|
||||
#include "nel/gui/view_renderer.h"
|
||||
#include "widget_manager.h"
|
||||
#include "nel/gui/widget_manager.h"
|
||||
#include "nel/gui/db_manager.h"
|
||||
#include "interface_link.h"
|
||||
#include "nel/gui/interface_link.h"
|
||||
#include "nel/misc/xml_auto_ptr.h"
|
||||
#include "nel/gui/lua_ihm.h"
|
||||
#include "lua_ihm_ryzom.h"
|
||||
#include "nel/gui/lua_ihm.h"
|
||||
#include "nel/misc/mem_stream.h"
|
||||
//
|
||||
|
||||
|
@ -1167,7 +1167,7 @@ int CInterfaceElement::luaSetPosRef(CLuaState &ls)
|
|||
int CInterfaceElement::luaSetParentPos(CLuaState &ls)
|
||||
{
|
||||
CLuaIHM::checkArgCount(ls, "setParentPos", 1);
|
||||
CInterfaceElement *ie = CLuaIHMRyzom::getUIOnStack(ls, 1);
|
||||
CInterfaceElement *ie = CLuaIHM::getUIOnStack(ls, 1);
|
||||
if(ie)
|
||||
{
|
||||
setParentPos(ie);
|
|
@ -14,17 +14,18 @@
|
|||
// 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/>.
|
||||
|
||||
#include "libxml/globals.h"
|
||||
#include "nel/misc/debug.h"
|
||||
#include "nel/misc/xml_auto_ptr.h"
|
||||
#include "nel/misc/stream.h"
|
||||
#include "nel/gui/lua_manager.h"
|
||||
#include "nel/gui/lua_ihm.h"
|
||||
#include "nel/gui/view_renderer.h"
|
||||
|
||||
#include "interface_group.h"
|
||||
#include "interface_link.h"
|
||||
#include "widget_manager.h"
|
||||
#include "ctrl_scroll_base.h"
|
||||
#include "lua_ihm_ryzom.h"
|
||||
#include "nel/gui/interface_group.h"
|
||||
#include "nel/gui/interface_link.h"
|
||||
#include "nel/gui/widget_manager.h"
|
||||
#include "nel/gui/ctrl_scroll_base.h"
|
||||
#include "nel/gui/lua_ihm.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace NL3D;
|
||||
|
@ -444,7 +445,7 @@ void CInterfaceGroup::addGroup (CInterfaceGroup *child, sint eltOrder /*= -1*/)
|
|||
int CInterfaceGroup::luaAddGroup (CLuaState &ls)
|
||||
{
|
||||
CLuaIHM::checkArgCount(ls, "CInterfaceGroup::addTab", 1);
|
||||
CInterfaceGroup * group = dynamic_cast<CInterfaceGroup *>(CLuaIHMRyzom::getUIOnStack(ls, 1));
|
||||
CInterfaceGroup * group = dynamic_cast<CInterfaceGroup *>(CLuaIHM::getUIOnStack(ls, 1));
|
||||
if(group)
|
||||
{
|
||||
group->setParent(this);
|
||||
|
@ -615,7 +616,7 @@ bool CInterfaceGroup::delGroup (CInterfaceGroup *child, bool dontDelete /* = fal
|
|||
int CInterfaceGroup::luaDelGroup (CLuaState &ls)
|
||||
{
|
||||
CLuaIHM::checkArgCount(ls, "CInterfaceGroup::delTab", 1);
|
||||
CInterfaceGroup * group = dynamic_cast<CInterfaceGroup *>(CLuaIHMRyzom::getUIOnStack(ls, 1));
|
||||
CInterfaceGroup * group = dynamic_cast<CInterfaceGroup *>(CLuaIHM::getUIOnStack(ls, 1));
|
||||
if(group)
|
||||
{
|
||||
delGroup(group);
|
||||
|
@ -642,7 +643,7 @@ int CInterfaceGroup::luaGetGroup(CLuaState &ls)
|
|||
{
|
||||
CLuaIHM::fails(ls, "getGroup : try to index group %s, but there are only %d son groups", ls.toString(1), (int) _ChildrenGroups.size());
|
||||
}
|
||||
CLuaIHMRyzom::pushUIOnStack(ls, _ChildrenGroups[index]);
|
||||
CLuaIHM::pushUIOnStack(ls, _ChildrenGroups[index]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -1851,7 +1852,7 @@ int CInterfaceGroup::luaFind(CLuaState &ls)
|
|||
}
|
||||
else
|
||||
{
|
||||
CLuaIHMRyzom::pushUIOnStack(ls, element);
|
||||
CLuaIHM::pushUIOnStack(ls, element);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
@ -1870,7 +1871,7 @@ CInterfaceElement* CInterfaceGroup::findFromShortId(const std::string &id)
|
|||
int CInterfaceGroup::luaGetEnclosingContainer(CLuaState &ls)
|
||||
{
|
||||
CLuaIHM::checkArgCount(ls, "CInterfaceGroup::getEnclosingContainer", 0);
|
||||
CLuaIHMRyzom::pushUIOnStack(ls, getEnclosingContainer());
|
||||
CLuaIHM::pushUIOnStack(ls, getEnclosingContainer());
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -19,11 +19,12 @@
|
|||
#include "nel/gui/reflect.h"
|
||||
#include "nel/gui/db_manager.h"
|
||||
#include "nel/misc/cdb_branch.h"
|
||||
#include "action_handler.h"
|
||||
#include "interface_link.h"
|
||||
#include "interface_element.h"
|
||||
#include "interface_group.h"
|
||||
#include "widget_manager.h"
|
||||
#include "nel/gui/action_handler.h"
|
||||
#include "nel/gui/interface_link.h"
|
||||
#include "nel/gui/interface_element.h"
|
||||
#include "nel/gui/interface_group.h"
|
||||
#include "nel/gui/widget_manager.h"
|
||||
#include "nel/misc/algo.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace NLMISC;
|
|
@ -16,9 +16,9 @@
|
|||
|
||||
|
||||
|
||||
#include "nel/gui/interface_element.h"
|
||||
#include "nel/misc/xml_auto_ptr.h"
|
||||
#include "interface_options.h"
|
||||
#include "interface_element.h"
|
||||
#include "nel/gui/interface_options.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace NLMISC;
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
|
||||
#include "nel/gui/lua_helper.h"
|
||||
#include "nel/gui/interface_group.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
|
@ -258,6 +259,402 @@ namespace NLGUI
|
|||
|
||||
namespace NLGUI
|
||||
{
|
||||
static CLuaString lstr_Env("Env");
|
||||
static CLuaString lstr_isNil("isNil");
|
||||
|
||||
// ***************************************************************************
|
||||
int CLuaIHM::luaUIIndex(CLuaState &ls)
|
||||
{
|
||||
//H_AUTO(Lua_CLuaIHM_luaUIIndex)
|
||||
nlassert(ls.getTop()==2);
|
||||
// get the userdata and key
|
||||
CReflectableLuaRef *pRefElm = (CReflectableLuaRef *) ls.toUserData(1);
|
||||
|
||||
const char *propName = ls.toString(2);
|
||||
CReflectableRefPtrTarget *pRPT= (CReflectableRefPtrTarget*)(pRefElm->Ptr);
|
||||
// ** try to get the Env Table (interface group only)
|
||||
if(propName==lstr_isNil)
|
||||
{
|
||||
ls.push(pRPT==NULL);
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Check the object is not NULL or freed
|
||||
if(pRPT==NULL)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
// ** try to get the Env Table (interface group only)
|
||||
if(propName==lstr_Env)
|
||||
{
|
||||
// Env can be bound to a CInterfaceGroup only
|
||||
CInterfaceGroup *group= dynamic_cast<CInterfaceGroup*>(pRPT);
|
||||
if(group==NULL)
|
||||
{
|
||||
ls.pushNil();
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
group->pushLUAEnvTable();
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
// ** try to get the property
|
||||
const CReflectedProperty *prop = pRefElm->getProp(propName);
|
||||
if (prop)
|
||||
{
|
||||
CLuaIHM::luaValueFromReflectedProperty(ls, *pRPT, *prop);
|
||||
return 1;
|
||||
}
|
||||
|
||||
// ** try to get a UI relative
|
||||
CInterfaceElement *uiRelative= getUIRelative(dynamic_cast<CInterfaceElement *>(pRPT), propName);
|
||||
if(uiRelative)
|
||||
{
|
||||
// push the UI onto the stack
|
||||
pushUIOnStack(ls, uiRelative);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
// Fail to find any Attributes or elements
|
||||
// Yoyo: don't write any message or warning because this may be a feature (if user want to test that something exit in the ui)
|
||||
ls.pushNil();
|
||||
return 1;
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
int CLuaIHM::luaUINewIndex(CLuaState &ls)
|
||||
{
|
||||
//H_AUTO(Lua_CLuaIHM_luaUINewIndex)
|
||||
nlassert(ls.getTop()==3);
|
||||
// get the userdata and key
|
||||
CReflectableLuaRef *pRefElm = (CReflectableLuaRef *) ls.toUserData(1);
|
||||
nlassert(pRefElm);
|
||||
CReflectableRefPtrTarget *pRPT= (CReflectableRefPtrTarget*)(pRefElm->Ptr);
|
||||
// Check the UI is not NULL or freed
|
||||
if(pRPT == NULL)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
const char *propName = ls.toString(2);
|
||||
// ** try to set the Env Table (interface group only)
|
||||
if(propName == lstr_Env)
|
||||
{
|
||||
CInterfaceElement *pIE = dynamic_cast<CInterfaceElement *>(pRPT);
|
||||
std::string name ;
|
||||
if (pIE)
|
||||
{
|
||||
name = pIE->getId();
|
||||
}
|
||||
else
|
||||
{
|
||||
name = "<reflectable element>";
|
||||
}
|
||||
// Exception!!! not allowed
|
||||
throw ELuaIHMException("You cannot change the Env Table of '%s'", name.c_str());
|
||||
}
|
||||
|
||||
|
||||
// ** try to set the property
|
||||
const CReflectedProperty *prop = pRefElm->getProp(propName);
|
||||
if (prop)
|
||||
{
|
||||
CLuaIHM::luaValueToReflectedProperty(ls, 3, *pRPT, *prop);
|
||||
return 0;
|
||||
}
|
||||
|
||||
CInterfaceElement *pIE = dynamic_cast<CInterfaceElement *>(pRPT);
|
||||
// ** try to get another UI (child or parent)
|
||||
CInterfaceElement *uiRelative= getUIRelative(pIE, propName);
|
||||
if(uiRelative)
|
||||
{
|
||||
// Exception!!! not allowed
|
||||
throw ELuaIHMException("You cannot write into the UI '%s' of '%s'", propName, pIE->getId().c_str());
|
||||
}
|
||||
|
||||
// ** Prop Not Found
|
||||
throw ELuaIHMException("Property '%s' not found in '%s' of type %s", propName, pIE ? pIE->getId().c_str() : "<reflectable element>", typeid(*pRPT).name());
|
||||
|
||||
// Fail to find any Attributes or elements
|
||||
return 0;
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
int CLuaIHM::luaUIEq(CLuaState &ls)
|
||||
{
|
||||
//H_AUTO(Lua_CLuaIHM_luaUIEq)
|
||||
nlassert(ls.getTop() == 2);
|
||||
// read lhs & rhs
|
||||
// get the userdata and key
|
||||
CReflectableLuaRef *lhs = (CReflectableLuaRef *) ls.toUserData(1);
|
||||
CReflectableLuaRef *rhs = (CReflectableLuaRef *) ls.toUserData(2);
|
||||
nlassert(lhs);
|
||||
nlassert(rhs);
|
||||
ls.push(lhs->Ptr == rhs->Ptr);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
// ***************************************************************************
|
||||
int CLuaIHM::luaUIDtor(CLuaState &ls)
|
||||
{
|
||||
//H_AUTO(Lua_CLuaIHM_luaUIDtor)
|
||||
nlassert(ls.getTop()==1);
|
||||
// get the userdata
|
||||
CReflectableLuaRef *pRefElm = (CReflectableLuaRef *) ls.toUserData(1);
|
||||
nlassert(pRefElm);
|
||||
|
||||
// call dtor
|
||||
pRefElm->~CReflectableLuaRef();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
int CLuaIHM::luaUINext(CLuaState &ls)
|
||||
{
|
||||
//H_AUTO(Lua_CLuaIHM_luaUINext)
|
||||
// Code below allow enumeration of properties of a reflectable object
|
||||
// From lua standpoint, the object is seen as a table with (key, value) pairs
|
||||
// If object is a CInterfaceGroup, iteration is also done on sons (groups, controls & view).
|
||||
|
||||
if (ls.getTop() != 2)
|
||||
{
|
||||
CLuaIHM::fails(ls, "__next metamethod require 2 arguments (table & key)");
|
||||
}
|
||||
CLuaIHM::check(ls, CLuaIHM::isReflectableOnStack(ls, 1), "__next : require ui element as first arg");
|
||||
CReflectableRefPtrTarget *reflectedObject = CLuaIHM::getReflectableOnStack(ls, 1);
|
||||
// To traverse all properties / field of the object, we must be able to determine the next key from a previous key
|
||||
// (keys are ordered)
|
||||
// We use the 'TValueType' enum to know which kind of property we are traversing, and an index in this group of properties
|
||||
// The key which uniquely identify an element / property in the reflectable object
|
||||
struct CKey
|
||||
{
|
||||
enum TValueType
|
||||
{
|
||||
VTGroup = 0, // children groups (If the object is a CInterfaceGroup)
|
||||
VTView, // children views (If the object is a CInterfaceView)
|
||||
VTCtrl, // children controls (If the object is a CInterfaceCtrl)
|
||||
VTProp // List of exported proeprties (For all relfectable objects)
|
||||
};
|
||||
TValueType ValueType;
|
||||
sint Index;
|
||||
const CClassInfo *ClassInfo; // if ValueType is "VTProp" -> give the class for which property are currently enumerated
|
||||
//
|
||||
static int tostring(CLuaState &ls) // '__print' metamathod
|
||||
{
|
||||
CLuaIHM::checkArgCount(ls, "reflected object metatable:__print", 1);
|
||||
CKey key;
|
||||
key.pop(ls);
|
||||
switch(key.ValueType)
|
||||
{
|
||||
case VTGroup: ls.push(toString("_Group %d", key.Index)); break;
|
||||
case VTView: ls.push(toString("_View %d", key.Index)); break;
|
||||
case VTCtrl: ls.push(toString("_Ctrl %d", key.Index)); break;
|
||||
case VTProp: ls.push(key.ClassInfo->Properties[key.Index].Name); break;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
// push the key on the lua stack
|
||||
void push(CLuaState &ls)
|
||||
{
|
||||
void *ud = ls.newUserData(sizeof(*this));
|
||||
*(CKey *) ud = *this;
|
||||
getMetaTable(ls).push();
|
||||
ls.setMetaTable(-2);
|
||||
}
|
||||
// pop the key from the lua stack
|
||||
void pop(CLuaState &ls)
|
||||
{
|
||||
CLuaStackChecker lsc(&ls, -1);
|
||||
if (!ls.isUserData(-1))
|
||||
{
|
||||
CLuaIHM::fails(ls, "Can't pop object, not a user data");
|
||||
}
|
||||
// check that metatable is good (it is share between all keys)
|
||||
ls.getMetaTable(-1);
|
||||
getMetaTable(ls).push();
|
||||
if (!ls.rawEqual(-1, -2))
|
||||
{
|
||||
CLuaIHM::fails(ls, "Bad metatable for reflectable object key");
|
||||
}
|
||||
ls.pop(2);
|
||||
// retrieve key
|
||||
*this = *(CKey *) ls.toUserData(-1);
|
||||
ls.pop();
|
||||
}
|
||||
// get the metatable for a CKey
|
||||
CLuaObject &getMetaTable(CLuaState &ls)
|
||||
{
|
||||
static CLuaObject metatable;
|
||||
if (!metatable.isValid())
|
||||
{
|
||||
// first build
|
||||
CLuaStackChecker lsc(&ls);
|
||||
ls.newTable();
|
||||
ls.push("__tostring");
|
||||
ls.push(CKey::tostring);
|
||||
ls.setTable(-3);
|
||||
metatable.pop(ls);
|
||||
}
|
||||
return metatable;
|
||||
}
|
||||
};
|
||||
// Pop the current key to continue enumeration
|
||||
CKey key;
|
||||
if (ls.isNil(2))
|
||||
{
|
||||
// no key -> start of table
|
||||
key.ValueType = CKey::VTGroup;
|
||||
key.Index = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
key.pop(ls);
|
||||
}
|
||||
//
|
||||
CInterfaceGroup *group = dynamic_cast<CInterfaceGroup *>(reflectedObject);
|
||||
bool enumerate = true;
|
||||
while (enumerate)
|
||||
{
|
||||
switch(key.ValueType)
|
||||
{
|
||||
case CKey::VTGroup:
|
||||
if (!group || (key.Index + 1) == (sint) group->getGroups().size())
|
||||
{
|
||||
key.Index = -1;
|
||||
key.ValueType = CKey::VTView; // continue enumeration with views
|
||||
}
|
||||
else
|
||||
{
|
||||
++ key.Index;
|
||||
key.push(ls);
|
||||
pushUIOnStack(ls, group->getGroups()[key.Index]);
|
||||
return 2;
|
||||
}
|
||||
break;
|
||||
case CKey::VTView:
|
||||
if (!group || (key.Index + 1) == (sint) group->getViews().size())
|
||||
{
|
||||
key.Index = -1;
|
||||
key.ValueType = CKey::VTCtrl; // continue enumeration with controls
|
||||
}
|
||||
else
|
||||
{
|
||||
++ key.Index;
|
||||
key.push(ls);
|
||||
pushUIOnStack(ls, group->getViews()[key.Index]);
|
||||
return 2;
|
||||
}
|
||||
break;
|
||||
case CKey::VTCtrl:
|
||||
if (!group || (key.Index + 1) == (sint) group->getControls().size())
|
||||
{
|
||||
key.Index = -1;
|
||||
key.ValueType = CKey::VTProp; // continue enumeration with properties
|
||||
key.ClassInfo = reflectedObject->getClassInfo();
|
||||
}
|
||||
else
|
||||
{
|
||||
++ key.Index;
|
||||
key.push(ls);
|
||||
pushUIOnStack(ls, group->getControls()[key.Index]);
|
||||
return 2;
|
||||
}
|
||||
break;
|
||||
case CKey::VTProp:
|
||||
if (!key.ClassInfo)
|
||||
{
|
||||
enumerate = false;
|
||||
break;
|
||||
}
|
||||
if ((sint) key.ClassInfo->Properties.size() == (key.Index + 1))
|
||||
{
|
||||
key.ClassInfo = key.ClassInfo->ParentClass; // continue enumeration in parent class
|
||||
key.Index = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
++ key.Index;
|
||||
key.push(ls);
|
||||
CLuaIHM::luaValueFromReflectedProperty(ls, *reflectedObject, key.ClassInfo->Properties[key.Index]);
|
||||
return 2;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
nlassert(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
ls.pushNil();
|
||||
return 0;
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
void CLuaIHM::pushUIOnStack(CLuaState &ls, CInterfaceElement *pIE)
|
||||
{
|
||||
//H_AUTO(Lua_CLuaIHM_pushUIOnStack)
|
||||
CLuaIHM::pushReflectableOnStack(ls, pIE);
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
bool CLuaIHM::isUIOnStack(CLuaState &ls, sint index)
|
||||
{
|
||||
//H_AUTO(Lua_CLuaIHM_isUIOnStack)
|
||||
return getUIOnStack(ls, index) != NULL;
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
CInterfaceElement *CLuaIHM::getUIOnStack(CLuaState &ls, sint index)
|
||||
{
|
||||
//H_AUTO(Lua_CLuaIHM_getUIOnStack)
|
||||
return dynamic_cast<CInterfaceElement *>(CLuaIHM::getReflectableOnStack(ls, index));
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
void CLuaIHM::checkArgTypeUIElement(CLuaState &ls, const char *funcName, uint index)
|
||||
{
|
||||
//H_AUTO(Lua_CLuaIHM_checkArgTypeUIElement)
|
||||
nlassert(index > 0);
|
||||
if (ls.getTop() < (int) index)
|
||||
{
|
||||
CLuaIHM::fails(ls, "%s : argument %d of expected type ui element was not defined", funcName, index);
|
||||
}
|
||||
if (!isUIOnStack(ls, index))
|
||||
{
|
||||
CLuaIHM::fails(ls, "%s : argument %d of expected type ui element has bad type : %s", funcName, index, ls.getTypename(ls.type(index)), ls.type(index));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ***************************************************************************
|
||||
CInterfaceElement *CLuaIHM::getUIRelative(CInterfaceElement *pIE, const std::string &propName)
|
||||
{
|
||||
//H_AUTO(Lua_CLuaIHM_getUIRelative)
|
||||
if (pIE == NULL) return NULL;
|
||||
// If the prop is "parent", then return the parent of the ui
|
||||
if(propName=="parent")
|
||||
{
|
||||
return pIE->getParent();
|
||||
}
|
||||
// else try to get a child (if group/exist)
|
||||
else
|
||||
{
|
||||
CInterfaceGroup *group= dynamic_cast<CInterfaceGroup*>(pIE);
|
||||
if(group)
|
||||
{
|
||||
return group->getElement(group->getId()+":"+propName);
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
// ***************************************************************************
|
||||
void CLuaIHM::registerBasics(CLuaState &ls)
|
||||
|
@ -420,9 +817,6 @@ namespace NLGUI
|
|||
}
|
||||
}
|
||||
|
||||
static CLuaString lstr_Env("Env");
|
||||
static CLuaString lstr_isNil("isNil");
|
||||
|
||||
// ***************************************************************************
|
||||
void CLuaIHM::luaValueToReflectedProperty(CLuaState &ls, int stackIndex, CReflectable &target, const CReflectedProperty &property) throw(ELuaIHMException)
|
||||
{
|
||||
|
@ -545,6 +939,38 @@ namespace NLGUI
|
|||
ls.setTable(LUA_REGISTRYINDEX);
|
||||
|
||||
|
||||
// *** Register the MetaTable for UI userdata
|
||||
ls.push(IHM_LUA_METATABLE); // "__ui_metatable"
|
||||
ls.newTable(); // "__ui_metatable" {}
|
||||
// set the '__index' method
|
||||
ls.push("__index");
|
||||
ls.push(luaUIIndex);
|
||||
nlassert(ls.isCFunction());
|
||||
ls.setTable(-3); // "__ui_metatable" {"__index"= CFunc_luaUIIndex}
|
||||
// set the '__newindex' method
|
||||
ls.push("__newindex");
|
||||
ls.push(luaUINewIndex);
|
||||
nlassert(ls.isCFunction());
|
||||
ls.setTable(-3);
|
||||
// set the '__newindex' method
|
||||
ls.push("__gc");
|
||||
ls.push(luaUIDtor);
|
||||
nlassert(ls.isCFunction());
|
||||
ls.setTable(-3);
|
||||
// set the '__eq' method
|
||||
ls.push("__eq");
|
||||
ls.push(luaUIEq);
|
||||
nlassert(ls.isCFunction());
|
||||
ls.setTable(-3);
|
||||
// set the custom '__next' method
|
||||
ls.push("__next");
|
||||
ls.push(luaUINext);
|
||||
nlassert(ls.isCFunction());
|
||||
ls.setTable(-3);
|
||||
// set registry
|
||||
ls.setTable(LUA_REGISTRYINDEX);
|
||||
|
||||
|
||||
// *** Register Functions
|
||||
|
||||
// Through LUABind API
|
||||
|
|
|
@ -14,9 +14,9 @@
|
|||
// 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/>.
|
||||
|
||||
#include "view_base.h"
|
||||
#include "interface_group.h"
|
||||
#include "widget_manager.h"
|
||||
#include "nel/gui/view_base.h"
|
||||
#include "nel/gui/interface_group.h"
|
||||
#include "nel/gui/widget_manager.h"
|
||||
|
||||
CViewBase::~CViewBase()
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
#include "view_pointer_base.h"
|
||||
#include "nel/gui/view_pointer_base.h"
|
||||
|
||||
CViewPointerBase::CViewPointerBase( const CViewBase::TCtorParam ¶m ) :
|
||||
CViewBase( param )
|
|
@ -16,14 +16,14 @@
|
|||
|
||||
#include "nel/gui/db_manager.h"
|
||||
#include "nel/gui/view_renderer.h"
|
||||
#include "widget_manager.h"
|
||||
#include "view_pointer_base.h"
|
||||
#include "ctrl_draggable.h"
|
||||
#include "interface_group.h"
|
||||
#include "group_container_base.h"
|
||||
#include "group_modal.h"
|
||||
#include "group_editbox_base.h"
|
||||
#include "interface_options.h"
|
||||
#include "nel/gui/widget_manager.h"
|
||||
#include "nel/gui/view_pointer_base.h"
|
||||
#include "nel/gui/ctrl_draggable.h"
|
||||
#include "nel/gui/interface_group.h"
|
||||
#include "nel/gui/group_container_base.h"
|
||||
#include "nel/gui/group_modal.h"
|
||||
#include "nel/gui/group_editbox_base.h"
|
||||
#include "nel/gui/interface_options.h"
|
||||
|
||||
|
||||
CWidgetManager* CWidgetManager::instance = NULL;
|
|
@ -20,7 +20,7 @@
|
|||
#include "nel/misc/command.h"
|
||||
#include "nel/misc/file.h"
|
||||
#include "nel/3d/u_camera.h"
|
||||
#include "interface_v3/action_handler.h"
|
||||
#include "nel/gui/action_handler.h"
|
||||
#include "client_cfg.h"
|
||||
#include "view.h"
|
||||
//
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include "interface_v3/people_interraction.h"
|
||||
#include "string_manager_client.h"
|
||||
#include "entity_cl.h"
|
||||
#include "interface_v3/action_handler.h"
|
||||
#include "nel/gui/action_handler.h"
|
||||
#include "entities.h"
|
||||
#include "interface_v3/group_editbox.h"
|
||||
#include "permanent_ban.h"
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
#include <vector>
|
||||
// Client
|
||||
#include "connection.h"
|
||||
#include "interface_v3/action_handler.h"
|
||||
#include "nel/gui/action_handler.h"
|
||||
#include "sound_manager.h"
|
||||
#include "input.h"
|
||||
#include "login.h"
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
#include "debug_client.h"
|
||||
#include "misc.h"
|
||||
#include "client_cfg.h"
|
||||
#include "interface_v3/action_handler.h"
|
||||
#include "nel/gui/action_handler.h"
|
||||
#include "interface_v3/interface_manager.h"
|
||||
#include "interface_v3/group_container.h"
|
||||
#include "interface_v3/guild_manager.h"
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "nel/misc/types_nl.h"
|
||||
#include "main_loop.h"
|
||||
#include "interface_v3/ctrl_text_button.h"
|
||||
#include "interface_v3/interface_group.h"
|
||||
#include "nel/gui/interface_group.h"
|
||||
#include "interface_v3/interface_pointer.h"
|
||||
#include "game_share/bot_chat_types.h"
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
#include "sheet_manager.h"
|
||||
|
||||
#include "interface_v3/sbrick_manager.h"
|
||||
#include "interface_v3/widget_manager.h"
|
||||
#include "nel/gui/widget_manager.h"
|
||||
//
|
||||
#include "gabarit.h"
|
||||
#include "hair_set.h"
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
|
||||
#include "interface_v3/view_bitmap.h"
|
||||
|
||||
#include "interface_v3/interface_link.h"
|
||||
#include "nel/gui/interface_link.h"
|
||||
#include "cursor_functions.h"
|
||||
#include "pacs_client.h"
|
||||
#include "ig_client.h"
|
||||
|
|
|
@ -20,7 +20,7 @@ using namespace std;
|
|||
using namespace NLMISC;
|
||||
using namespace NL3D;
|
||||
|
||||
#include "action_handler.h"
|
||||
#include "nel/gui/action_handler.h"
|
||||
#include "../misc.h"
|
||||
#include "../prim_file.h"
|
||||
#include "../graph.h"
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
using namespace std;
|
||||
using namespace NLMISC;
|
||||
|
||||
#include "action_handler.h"
|
||||
#include "nel/gui/action_handler.h"
|
||||
#include "group_editbox.h"
|
||||
#include "interface_manager.h"
|
||||
#include "../client_chat_manager.h"
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
// Interface includes
|
||||
#include "interface_manager.h"
|
||||
#include "action_handler.h"
|
||||
#include "nel/gui/action_handler.h"
|
||||
#include "action_handler_base.h"
|
||||
#include "action_handler_misc.h"
|
||||
#include "bot_chat_manager.h"
|
||||
|
@ -61,7 +61,7 @@
|
|||
#include "../game_context_menu.h"
|
||||
#include "../sound_manager.h"
|
||||
#include "../far_tp.h"
|
||||
#include "interface_link.h"
|
||||
#include "nel/gui/interface_link.h"
|
||||
#include "../npc_icon.h"
|
||||
|
||||
// Game Share
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "stdpch.h"
|
||||
|
||||
|
||||
#include "action_handler.h"
|
||||
#include "nel/gui/action_handler.h"
|
||||
#include "interface_manager.h"
|
||||
#include "bot_chat_manager.h"
|
||||
#include "../sheet_manager.h"
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "stdpch.h"
|
||||
|
||||
#include "action_handler_item.h"
|
||||
#include "action_handler.h"
|
||||
#include "nel/gui/action_handler.h"
|
||||
#include "interface_manager.h"
|
||||
#include "../sheet_manager.h"
|
||||
#include "dbctrl_sheet.h"
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "people_interraction.h"
|
||||
#include "nel/misc/algo.h"
|
||||
#include "nel/gui/interface_expr.h"
|
||||
#include "interface_link.h"
|
||||
#include "nel/gui/interface_link.h"
|
||||
#include "../client_chat_manager.h"
|
||||
#include "../motion/user_controls.h"
|
||||
#include "../entity_cl.h"
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#define NL_ACTION_HANDLER_MISC_H
|
||||
|
||||
#include "nel/misc/types_nl.h"
|
||||
#include "action_handler.h"
|
||||
#include "nel/gui/action_handler.h"
|
||||
#include "interface_manager.h"
|
||||
|
||||
class CInterfaceGroup;
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
using namespace std;
|
||||
using namespace NLMISC;
|
||||
|
||||
#include "action_handler.h"
|
||||
#include "nel/gui/action_handler.h"
|
||||
#include "../motion/user_controls.h"
|
||||
#include "../view.h"
|
||||
#include "../misc.h"
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
// Interface includes
|
||||
#include "interface_manager.h"
|
||||
#include "action_handler.h"
|
||||
#include "nel/gui/action_handler.h"
|
||||
#include "action_handler_tools.h"
|
||||
#include "game_share/outpost.h"
|
||||
#include "nel/gui/interface_expr.h"
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "stdpch.h"
|
||||
|
||||
|
||||
#include "action_handler.h"
|
||||
#include "nel/gui/action_handler.h"
|
||||
#include "../motion/user_controls.h"
|
||||
#include "../view.h"
|
||||
#include "../misc.h"
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
// Interface includes
|
||||
#include "interface_manager.h"
|
||||
#include "action_handler.h"
|
||||
#include "nel/gui/action_handler.h"
|
||||
#include "../net_manager.h"
|
||||
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
// Interface
|
||||
#include "interface_manager.h"
|
||||
#include "bot_chat_manager.h"
|
||||
#include "action_handler.h"
|
||||
#include "nel/gui/action_handler.h"
|
||||
#include "group_container.h"
|
||||
#include "macrocmd_manager.h"
|
||||
#include "chat_window.h"
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "interface_manager.h"
|
||||
#include "../sheet_manager.h"
|
||||
#include "inventory_manager.h"
|
||||
#include "action_handler.h"
|
||||
#include "nel/gui/action_handler.h"
|
||||
#include "../client_cfg.h"
|
||||
#include "ctrl_base_button.h"
|
||||
#include "group_container.h"
|
||||
|
|
|
@ -20,11 +20,11 @@
|
|||
#include "bot_chat_manager.h"
|
||||
#include "bot_chat_page.h"
|
||||
#include "../net_manager.h"
|
||||
#include "action_handler.h"
|
||||
#include "nel/gui/action_handler.h"
|
||||
#include "../user_entity.h"
|
||||
#include "interface_manager.h"
|
||||
#include "view_text_id.h"
|
||||
#include "interface_group.h"
|
||||
#include "nel/gui/interface_group.h"
|
||||
#include "game_share/prerequisit_infos.h"
|
||||
|
||||
using namespace std;
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "stdpch.h"
|
||||
#include "bot_chat_page.h"
|
||||
#include "interface_manager.h"
|
||||
#include "interface_group.h"
|
||||
#include "nel/gui/interface_group.h"
|
||||
#include "../user_entity.h"
|
||||
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
#include "bot_chat_page_create_guild.h"
|
||||
#include "interface_manager.h"
|
||||
#include "guild_manager.h"
|
||||
#include "interface_group.h"
|
||||
#include "action_handler.h"
|
||||
#include "nel/gui/interface_group.h"
|
||||
#include "nel/gui/action_handler.h"
|
||||
#include "group_editbox.h"
|
||||
#include "dbctrl_sheet.h"
|
||||
#include "bot_chat_manager.h"
|
||||
|
|
|
@ -19,9 +19,9 @@
|
|||
#include "stdpch.h"
|
||||
#include "bot_chat_page_dynamic_mission.h"
|
||||
#include "interface_manager.h"
|
||||
#include "interface_group.h"
|
||||
#include "nel/gui/interface_group.h"
|
||||
#include "../string_manager_client.h"
|
||||
#include "action_handler.h"
|
||||
#include "nel/gui/action_handler.h"
|
||||
#include "dbgroup_combo_box.h"
|
||||
#include "bot_chat_page_all.h"
|
||||
#include "bot_chat_manager.h"
|
||||
|
|
|
@ -19,11 +19,11 @@
|
|||
#include "stdpch.h"
|
||||
#include "bot_chat_page_mission.h"
|
||||
#include "interface_manager.h"
|
||||
#include "interface_group.h"
|
||||
#include "nel/gui/interface_group.h"
|
||||
#include "bot_chat_manager.h"
|
||||
#include "bot_chat_page_all.h"
|
||||
#include "dbgroup_list_sheet_trade.h"
|
||||
#include "action_handler.h"
|
||||
#include "nel/gui/action_handler.h"
|
||||
#include "group_container.h"
|
||||
#include "dbctrl_sheet.h"
|
||||
#include "view_text_id.h"
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "stdpch.h"
|
||||
#include "bot_chat_page_mission_end.h"
|
||||
#include "interface_manager.h"
|
||||
#include "interface_group.h"
|
||||
#include "nel/gui/interface_group.h"
|
||||
#include "bot_chat_manager.h"
|
||||
#include "interface_manager.h"
|
||||
#include "../client_cfg.h"
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "stdpch.h"
|
||||
#include "bot_chat_page_news.h"
|
||||
#include "interface_manager.h"
|
||||
#include "interface_group.h"
|
||||
#include "nel/gui/interface_group.h"
|
||||
|
||||
static const char *WIN_BOT_CHAT_PAGE_NEWS = "ui:interface:bot_chat_news";
|
||||
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
#include "stdpch.h"
|
||||
#include "bot_chat_page_player_gift.h"
|
||||
#include "interface_manager.h"
|
||||
#include "interface_group.h"
|
||||
#include "action_handler.h"
|
||||
#include "nel/gui/interface_group.h"
|
||||
#include "nel/gui/action_handler.h"
|
||||
#include "../net_manager.h"
|
||||
#include "bot_chat_manager.h"
|
||||
#include "bot_chat_page_all.h"
|
||||
|
|
|
@ -27,10 +27,10 @@
|
|||
//
|
||||
#include "bot_chat_page_trade.h"
|
||||
#include "interface_manager.h"
|
||||
#include "interface_group.h"
|
||||
#include "nel/gui/interface_group.h"
|
||||
#include "inventory_manager.h"
|
||||
#include "../net_manager.h"
|
||||
#include "action_handler.h"
|
||||
#include "nel/gui/action_handler.h"
|
||||
#include "bot_chat_page_all.h"
|
||||
#include "bot_chat_manager.h"
|
||||
#include "dbctrl_sheet.h"
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
#include "game_share/character_summary.h"
|
||||
#include "game_share/slot_types.h"
|
||||
#include "nel/3d/u_skeleton.h"
|
||||
#include "interface_options.h"
|
||||
#include "nel/gui/interface_options.h"
|
||||
#include "interface_options_ryzom.h"
|
||||
#include "interface_element.h"
|
||||
#include "nel/gui/interface_element.h"
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include "group_editbox.h"
|
||||
#include "group_tab.h"
|
||||
#include "interface_manager.h"
|
||||
#include "action_handler.h"
|
||||
#include "nel/gui/action_handler.h"
|
||||
#include "../client_chat_manager.h"
|
||||
//
|
||||
#include "../session_browser_impl.h"
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
#ifndef NL_CTRL_BASE_BUTTON_H
|
||||
#define NL_CTRL_BASE_BUTTON_H
|
||||
|
||||
#include "ctrl_base.h"
|
||||
#include "action_handler.h"
|
||||
#include "nel/gui/ctrl_base.h"
|
||||
#include "nel/gui/action_handler.h"
|
||||
|
||||
|
||||
// ***************************************************************************
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#define RZ_CTRL_COL_PICK_H
|
||||
|
||||
#include "nel/misc/types_nl.h"
|
||||
#include "ctrl_base.h"
|
||||
#include "nel/gui/ctrl_base.h"
|
||||
|
||||
/**
|
||||
* Class handling a Color Picker
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#ifndef RZ_CTRL_POLYGON_H
|
||||
#define RZ_CTRL_POLYGON_H
|
||||
|
||||
#include "ctrl_base.h"
|
||||
#include "nel/gui/ctrl_base.h"
|
||||
#include "nel/gui/view_renderer.h"
|
||||
#include "nel/misc/geom_ext.h"
|
||||
#include "nel/misc/polygon.h"
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
#include "stdpch.h"
|
||||
#include "ctrl_quad.h"
|
||||
#include "interface_group.h"
|
||||
#include "nel/gui/interface_group.h"
|
||||
#include "interface_manager.h"
|
||||
|
||||
using namespace NLMISC;
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#ifndef RZ_CTRL_QUAD_H
|
||||
#define RZ_CTRL_QUAD_H
|
||||
|
||||
#include "ctrl_base.h"
|
||||
#include "nel/gui/ctrl_base.h"
|
||||
#include "nel/gui/view_renderer.h"
|
||||
#include "nel/misc/geom_ext.h"
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
|
||||
#include "interface_manager.h"
|
||||
#include "widget_manager.h"
|
||||
#include "nel/gui/widget_manager.h"
|
||||
#include "ctrl_scroll.h"
|
||||
#include "nel/misc/xml_auto_ptr.h"
|
||||
#include "group_menu.h"
|
||||
|
@ -908,7 +908,7 @@ int CCtrlScroll::luaEnsureVisible(CLuaState &ls)
|
|||
{
|
||||
const char *funcName = "ensureVisible";
|
||||
CLuaIHM::checkArgCount(ls, funcName, 3);
|
||||
CLuaIHMRyzom::checkArgTypeUIElement(ls, funcName, 1);
|
||||
CLuaIHM::checkArgTypeUIElement(ls, funcName, 1);
|
||||
CLuaIHM::checkArgType(ls, funcName, 2, LUA_TSTRING);
|
||||
CLuaIHM::checkArgType(ls, funcName, 3, LUA_TSTRING);
|
||||
THotSpot hs[2];
|
||||
|
@ -959,7 +959,7 @@ int CCtrlScroll::luaEnsureVisible(CLuaState &ls)
|
|||
}
|
||||
}
|
||||
}
|
||||
ensureVisible(CLuaIHMRyzom::getUIOnStack(ls, 1), hs[0], hs[1]);
|
||||
ensureVisible(CLuaIHM::getUIOnStack(ls, 1), hs[0], hs[1]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#define RZ_CTRL_SCROLL_H
|
||||
|
||||
#include "nel/misc/types_nl.h"
|
||||
#include "ctrl_scroll_base.h"
|
||||
#include "nel/gui/ctrl_scroll_base.h"
|
||||
|
||||
/**
|
||||
* Class handling scollbar function
|
||||
|
|
|
@ -549,7 +549,7 @@ int CCtrlTextButton::luaGetViewText(CLuaState &ls)
|
|||
{
|
||||
const char *funcName = "getViewText";
|
||||
CLuaIHM::checkArgCount(ls, funcName, 0);
|
||||
CLuaIHMRyzom::pushUIOnStack(ls, getViewText());
|
||||
CLuaIHM::pushUIOnStack(ls, getViewText());
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#ifndef RZ_CTRL_TOOLTIP_H
|
||||
#define RZ_CTRL_TOOLTIP_H
|
||||
|
||||
#include "ctrl_base.h"
|
||||
#include "nel/gui/ctrl_base.h"
|
||||
#include "nel/3d/u_texture.h"
|
||||
|
||||
namespace NLGUI
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include "game_share/inventories.h"
|
||||
#include "list_sheet_base.h"
|
||||
#include "../string_manager_client.h"
|
||||
#include "interface_options.h"
|
||||
#include "nel/gui/interface_options.h"
|
||||
#include "inventory_manager.h"
|
||||
#include "skill_manager.h"
|
||||
#include "../user_entity.h"
|
||||
|
@ -130,7 +130,7 @@ ucstring CControlSheetTooltipInfoWaiter::infoValidated(CDBCtrlSheet* ctrlSheet,
|
|||
// ***************************************************************************
|
||||
int CDBCtrlSheet::luaGetDraggedSheet(CLuaState &ls)
|
||||
{
|
||||
CLuaIHMRyzom::pushUIOnStack(ls, dynamic_cast<CInterfaceElement *>( dynamic_cast< CDBCtrlSheet* >( CCtrlDraggable::getDraggedSheet() ) ));
|
||||
CLuaIHM::pushUIOnStack(ls, dynamic_cast<CInterfaceElement *>( dynamic_cast< CDBCtrlSheet* >( CCtrlDraggable::getDraggedSheet() ) ));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,9 +24,9 @@
|
|||
#include "nel/misc/smart_ptr.h"
|
||||
// client
|
||||
#include "nel/gui/reflect.h"
|
||||
#include "ctrl_draggable.h"
|
||||
#include "nel/gui/ctrl_draggable.h"
|
||||
#include "nel/gui/interface_expr.h"
|
||||
#include "action_handler.h"
|
||||
#include "nel/gui/action_handler.h"
|
||||
#include "sphrase_manager.h"
|
||||
// game share
|
||||
#include "game_share/brick_types.h"
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#define NL_DBGROUP_BUILD_PHRASE_H
|
||||
|
||||
#include "nel/misc/types_nl.h"
|
||||
#include "interface_group.h"
|
||||
#include "nel/gui/interface_group.h"
|
||||
#include "game_share/sphrase_com.h"
|
||||
#include "game_share/brick_types.h"
|
||||
#include "game_share/skills.h"
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "nel/misc/xml_auto_ptr.h"
|
||||
#include "interface_manager.h"
|
||||
#include "ctrl_button.h"
|
||||
#include "action_handler.h"
|
||||
#include "nel/gui/action_handler.h"
|
||||
#include "nel/gui/lua_ihm.h"
|
||||
|
||||
#include "nel/gui/lua_ihm.h"
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#define NL_DBGROUP_COMBO_BOX_H
|
||||
|
||||
#include "nel/misc/types_nl.h"
|
||||
#include "interface_group.h"
|
||||
#include "nel/gui/interface_group.h"
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include "ctrl_button.h"
|
||||
#include "nel/gui/interface_property.h"
|
||||
#include "interface_manager.h"
|
||||
#include "action_handler.h"
|
||||
#include "nel/gui/action_handler.h"
|
||||
#include "../sheet_manager.h"
|
||||
#include "game_share/animal_status.h"
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include "../sheet_manager.h"
|
||||
#include "ctrl_button.h"
|
||||
#include "view_text.h"
|
||||
#include "action_handler.h"
|
||||
#include "nel/gui/action_handler.h"
|
||||
#include "../time_client.h"
|
||||
#include "game_share/animal_status.h"
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include "../sheet_manager.h"
|
||||
#include "ctrl_button.h"
|
||||
#include "view_text.h"
|
||||
#include "action_handler.h"
|
||||
#include "nel/gui/action_handler.h"
|
||||
#include "sphrase_manager.h"
|
||||
#include "game_share/time_weather_season/time_and_season.h"
|
||||
#include "game_share/pvp_clan.h"
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "ctrl_button.h"
|
||||
#include "nel/gui/interface_property.h"
|
||||
#include "interface_manager.h"
|
||||
#include "action_handler.h"
|
||||
#include "nel/gui/action_handler.h"
|
||||
|
||||
|
||||
using namespace std;
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#define NL_DBGROUP_SELECT_NUMBER_H
|
||||
|
||||
#include "nel/misc/types_nl.h"
|
||||
#include "interface_group.h"
|
||||
#include "nel/gui/interface_group.h"
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#include "nel/misc/types_nl.h"
|
||||
|
||||
#include "view_base.h"
|
||||
#include "nel/gui/view_base.h"
|
||||
|
||||
|
||||
// ***************************************************************************
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include "group_career.h"
|
||||
#include "interface_manager.h"
|
||||
#include "interface_element.h"
|
||||
#include "nel/gui/interface_element.h"
|
||||
|
||||
//#include "game_share/jobs.h"
|
||||
#include "nel/misc/xml_auto_ptr.h"
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "group_compas.h"
|
||||
#include "interface_3d_scene.h"
|
||||
#include "../entities.h"
|
||||
#include "action_handler.h"
|
||||
#include "nel/gui/action_handler.h"
|
||||
#include "group_map.h"
|
||||
#include "../continent.h"
|
||||
#include "../continent_manager.h"
|
||||
|
|
|
@ -21,10 +21,10 @@
|
|||
|
||||
#include "group_container.h"
|
||||
#include "interface_manager.h"
|
||||
#include "interface_options.h"
|
||||
#include "nel/gui/interface_options.h"
|
||||
#include "interface_options_ryzom.h"
|
||||
#include "nel/misc/xml_auto_ptr.h"
|
||||
#include "action_handler.h"
|
||||
#include "nel/gui/action_handler.h"
|
||||
#include "../time_client.h"
|
||||
#include "group_editbox.h"
|
||||
#include "view_text_formated.h"
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
#ifndef RZ_GROUP_CONTAINER_H
|
||||
#define RZ_GROUP_CONTAINER_H
|
||||
|
||||
#include "interface_group.h"
|
||||
#include "group_container_base.h"
|
||||
#include "nel/gui/interface_group.h"
|
||||
#include "nel/gui/group_container_base.h"
|
||||
#include "nel/misc/smart_ptr.h"
|
||||
|
||||
namespace NLGUI
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include "nel/misc/command.h"
|
||||
#include "view_text.h"
|
||||
#include "nel/misc/xml_auto_ptr.h"
|
||||
#include "interface_options.h"
|
||||
#include "nel/gui/interface_options.h"
|
||||
#include "dbctrl_sheet.h"
|
||||
#include "group_container.h"
|
||||
#include "../time_client.h"
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
#ifndef RZ_CTRL_EDITBOX_H
|
||||
#define RZ_CTRL_EDITBOX_H
|
||||
|
||||
#include "interface_group.h"
|
||||
#include "group_editbox_base.h"
|
||||
#include "nel/gui/interface_group.h"
|
||||
#include "nel/gui/group_editbox_base.h"
|
||||
#include "nel/3d/u_texture.h"
|
||||
|
||||
namespace NLGUI
|
||||
|
|
|
@ -36,7 +36,7 @@ extern "C"
|
|||
#include "ctrl_button.h"
|
||||
#include "dbctrl_sheet.h"
|
||||
#include "ctrl_text_button.h"
|
||||
#include "action_handler.h"
|
||||
#include "nel/gui/action_handler.h"
|
||||
#include "group_paragraph.h"
|
||||
#include "group_editbox.h"
|
||||
#include "interface_manager.h"
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include <curl/curl.h>
|
||||
|
||||
#include "nel/misc/types_nl.h"
|
||||
#include "interface_group.h"
|
||||
#include "nel/gui/interface_group.h"
|
||||
#include "group_scrolltext.h"
|
||||
#include "group_tree.h"
|
||||
#include "ctrl_button.h"
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include "interface_manager.h"
|
||||
#include "skill_manager.h"
|
||||
#include "../character_cl.h"
|
||||
#include "action_handler.h"
|
||||
#include "nel/gui/action_handler.h"
|
||||
#include "../entities.h"
|
||||
#include "group_paragraph.h" // For CCtrlLink
|
||||
#include "../net_manager.h"
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "interface_manager.h"
|
||||
#include "view_bitmap.h"
|
||||
#include "group_in_scene_user_info.h"
|
||||
#include "action_handler.h"
|
||||
#include "nel/gui/action_handler.h"
|
||||
#include "../entities.h"
|
||||
#include "../user_entity.h"
|
||||
#include "../forage_source_cl.h"
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include "group_list.h"
|
||||
#include "interface_manager.h"
|
||||
#include "interface_element.h"
|
||||
#include "nel/gui/interface_element.h"
|
||||
#include "../client_chat_manager.h"
|
||||
#include "view_bitmap.h"
|
||||
#include "view_text_id.h"
|
||||
|
@ -915,7 +915,7 @@ sint32 CGroupList::getElementIndex(CViewBase* child) const
|
|||
int CGroupList::luaGetElementIndex(CLuaState &ls)
|
||||
{
|
||||
CLuaIHM::checkArgCount(ls, "getElementIndex", 1);
|
||||
CViewBase * viewBase = dynamic_cast<CViewBase *>(CLuaIHMRyzom::getUIOnStack(ls, 1));
|
||||
CViewBase * viewBase = dynamic_cast<CViewBase *>(CLuaIHM::getUIOnStack(ls, 1));
|
||||
ls.push((double) getElementIndex(viewBase));
|
||||
return 1;
|
||||
}
|
||||
|
@ -967,7 +967,7 @@ void CGroupList::swapChildren(uint index1, uint index2)
|
|||
int CGroupList::luaUpChild(CLuaState &ls)
|
||||
{
|
||||
CLuaIHM::checkArgCount(ls, "upChild", 1);
|
||||
CViewBase * viewBase = dynamic_cast<CViewBase *>(CLuaIHMRyzom::getUIOnStack(ls, 1));
|
||||
CViewBase * viewBase = dynamic_cast<CViewBase *>(CLuaIHM::getUIOnStack(ls, 1));
|
||||
sint32 indexUpChild = getElementIndex(viewBase);
|
||||
if(indexUpChild > 0)
|
||||
{
|
||||
|
@ -980,7 +980,7 @@ int CGroupList::luaUpChild(CLuaState &ls)
|
|||
int CGroupList::luaDownChild(CLuaState &ls)
|
||||
{
|
||||
CLuaIHM::checkArgCount(ls, "downChild", 1);
|
||||
CViewBase * viewBase = dynamic_cast<CViewBase *>(CLuaIHMRyzom::getUIOnStack(ls, 1));
|
||||
CViewBase * viewBase = dynamic_cast<CViewBase *>(CLuaIHM::getUIOnStack(ls, 1));
|
||||
sint32 indexDownChild = getElementIndex(viewBase);
|
||||
if(indexDownChild < (sint32) (_Elements.size()-1))
|
||||
{
|
||||
|
@ -1001,7 +1001,7 @@ int CGroupList::luaGetChild(CLuaState &ls)
|
|||
CLuaIHM::fails(ls, "getChild : trying to access element %d in list '%s', which has %d elements",
|
||||
index, getId().c_str(), (int) _Elements.size());
|
||||
}
|
||||
CLuaIHMRyzom::pushUIOnStack(ls, getChild((uint) index));
|
||||
CLuaIHM::pushUIOnStack(ls, getChild((uint) index));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -1090,7 +1090,7 @@ int CGroupList::luaAddChild(CLuaState &ls)
|
|||
{
|
||||
const char *funcName = "addChild";
|
||||
CLuaIHM::checkArgCount(ls, funcName, 1);
|
||||
CViewBase *vb = dynamic_cast<CViewBase *>(CLuaIHMRyzom::getUIOnStack(ls, 1));
|
||||
CViewBase *vb = dynamic_cast<CViewBase *>(CLuaIHM::getUIOnStack(ls, 1));
|
||||
if (!vb)
|
||||
{
|
||||
CLuaIHM::fails(ls, "%s requires a view, group or control", funcName);
|
||||
|
@ -1108,7 +1108,7 @@ int CGroupList::luaAddChildAtIndex(CLuaState &ls)
|
|||
const char *funcName = "addChildAtIndex";
|
||||
CLuaIHM::checkArgCount(ls, funcName, 2);
|
||||
CLuaIHM::checkArgType(ls, funcName, 2, LUA_TNUMBER);
|
||||
CViewBase *vb = dynamic_cast<CViewBase *>(CLuaIHMRyzom::getUIOnStack(ls, 1));
|
||||
CViewBase *vb = dynamic_cast<CViewBase *>(CLuaIHM::getUIOnStack(ls, 1));
|
||||
if (!vb)
|
||||
{
|
||||
CLuaIHM::fails(ls, "%s requires a view, group or control", funcName);
|
||||
|
@ -1125,7 +1125,7 @@ int CGroupList::luaDetachChild(CLuaState &ls)
|
|||
{
|
||||
const char *funcName = "detachChild";
|
||||
CLuaIHM::checkArgCount(ls, funcName, 1);
|
||||
CViewBase *vb = dynamic_cast<CViewBase *>(CLuaIHMRyzom::getUIOnStack(ls, 1));
|
||||
CViewBase *vb = dynamic_cast<CViewBase *>(CLuaIHM::getUIOnStack(ls, 1));
|
||||
if (!vb)
|
||||
{
|
||||
nlwarning("%s requires a view, group or control", funcName);
|
||||
|
@ -1142,7 +1142,7 @@ int CGroupList::luaDetachChild(CLuaState &ls)
|
|||
int CGroupList::luaDelChild(CLuaState &ls)
|
||||
{
|
||||
CLuaIHM::checkArgCount(ls, "CGroupList::delChild", 1);
|
||||
CViewBase *vb = dynamic_cast<CViewBase *>(CLuaIHMRyzom::getUIOnStack(ls, 1));
|
||||
CViewBase *vb = dynamic_cast<CViewBase *>(CLuaIHM::getUIOnStack(ls, 1));
|
||||
if (vb) delChild(vb);
|
||||
updateCoords();
|
||||
return 0;
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#define NL_GROUP_LIST_H
|
||||
|
||||
#include "nel/misc/types_nl.h"
|
||||
#include "group_frame.h"
|
||||
#include "nel/gui/group_frame.h"
|
||||
#include "view_text.h"
|
||||
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include "group_editbox.h"
|
||||
#include "../string_manager_client.h"
|
||||
#include "group_container.h"
|
||||
#include "action_handler.h"
|
||||
#include "nel/gui/action_handler.h"
|
||||
#include "../dummy_progress.h"
|
||||
#include "group_compas.h"
|
||||
#include "../connection.h"
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
#include "../client_sheets/world_sheet.h"
|
||||
|
||||
#include "interface_group.h"
|
||||
#include "nel/gui/interface_group.h"
|
||||
#include "ctrl_button.h"
|
||||
#include "view_bitmap.h"
|
||||
#include "view_text.h"
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "group_menu.h"
|
||||
#include "nel/misc/xml_auto_ptr.h"
|
||||
#include "view_bitmap.h"
|
||||
#include "action_handler.h" // Just for getAllParams
|
||||
#include "nel/gui/action_handler.h" // Just for getAllParams
|
||||
#include "nel/gui/lua_ihm.h"
|
||||
#include "lua_ihm_ryzom.h"
|
||||
|
||||
|
@ -1693,7 +1693,7 @@ int CGroupSubMenu::luaGetSubMenu(CLuaState &ls)
|
|||
const char *funcName = "getSubMenu";
|
||||
CLuaIHM::checkArgCount(ls, funcName, 1);
|
||||
CLuaIHM::checkArgType(ls, funcName, 1, LUA_TNUMBER);
|
||||
CLuaIHMRyzom::pushUIOnStack(ls, getSubMenu((uint) ls.toNumber(1)));
|
||||
CLuaIHM::pushUIOnStack(ls, getSubMenu((uint) ls.toNumber(1)));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -1704,7 +1704,7 @@ int CGroupSubMenu::luaAddSubMenu(CLuaState &ls)
|
|||
CLuaIHM::checkArgCount(ls, funcName, 1);
|
||||
CLuaIHM::checkArgType(ls, funcName, 1, LUA_TNUMBER);
|
||||
setSubMenu((uint) ls.toNumber(1), new CGroupSubMenu(CViewText::TCtorParam()));
|
||||
CLuaIHMRyzom::pushUIOnStack(ls, getSubMenu((uint) ls.toNumber(1)));
|
||||
CLuaIHM::pushUIOnStack(ls, getSubMenu((uint) ls.toNumber(1)));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -1804,11 +1804,11 @@ int CGroupSubMenu::luaSetUserGroupRight(CLuaState &ls)
|
|||
const char *funcName = "setUserGroupRight";
|
||||
CLuaIHM::checkArgCount(ls, funcName, 2);
|
||||
CLuaIHM::checkArgType(ls, funcName, 1, LUA_TNUMBER);
|
||||
if (!(CLuaIHMRyzom::isUIOnStack(ls, 2) || ls.isNil(2)))
|
||||
if (!(CLuaIHM::isUIOnStack(ls, 2) || ls.isNil(2)))
|
||||
{
|
||||
CLuaIHM::fails(ls, "%s : Group required as argument 2", funcName);
|
||||
}
|
||||
CInterfaceElement *el = CLuaIHMRyzom::getUIOnStack(ls, 2);
|
||||
CInterfaceElement *el = CLuaIHM::getUIOnStack(ls, 2);
|
||||
CInterfaceGroup *group = dynamic_cast<CInterfaceGroup *>(el);
|
||||
if (el && !group)
|
||||
{
|
||||
|
@ -1824,11 +1824,11 @@ int CGroupSubMenu::luaSetUserGroupLeft(CLuaState &ls)
|
|||
const char *funcName = "setUserGroupLeft";
|
||||
CLuaIHM::checkArgCount(ls, funcName, 2);
|
||||
CLuaIHM::checkArgType(ls, funcName, 1, LUA_TNUMBER);
|
||||
if (!(CLuaIHMRyzom::isUIOnStack(ls, 2) || ls.isNil(2)))
|
||||
if (!(CLuaIHM::isUIOnStack(ls, 2) || ls.isNil(2)))
|
||||
{
|
||||
CLuaIHM::fails(ls, "%s : Group required as argument 2", funcName);
|
||||
}
|
||||
CInterfaceElement *el = CLuaIHMRyzom::getUIOnStack(ls, 2);
|
||||
CInterfaceElement *el = CLuaIHM::getUIOnStack(ls, 2);
|
||||
CInterfaceGroup *group = dynamic_cast<CInterfaceGroup *>(el);
|
||||
if (el && !group)
|
||||
{
|
||||
|
@ -1845,7 +1845,7 @@ int CGroupSubMenu::luaGetUserGroupRight(CLuaState &ls)
|
|||
const char *funcName = "getUserGroupRight";
|
||||
CLuaIHM::checkArgCount(ls, funcName, 1);
|
||||
CLuaIHM::checkArgType(ls, funcName, 1, LUA_TNUMBER);
|
||||
CLuaIHMRyzom::pushUIOnStack(ls, getUserGroupRight((uint) ls.toNumber(1)));
|
||||
CLuaIHM::pushUIOnStack(ls, getUserGroupRight((uint) ls.toNumber(1)));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -1859,7 +1859,7 @@ int CGroupSubMenu::luaGetUserGroupLeft(CLuaState &ls)
|
|||
CInterfaceElement *pIE = getUserGroupLeft((uint) ls.toNumber(1));
|
||||
if (pIE)
|
||||
{
|
||||
CLuaIHMRyzom::pushUIOnStack(ls, pIE);
|
||||
CLuaIHM::pushUIOnStack(ls, pIE);
|
||||
return 1;
|
||||
}
|
||||
else return 0;
|
||||
|
@ -2282,7 +2282,7 @@ void CGroupMenu::setUserGroupLeft(uint line, CInterfaceGroup *gr, bool ownerShip
|
|||
int CGroupMenu::luaGetRootMenu(CLuaState &ls)
|
||||
{
|
||||
CLuaIHM::checkArgCount(ls, "getRootMenu", 0);
|
||||
CLuaIHMRyzom::pushUIOnStack(ls, getRootMenu());
|
||||
CLuaIHM::pushUIOnStack(ls, getRootMenu());
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
#ifndef RZ_GROUP_MENU_H
|
||||
#define RZ_GROUP_MENU_H
|
||||
|
||||
#include "interface_group.h"
|
||||
#include "group_modal.h"
|
||||
#include "nel/gui/interface_group.h"
|
||||
#include "nel/gui/group_modal.h"
|
||||
#include "view_text.h"
|
||||
|
||||
#include "ctrl_text_button.h"
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue