Mogre 1.6.2

Bostich

22-07-2009 22:44:50

Hi MyGui guys ;),

hope you can help me with this problem (think its the last one to get it compiled to be mogre 1.6.2 compatible)


public:
property Convert<const Ogre::UTFString &>::Type Caption
{
Convert<const Ogre::UTFString &>::Type get( )
{
MMYGUI_CHECK_NATIVE(mNative);
#####
//complains c2664: can not cast from const MyGUI::UString to const Ogre::UTFString (free translation ;) )
#####
return Convert<const Ogre::UTFString &>::To( static_cast<ThisType*>(mNative)->getCaption() );
}
void set(Convert<const Ogre::UTFString &>::Type _value)
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->setCaption( Convert<const Ogre::UTFString &>::From(_value) );
}
}

#####
//convert function (i guess^^)
#####
template <> struct Convert<const Ogre::UTFString&>
{
typedef System::String^ Type;
inline static System::String^ To(const Ogre::UTFString& _value) { return string_utility::utf16_to_managed(_value); }
inline static Ogre::UTFString From(System::String^ _value) { return string_utility::managed_to_utf16(_value); }
};



possible way to fix?

thank you, and thank you for a very great gui ;)

//bostich

//edit:
No ideas? thought it is simple for the c++ guys :)