mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-26 04:35:16 +00:00
GRAPHICS: MACGUI: Added debug printout for MacMenu
This commit is contained in:
parent
a49fd0dd5e
commit
6dee083352
@ -276,9 +276,33 @@ MacMenu *MacMenu::createMenuFromPEexe(Common::PEResources &exe, MacWindowManager
|
||||
}
|
||||
}
|
||||
delete menuData;
|
||||
|
||||
menu->printMenu();
|
||||
|
||||
return menu;
|
||||
}
|
||||
|
||||
void MacMenu::printMenu(int level, MacMenuSubMenu *submenu) {
|
||||
if (!level) {
|
||||
for (int i = 0; i < _items.size(); i++) {
|
||||
debug("%s", _items[i]->unicode ? convertFromU32String(_items[i]->unicodeName).c_str() : _items[i]->name.c_str());
|
||||
|
||||
if (_items[i]->submenu != nullptr)
|
||||
printMenu(level + 1, _items[i]->submenu);
|
||||
}
|
||||
} else {
|
||||
for (int j = 0; j < level; j++)
|
||||
debugN(" ");
|
||||
|
||||
for (int i = 0; i < submenu->subitems.size(); i++) {
|
||||
debug("%s", submenu->subitems[i]->unicode ? convertFromU32String(submenu->subitems[i]->unicodeText).c_str() : submenu->subitems[i]->text.c_str());
|
||||
|
||||
if (submenu->subitems[i]->submenu != nullptr)
|
||||
printMenu(level + 1, submenu->subitems[i]->submenu);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MacMenu::addStaticMenus(const MacMenuData *data) {
|
||||
MacMenuItem *about = new MacMenuItem(_wm->_fontMan->hasBuiltInFonts() ? "\xa9" : "\xf0"); // (c) Symbol as the most resembling apple
|
||||
_items.push_back(about);
|
||||
|
@ -107,6 +107,8 @@ private:
|
||||
|
||||
void drawSubMenuArrow(ManagedSurface *dst, int x, int y, int color);
|
||||
|
||||
void printMenu(int level = 0, MacMenuSubMenu *submenu = nullptr);
|
||||
|
||||
Common::Array<MacMenuItem *> _items;
|
||||
|
||||
const Font *_font;
|
||||
|
Loading…
x
Reference in New Issue
Block a user