[Scummvm-git-logs] scummvm master -> fa9b0e9983b7e4071e57419017e7b14e5891e4e7
sev-
sev at scummvm.org
Fri Feb 7 18:22:04 UTC 2020
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
9b3ca6498e GRAPHICS: MACGUI: Adding style to menu items
fa9b0e9983 DIRECTOR: Proper check for script presense in the movie text
Commit: 9b3ca6498ea9ccb27c9ba3464347afdab62ced6f
https://github.com/scummvm/scummvm/commit/9b3ca6498ea9ccb27c9ba3464347afdab62ced6f
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-02-07T19:21:47+01:00
Commit Message:
GRAPHICS: MACGUI: Adding style to menu items
Changed paths:
graphics/macgui/macmenu.cpp
graphics/macgui/macmenu.h
diff --git a/graphics/macgui/macmenu.cpp b/graphics/macgui/macmenu.cpp
index b79ba8cf..ed8cf40 100644
--- a/graphics/macgui/macmenu.cpp
+++ b/graphics/macgui/macmenu.cpp
@@ -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);
}
}
diff --git a/graphics/macgui/macmenu.h b/graphics/macgui/macmenu.h
index 13d374d..42eb2f3 100644
--- a/graphics/macgui/macmenu.h
+++ b/graphics/macgui/macmenu.h
@@ -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);
Commit: fa9b0e9983b7e4071e57419017e7b14e5891e4e7
https://github.com/scummvm/scummvm/commit/fa9b0e9983b7e4071e57419017e7b14e5891e4e7
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-02-07T19:21:47+01:00
Commit Message:
DIRECTOR: Proper check for script presense in the movie text
Changed paths:
engines/director/score.cpp
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index 59f704a..603a399 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -1053,6 +1053,13 @@ void Score::loadScriptText(Common::SeekableSubReadStreamEndian &stream) {
if (script.empty() || !script.hasPrefix("--"))
return;
+ int pos = 2;
+ while (script[pos] == ' ' || script[pos] == '\t')
+ pos++;
+
+ if (script[pos] != '\n')
+ return;
+
if (ConfMan.getBool("dump_scripts"))
dumpScript(script.c_str(), kMovieScript, _movieScriptCount);
More information about the Scummvm-git-logs
mailing list