if(hud_configure)
{
+ float chatsize;
+ chatsize = cvar("con_chatsize");
cvar_set("con_chatrect_x", "9001"); // over 9000, we'll fake it instead for more control over alpha and such
- float i;
+ float i, a;
for(i = 0; i < cvar("con_chat"); ++i)
{
- drawcolorcodedstring(pos + eY * i * cvar("con_chatsize"), "^3Player^7: This is the chat area.", '1 1 0' * cvar("con_chatsize"), HUD_Panel_GetFgAlpha(id), DRAWFLAG_NORMAL);
+ if(i == cvar("con_chat") - 1)
+ a = HUD_Panel_GetFgAlpha(id);
+ else
+ a = HUD_Panel_GetFgAlpha(id) * floor(((i + 1) * 7 + cvar("con_chattime"))/45);
+ drawcolorcodedstring(pos + eY * i * chatsize, textShortenToWidth("^3Player^7: This is the chat area.", mySize_x, '1 1 0' * chatsize, stringwidth_colors), '1 1 0' * chatsize, a, DRAWFLAG_NORMAL);
}
}
}
me.TD(me, 1, 2, e = makeXonoticTextLabel(0, "Background Alpha:"));
me.TD(me, 1, 2, e = makeXonoticSlider(0, 1, 0.01, "hud_chat_bg_alpha"));
me.TR(me);
+ me.TR(me);
+ me.TD(me, 1, 2, e = makeXonoticTextLabel(0, "Font size:"));
+ me.TD(me, 1, 2, e = makeXonoticSlider(6, 16, 1, "con_chatsize"));
+ me.TR(me);
+ me.TD(me, 1, 2, e = makeXonoticTextLabel(0, "Message lifetime:"));
+ me.TD(me, 1, 2, e = makeXonoticSlider(16, 40, 2, "con_chattime"));
+ me.TR(me);
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "con_chatsound", "Message sound beep"));
//me.gotoRC(me, me.rows - 1, 0);
//me.TD(me, 1, me.columns, e = makeXonoticCommandButton("Exit Setup", '0 0 0', "_hud_configure 0", 1));
}
me.TR(me);
me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_notify_flip", "Flip"));
me.TR(me);
- me.TD(me, 1, 2, e = makeXonoticTextLabel(0, "Msg lifetime:"));
+ me.TD(me, 1, 2, e = makeXonoticTextLabel(0, "Message lifetime:"));
me.TD(me, 1, 2, e = makeXonoticSlider(3, 15, 1, "hud_notify_time"));
me.TR(me);
- me.TD(me, 1, 2, e = makeXonoticTextLabel(0, "Msg fadetime:"));
+ me.TD(me, 1, 2, e = makeXonoticTextLabel(0, "Message fadetime:"));
me.TD(me, 1, 2, e = makeXonoticSlider(1, 5, 1, "hud_notify_fadetime"));
me.TR(me);
me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_notify_print", "Also print messages to console"));