The language change warning message is now an unique string, removing a possible source of confusion for translators since the first part of the message ended with a coma
draw_fontscale = dfs;
- me.realOrigin_y = 0.5 * (1 - lines * me.realFontSize.y);
+ float text_height = lines * me.realFontSize.y;
+ if (lines > 1)
+ text_height += (lines - 1) * me.realFontSize.y * me.allowWrap_spacing;
+ me.realOrigin_y = 0.5 * (1 - text_height);
}
if (me.isBold) draw_endBoldFont();
if (me.allowColors) t = getWrappedLine((1 - me.keepspaceLeft - me.keepspaceRight), fs, draw_TextWidth_WithColors);
else t = getWrappedLine((1 - me.keepspaceLeft - me.keepspaceRight), fs, draw_TextWidth_WithoutColors);
draw_Text(o, t, fs, me.colorL, me.alpha, me.allowColors);
- o.y += me.realFontSize.y;
+ o.y += me.realFontSize.y * (1 + me.allowWrap_spacing);
}
}
else
ATTRIB(Label, disabled, float, 0);
ATTRIB(Label, disabledAlpha, float, 0.3);
ATTRIB(Label, textEntity, entity);
+ // if allowWrap is enabled text is wrapped on multiple lines and can't be condensed;
+ // lines are centered vertically and are allowed to extend outside the item box
+ // so there should be some free space above and below the item
ATTRIB(Label, allowWrap, float, 0);
+ ATTRIB(Label, allowWrap_spacing, float, 0);
ATTRIB(Label, recalcPos, float, 0);
ATTRIB(Label, condenseFactor, float, 1);
ATTRIB(Label, overrideRealOrigin, vector, '0 0 0');
me.TDempty(me, 1);
me.TD(me, 2, 4, e = makeXonoticTextLabel(0, _("Welcome to Xonotic, please select your language preference and enter your player name to get started. You can change these options later through the menu system.")));
e.allowWrap = 1;
+ e.allowWrap_spacing = 0.5;
me.TR(me);
me.TR(me);
{
entity e;
me.TR(me);
- me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("While connected language changes will be applied only to the menu,")));
+ me.TD(me, 2, 4, e = makeXonoticTextLabel(0,
+ _("While connected language changes will be applied only to the menu, full language changes will take effect starting from the next game")));
+ e.allowWrap = 1;
+ e.allowWrap_spacing = 0.5;
me.TR(me);
- me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("full language changes will take effect starting from the next game")));
me.TR(me);
me.TR(me);
// reconnect command doesn't work properly, otherwise it would replace disconnect
ATTRIB(XonoticLanguageWarningDialog, title, string, _("Warning"));
ATTRIB(XonoticLanguageWarningDialog, color, vector, SKINCOLOR_DIALOG_HUDCONFIRM);
ATTRIB(XonoticLanguageWarningDialog, intendedWidth, float, 0.6);
- ATTRIB(XonoticLanguageWarningDialog, rows, float, 5);
+ ATTRIB(XonoticLanguageWarningDialog, rows, float, 4);
ATTRIB(XonoticLanguageWarningDialog, columns, float, 4);
ENDCLASS(XonoticLanguageWarningDialog)