Slicky
02-05-2014 15:49:10
I enjoy using MyGui in windows.
I am going to try playing with a native Android application.
A few questions:
(1) Is there an Android demo?
(2) What would it take to get MyGui working on Android?
Any help appreciated.
libolt
13-05-2014 17:07:20
I am interested in Android support as well. I have gotten everything to compile / link but my game crashes when initializing MyGUI.
longer
05-06-2014 04:46:55
Crash initializing MyGUI.It‘s a bug.OgreDataManager isDataExist always return false.MyGUI
can not location any resource.
fix here simple.
bool OgreDataManager::isDataExist(const std::string& _name)
{
const VectorString& files = getDataListNames(_name);
return !files.empty();
}
to
bool OgreDataManager::isDataExist(const std::string& _name)
{
VectorString search;
if (mAllGroups)
{
Ogre::StringVector sp = Ogre::ResourceGroupManager::getSingleton().getResourceGroups();
search.reserve(sp.size());
//VectorString type and Ogre::StringVector some time is not the same.
for (Ogre::StringVector::iterator it = sp.begin();
it!=sp.end();it++)
{
search.push_back(*it);
}
}
else
{
search.push_back(mGroup);
}
bool isFind(false);
for (VectorString::iterator it=search.begin();
it!=search.end();it++)
{
isFind=Ogre::ResourceGroupManager::getSingleton().resourceExists(*it,_name);
if (isFind)
{
break;
}
}
return isFind;
//const VectorString& files = getDataListNames(_name);
//return !files.empty();
}
or fix here.
const VectorString& OgreDataManager::getDataListNames(const std::string& _pattern, bool _fullpath)
for (size_t i = 0; i < pFileInfos.size(); i++)
{
Ogre::FileInfoListPtr pFileInfo = pFileInfos[i];
for (Ogre::FileInfoList::iterator fi = pFileInfo->begin(); fi != pFileInfo->end(); ++fi )
{
if (fi->path.empty())
{
bool found = false;
for (VectorString::iterator iter = result.begin(); iter != result.end(); ++iter)
{
if (*iter == fi->filename)
{
found = true;
break;
}
}
if (!found)
{
result.push_back(_fullpath ? fi->archive->getName() + "/" + fi->filename : fi->filename);
}
}
}
pFileInfo.setNull();
}
to
for (size_t i = 0; i < pFileInfos.size(); i++)
{
Ogre::FileInfoListPtr pFileInfo = pFileInfos[i];
for (Ogre::FileInfoList::iterator fi = pFileInfo->begin(); fi != pFileInfo->end(); ++fi )
{
//if (fi->path.empty()) ////[color=#FF0000]at here[/color]
{
bool found = false;
for (VectorString::iterator iter = result.begin(); iter != result.end(); ++iter)
{
if (*iter == fi->filename)
{
found = true;
break;
}
}
if (!found)
{
result.push_back(_fullpath ? fi->archive->getName() + "/" + fi->filename : fi->filename);
}
}
}
pFileInfo.setNull();
}
look this.
http://www.ogre3d.org/addonforums/viewtopic.php?f=17&t=30146
libolt
03-07-2014 19:25:08
Thanks for the info. I have patched MyGUI and recompiled everything. It appears to be loading the MyGUI files now. However, my Main Menu gui does not display. I am not seeing anything in the Android log that points to an error.
Thanks
libolt
10-07-2014 17:40:32
Longer:
Did you have to do anything else special to get gui elements to display? Everything works fine for me on linux and Windows but android Doesn’t display anything. I have checked logcat and everything appears to be read from the apk fine.
libolt
10-07-2014 19:17:32