[Scummvm-git-logs] scummvm master -> 417e9767b96f62ca5c1a070c086dd23b34f38573
bluegr
bluegr at gmail.com
Tue Oct 27 08:19:40 UTC 2020
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
417e9767b9 SCI: Add RTL support in GfxControls16::drawListControl
Commit: 417e9767b96f62ca5c1a070c086dd23b34f38573
https://github.com/scummvm/scummvm/commit/417e9767b96f62ca5c1a070c086dd23b34f38573
Author: Zvika Haramaty (haramaty.zvika at gmail.com)
Date: 2020-10-27T10:19:36+02:00
Commit Message:
SCI: Add RTL support in GfxControls16::drawListControl
When using original save/load screens, the games list wasn't properl
aligned, if contained Hebrew text. Fixed by calling the BiDi algorithm
in drawListControl.
Changed paths:
engines/sci/graphics/controls16.cpp
diff --git a/engines/sci/graphics/controls16.cpp b/engines/sci/graphics/controls16.cpp
index 3ca06978e2..a192556079 100644
--- a/engines/sci/graphics/controls16.cpp
+++ b/engines/sci/graphics/controls16.cpp
@@ -23,6 +23,7 @@
#include "common/util.h"
#include "common/stack.h"
#include "common/system.h"
+#include "common/unicode-bidi.h"
#include "graphics/primitives.h"
#include "sci/sci.h"
@@ -92,8 +93,12 @@ void GfxControls16::drawListControl(Common::Rect rect, reg_t obj, int16 maxChars
_paint16->eraseRect(workerRect);
const Common::String &listEntry = entries[i];
if (listEntry[0]) {
+ Common::String textString = listEntry;
+ if (g_sci->isLanguageRTL())
+ textString = Common::convertBiDiString(textString, g_sci->getLanguage());
+
_ports->moveTo(workerRect.left, workerRect.top);
- _text16->Draw(listEntry.c_str(), 0, MIN<int16>(maxChars, listEntry.size()), oldFontId, oldPenColor);
+ _text16->Draw(textString.c_str(), 0, MIN<int16>(maxChars, listEntry.size()), oldFontId, oldPenColor);
if ((!isAlias) && (i == cursorPos)) {
_paint16->invertRect(workerRect);
}
More information about the Scummvm-git-logs
mailing list