本文整理汇总了C++中common::ArchiveMemberPtr::getDisplayName方法的典型用法代码示例。如果您正苦于以下问题:C++ ArchiveMemberPtr::getDisplayName方法的具体用法?C++ ArchiveMemberPtr::getDisplayName怎么用?C++ ArchiveMemberPtr::getDisplayName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类common::ArchiveMemberPtr
的用法示例。
在下文中一共展示了ArchiveMemberPtr::getDisplayName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: init
/**********************************************************
* Theme setup/initialization
*********************************************************/
bool ThemeEngine::init() {
// reset everything and reload the graphics
_initOk = false;
_overlayFormat = _system->getOverlayFormat();
setGraphicsMode(_graphicsMode);
if (_screen.pixels && _backBuffer.pixels) {
_initOk = true;
}
// TODO: Instead of hard coding the font here, it should be possible
// to specify the fonts to be used for each resolution in the theme XML.
if (_screen.w >= 400 && _screen.h >= 300) {
_font = FontMan.getFontByUsage(Graphics::FontManager::kBigGUIFont);
} else {
_font = FontMan.getFontByUsage(Graphics::FontManager::kGUIFont);
}
// Try to create a Common::Archive with the files of the theme.
if (!_themeArchive && !_themeFile.empty()) {
Common::FSNode node(_themeFile);
if (node.isDirectory()) {
_themeArchive = new Common::FSDirectory(node);
} else if (_themeFile.matchString("*.zip", true)) {
// TODO: Also use "node" directly?
// Look for the zip file via SearchMan
Common::ArchiveMemberPtr member = SearchMan.getMember(_themeFile);
if (member) {
_themeArchive = Common::makeZipArchive(member->createReadStream());
if (!_themeArchive) {
warning("Failed to open Zip archive '%s'.", member->getDisplayName().c_str());
}
} else {
_themeArchive = Common::makeZipArchive(node);
if (!_themeArchive) {
warning("Failed to open Zip archive '%s'.", node.getPath().c_str());
}
}
}
}
// Load the theme
// We pass the theme file here by default, so the user will
// have a descriptive error message. The only exception will
// be the builtin theme which has no filename.
loadTheme(_themeFile.empty() ? _themeId : _themeFile);
return ready();
}