UPDATES: Fix compilation with U32 strings

This commit is contained in:
Thierry Crozat 2020-08-18 21:41:32 +01:00 committed by Eugene Sandulenko
parent a9c5e930f0
commit a54b5826ea
4 changed files with 8 additions and 13 deletions

View file

@ -45,18 +45,18 @@ UpdatesDialog::UpdatesDialog() : Dialog(30, 20, 260, 124) {
int buttonWidth = g_gui.xmlEval()->getVar("Globals.Button.Width", 0);
int buttonHeight = g_gui.xmlEval()->getVar("Globals.Button.Height", 0);
const char *message = _(
Common::U32String message = _(
"ScummVM now supports automatic check for updates\n"
"which requires access to the Internet. Would you\n"
"like to enable this feature?");
const char *message2 = _("You can change this setting later in the Misc tab\n"
Common::U32String message2 = _("You can change this setting later in the Misc tab\n"
"in the Options dialog.");
// First, determine the size the dialog needs. For this we have to break
// down the string into lines, and taking the maximum of their widths.
// Using this, and accounting for the space the button(s) need, we can set
// the real size of the dialog
Common::Array<Common::String> lines, lines2;
Common::Array<Common::U32String> lines, lines2;
int maxlineWidth = g_gui.getFont().wordWrapText(message, screenW - 2 * 20, lines);
int maxlineWidth2 = g_gui.getFont().wordWrapText(message2, screenW - 2 * 20, lines2);
@ -83,7 +83,7 @@ UpdatesDialog::UpdatesDialog() : Dialog(30, 20, 260, 124) {
y += kLineHeight;
const char *updMessage = _("Update check:");
Common::U32String updMessage = _("Update check:");
int updatelineWidth = g_gui.getFont().getStringWidth(updMessage) + 5;