Visual Studio 2013 compilation support for NLGUI

This commit is contained in:
kaetemi 2015-02-20 17:17:07 +01:00
parent 7c9b10912e
commit 9201b15650
7 changed files with 12 additions and 12 deletions

View file

@ -60,7 +60,7 @@ namespace NLGUI
void setText(uint i, const ucstring &text);
void insertText(uint i, const ucstring &text);
const ucstring &getText(uint i) const;
const uint &getTextId(uint i) const;
uint getTextId(uint i) const;
uint getTextPos(uint nId) const;
const ucstring &getTexture(uint i) const;
void removeText(uint nPos);

View file

@ -6,7 +6,7 @@ SOURCE_GROUP("src" FILES ${SRC})
NL_TARGET_LIB(nelgui ${SRC} ${HEADERS})
INCLUDE_DIRECTORIES(${LUA_INCLUDE_DIR} ${LUABIND_INCLUDE_DIR} ${LIBWWW_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${LUA_INCLUDE_DIR} ${LUABIND_INCLUDE_DIR} ${LIBWWW_INCLUDE_DIR} ${CURL_INCLUDE_DIRS})
TARGET_LINK_LIBRARIES(nelgui nelmisc nel3d ${LUA_LIBRARIES} ${LUABIND_LIBRARIES} ${LIBXML2_LIBRARIES} ${LIBWWW_LIBRARIES} ${CURL_LIBRARIES})
SET_TARGET_PROPERTIES(nelgui PROPERTIES LINK_INTERFACE_LIBRARIES "")

View file

@ -519,17 +519,17 @@ namespace NLGUI
// Read Action handlers
prop = (char*) xmlGetProp( node, (xmlChar*)"onscroll" );
if (prop) _AHOnScroll = NLMISC::strlwr(prop);
if (prop) _AHOnScroll = NLMISC::strlwr(prop.str());
prop = (char*) xmlGetProp( node, (xmlChar*)"params" );
if (prop) _AHOnScrollParams = string((const char*)prop);
//
prop = (char*) xmlGetProp( node, (xmlChar*)"onscrollend" );
if (prop) _AHOnScrollEnd = NLMISC::strlwr(prop);
if (prop) _AHOnScrollEnd = NLMISC::strlwr(prop.str());
prop = (char*) xmlGetProp( node, (xmlChar*)"end_params" );
if (prop) _AHOnScrollEndParams = string((const char*)prop);
//
prop = (char*) xmlGetProp( node, (xmlChar*)"onscrollcancel" );
if (prop) _AHOnScrollCancel = NLMISC::strlwr(prop);
if (prop) _AHOnScrollCancel = NLMISC::strlwr(prop.str());
prop = (char*) xmlGetProp( node, (xmlChar*)"cancel_params" );
if (prop) _AHOnScrollCancelParams = string((const char*)prop);
@ -538,9 +538,9 @@ namespace NLGUI
prop = (char*) xmlGetProp( node, (xmlChar*)"target" );
if (prop)
{
CInterfaceGroup *group = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId(prop));
CInterfaceGroup *group = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId(prop.str()));
if(group == NULL)
group = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId(this->getId(), prop));
group = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId(this->getId(), prop.str()));
if(group != NULL)
setTarget (group);

View file

@ -268,7 +268,7 @@ namespace NLGUI
void CDBGroupComboBox::addText(const ucstring &text)
{
dirt();
_Texts.push_back(make_pair(_Texts.size(), text));
_Texts.push_back(make_pair((uint)_Texts.size(), text));
_Textures.push_back(std::string());
}
@ -330,7 +330,7 @@ namespace NLGUI
}
// ***************************************************************************
const uint &CDBGroupComboBox::getTextId(uint i) const
uint CDBGroupComboBox::getTextId(uint i) const
{
static uint null = 0;
if(i<_Texts.size())

View file

@ -2200,7 +2200,7 @@ namespace NLGUI
if( editorMode )
_Extends = std::string( (const char*)prop );
CGroupMenu *gm = dynamic_cast<CGroupMenu *>(CWidgetManager::getInstance()->getElementFromId(prop));
CGroupMenu *gm = dynamic_cast<CGroupMenu *>(CWidgetManager::getInstance()->getElementFromId(prop.str()));
if (!gm)
{
gm = dynamic_cast<CGroupMenu *>(CWidgetManager::getInstance()->getElementFromId("ui:interface:" + std::string((const char*)prop)));

View file

@ -74,7 +74,7 @@ namespace NLGUI
}
//
if (!CInterfaceLink::splitLinkTargets (ptr, parentGroup, _Targets))
if (!CInterfaceLink::splitLinkTargets (ptr.str(), parentGroup, _Targets))
{
nlwarning ("no target for track");
return false;

View file

@ -1771,7 +1771,7 @@ namespace NLGUI
{
CInterfaceExprValue res;
if (CInterfaceExpr::eval(ptrVal2, res))
if (CInterfaceExpr::eval(ptrVal2.str(), res))
{
if (!res.toString())
{