seta hud_panel_racesplits_bg_padding "" "if set to something else than \"\" = override default padding of contents from border"
seta hud_panel_racesplits_lines "" "amount of lines to show, max 50, font size will adapt accordingly"
seta hud_panel_racesplits_flip "" "order the list top to bottom instead of bottom to top"
-seta hud_panel_racesplits_align "" "text alignment: 0 left, 1 right"
+seta hud_panel_racesplits_align "" "text alignment: 0 left, 0.5 center, 1 right"
seta hud_panel_vote_pos "" "position of this base of the panel"
seta hud_panel_vote_size "" "size of this panel"
{
getWrappedLine_remaining = s;
float offset = 0;
+ float align = bound(0, autocvar_hud_panel_racesplits_align, 1);
while(getWrappedLine_remaining)
{
s = getWrappedLine(sz.x - offset, fontsize, stringwidth_colors);
if(autocvar_hud_panel_racesplits_align)
- offset = sz.x - stringwidth_colors(s, fontsize) - offset;
+ offset = (sz.x - stringwidth_colors(s, fontsize) - offset) * align;
drawcolorcodedstring(pos + eX * offset, s, fontsize, a, DRAWFLAG_NORMAL);
pos.y += fontsize.y;
offset = fontsize.x;
me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("Race Splits:")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 3.8, e = makeXonoticCheckBox(0, "hud_panel_racesplits_align", _("Align right")));
+ me.TD(me, 1, 3.8/4, e = makeXonoticTextLabel(0, _("Align:")));
+ me.TD(me, 1, 3.8/4, e = makeXonoticRadioButton(3, "hud_panel_racesplits_align", "0", _("Left")));
+ me.TD(me, 1, 3.8/4, e = makeXonoticRadioButton(3, "hud_panel_racesplits_align", "0.5", _("Center")));
+ me.TD(me, 1, 3.8/4, e = makeXonoticRadioButton(3, "hud_panel_racesplits_align", "1", _("Right")));
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 3.8, e = makeXonoticCheckBox(0, "hud_panel_racesplits_flip", _("Flip splits order")));