mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-25 05:34:27 +00:00
GRAPHICS: MACGUI: Adding style to menu items
This commit is contained in:
parent
e4d17f881c
commit
9b3ca6498e
@ -565,8 +565,8 @@ void MacMenu::createSubMenuFromString(int id, const char *str, int commandId) {
|
||||
}
|
||||
}
|
||||
|
||||
const Font *MacMenu::getMenuFont() {
|
||||
return _wm->_fontMan->getFont(Graphics::MacFont(kMacFontChicago, 12));
|
||||
const Font *MacMenu::getMenuFont(int slant) {
|
||||
return _wm->_fontMan->getFont(Graphics::MacFont(kMacFontChicago, 12, slant));
|
||||
}
|
||||
|
||||
const Common::String MacMenu::getAcceleratorString(MacMenuItem *item, const char *prefix) {
|
||||
@ -802,7 +802,9 @@ bool MacMenu::draw(ManagedSurface *g, bool forceRedraw) {
|
||||
_font->drawString(&_screen, it->unicodeText, x, y, it->bbox.width(), color);
|
||||
underlineAccelerator(&_screen, _font, it->unicodeText, x, y, it->shortcutPos, color);
|
||||
} else {
|
||||
_font->drawString(&_screen, it->text, x, y, it->bbox.width(), color);
|
||||
const Font *font = getMenuFont(it->style);
|
||||
|
||||
font->drawString(&_screen, it->text, x, y, it->bbox.width(), color);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
#define GRAPHICS_MACGUI_MACMENU_H
|
||||
|
||||
#include "common/str-array.h"
|
||||
#include "graphics/macgui/macfontmanager.h"
|
||||
|
||||
namespace Common {
|
||||
class U32String;
|
||||
@ -93,7 +94,7 @@ private:
|
||||
|
||||
private:
|
||||
bool checkCallback(bool unicode = false);
|
||||
const Font *getMenuFont();
|
||||
const Font *getMenuFont(int slant = kMacFontRegular);
|
||||
const Common::String getAcceleratorString(MacMenuItem *item, const char *prefix);
|
||||
void processTabs();
|
||||
void processSubmenuTabs(MacMenuSubMenu *submenu);
|
||||
|
Loading…
x
Reference in New Issue
Block a user