// charmap
ALPHA_CHARMAP_CHAR 0.85
COLOR_CHARMAP_CHAR '1 1 1'
-ALPHA_CHARMAP_FOCUS 0.85
-COLOR_CHARMAP_FOCUS '0.09 0.42 0.69'
// checkbox
COLOR_CHECKBOX_C '1 1 1'
ALPHA_LISTBOX_WAITING 0.8
COLOR_LISTBOX_WAITING '0.73 0.82 0.9'
ALPHA_LISTBOX_FOCUSED 0.8
-FADEALPHA_LISTBOX_FOCUSED 0.2
+FADEALPHA_LISTBOX_FOCUSED 0.4
COLOR_LISTBOX_FOCUSED '0.09 0.42 0.69'
// mainmenu
// item: player name editor
SKINVECTOR(COLOR_CHARMAP_CHAR, '1 1 1');
SKINFLOAT(ALPHA_CHARMAP_CHAR, 1);
- SKINVECTOR(COLOR_CHARMAP_FOCUS, '0 0 1');
- SKINFLOAT(ALPHA_CHARMAP_FOCUS, 0.5);
// item: radio button
SKINSTRING(GFX_RADIOBUTTON, "radiobutton");
ATTRIB(XonoticCharmap, realFontSize, vector, '0 0 0')
ATTRIB(XonoticCharmap, realCellSize, vector, '0 0 0')
ATTRIB(XonoticCharmap, focusedCell, vector, '-1 -1 0')
+ ATTRIB(XonoticCharmap, focusedCellTime, float, 0)
ATTRIB(XonoticCharmap, pressedCell, vector, '-1 -1 0')
ENDCLASS(XonoticCharmap)
entity makeXonoticCharmap(entity controlledInputBox);
float XonoticCharmap_mouseMove(entity me, vector coords)
{
+ vector prevFocusedCell = me.focusedCell;
me.focusedCell_x = floor(coords.x * CHARMAP_COLS);
me.focusedCell_y = floor(coords.y * CHARMAP_ROWS);
return 0;
}
+ if(me.focusedCell != prevFocusedCell)
+ me.focusedCellTime = time;
+
return 1;
}
{
cellPos_x = mod(me.focusedCell.x, CHARMAP_COLS) / CHARMAP_COLS;
cellPos_y = mod(me.focusedCell.y, CHARMAP_ROWS) / CHARMAP_ROWS;
- draw_Fill(cellPos, me.realCellSize, SKINCOLOR_CHARMAP_FOCUS, SKINALPHA_CHARMAP_FOCUS);
+ draw_Fill(cellPos, me.realCellSize, SKINCOLOR_LISTBOX_FOCUSED, getHighlightAlpha(SKINALPHA_LISTBOX_FOCUSED, SKINFADEALPHA_LISTBOX_FOCUSED, me.focusedCellTime));
}
}