}
}
AUTOCVAR(menu_scroll_averaging_time, float, 0.16, "smooth scroll averaging time");
-// scroll faster while dragging the scrollbar
+ // scroll faster while dragging the scrollbar
AUTOCVAR(menu_scroll_averaging_time_pressed, float, 0.06, "smooth scroll averaging time when dragging the scrollbar");
void ListBox_draw(entity me)
{
if (me.scrollPos != me.scrollPosTarget)
{
float averaging_time = (me.pressed == 1)
- ? autocvar_menu_scroll_averaging_time_pressed
+ ? autocvar_menu_scroll_averaging_time_pressed
: autocvar_menu_scroll_averaging_time;
// this formula works with whatever framerate
float f = averaging_time ? exp(-frametime / averaging_time) : 0;
me.itemAbsSize = '0 0 0';
SUPER(XonoticCampaignList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
- me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize.y * me.itemHeight));
- me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize.x * (1 - me.controlWidth)));
+ me.itemAbsSize.y = absSize.y * me.itemHeight;
+ me.itemAbsSize.x = absSize.x * (1 - me.controlWidth);
+ me.realFontSize.y = me.fontSize / me.itemAbsSize.y;
+ me.realFontSize.x = me.fontSize / me.itemAbsSize.x;
me.realUpperMargin1 = 0.5 * me.realFontSize.y;
me.realUpperMargin2 = me.realUpperMargin1 + 2 * me.realFontSize.y;
me.itemAbsSize = '0 0 0';
SUPER(XonoticDemoList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
- me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize.y * me.itemHeight));
- me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize.x * (1 - me.controlWidth)));
+ me.itemAbsSize.y = absSize.y * me.itemHeight;
+ me.itemAbsSize.x = absSize.x * (1 - me.controlWidth);
+ me.realFontSize.y = me.fontSize / me.itemAbsSize.y;
+ me.realFontSize.x = me.fontSize / me.itemAbsSize.x;
me.realUpperMargin = 0.5 * (1 - me.realFontSize.y);
me.columnNameOrigin = me.realFontSize.x;
me.itemAbsSize = '0 0 0';
SUPER(XonoticGametypeList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
- me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize.y * me.itemHeight));
- me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize.x * (1 - me.controlWidth)));
+ me.itemAbsSize.y = absSize.y * me.itemHeight;
+ me.itemAbsSize.x = absSize.x * (1 - me.controlWidth);
+ me.realFontSize.y = me.fontSize / me.itemAbsSize.y;
+ me.realFontSize.x = me.fontSize / me.itemAbsSize.x;
me.realUpperMargin = 0.5 * (1 - me.realFontSize.y);
me.columnIconOrigin = 0;
me.columnIconSize = me.itemAbsSize.y / me.itemAbsSize.x;
me.itemAbsSize = '0 0 0';
SUPER(XonoticHUDSkinList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
- me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize.y * me.itemHeight));
- me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize.x * (1 - me.controlWidth)));
+ me.itemAbsSize.y = absSize.y * me.itemHeight;
+ me.itemAbsSize.x = absSize.x * (1 - me.controlWidth);
+ me.realFontSize.y = me.fontSize / me.itemAbsSize.y;
+ me.realFontSize.x = me.fontSize / me.itemAbsSize.x;
me.realUpperMargin = 0.5 * (1 - me.realFontSize.y);
me.columnNameOrigin = me.realFontSize.x;
me.itemAbsSize = '0 0 0';
SUPER(XonoticMapList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
- me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize.y * me.itemHeight));
- me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize.x * (1 - me.controlWidth)));
+ me.itemAbsSize.y = absSize.y * me.itemHeight;
+ me.itemAbsSize.x = absSize.x * (1 - me.controlWidth);
+ me.realFontSize.y = me.fontSize / me.itemAbsSize.y;
+ me.realFontSize.x = me.fontSize / me.itemAbsSize.x;
me.realUpperMargin1 = 0.5 * (1 - 2.5 * me.realFontSize.y);
me.realUpperMargin2 = me.realUpperMargin1 + 1.5 * me.realFontSize.y;
me.itemAbsSize = '0 0 0';
SUPER(XonoticPlayerList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
- me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize.y * me.itemHeight));
- me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize.x * (1 - me.controlWidth)));
+ me.itemAbsSize.y = absSize.y * me.itemHeight;
+ me.itemAbsSize.x = absSize.x * (1 - me.controlWidth);
+ me.realFontSize.y = me.fontSize / me.itemAbsSize.y;
+ me.realFontSize.x = me.fontSize / me.itemAbsSize.x;
me.realUpperMargin = 0.5 * (1 - me.realFontSize.y);
// this list does 1 char left and right margin
me.itemAbsSize = '0 0 0';
SUPER(XonoticPlayList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
- me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize.y * me.itemHeight));
- me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize.x * (1 - me.controlWidth)));
+ me.itemAbsSize.y = absSize.y * me.itemHeight;
+ me.itemAbsSize.x = absSize.x * (1 - me.controlWidth);
+ me.realFontSize.y = me.fontSize / me.itemAbsSize.y;
+ me.realFontSize.x = me.fontSize / me.itemAbsSize.x;
me.realUpperMargin = 0.5 * (1 - me.realFontSize.y);
me.columnNumberOrigin = 0;
me.itemAbsSize = '0 0 0';
SUPER(XonoticScreenshotList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
- me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize.y * me.itemHeight));
- me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize.x * (1 - me.controlWidth)));
+ me.itemAbsSize.y = absSize.y * me.itemHeight;
+ me.itemAbsSize.x = absSize.x * (1 - me.controlWidth);
+ me.realFontSize.y = me.fontSize / me.itemAbsSize.y;
+ me.realFontSize.x = me.fontSize / me.itemAbsSize.x;
me.realUpperMargin = 0.5 * (1 - me.realFontSize.y);
me.columnNameOrigin = me.realFontSize.x;
me.itemAbsSize = '0 0 0';
SUPER(XonoticSkinList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
- me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize.y * me.itemHeight));
- me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize.x * (1 - me.controlWidth)));
+ me.itemAbsSize.y = absSize.y * me.itemHeight;
+ me.itemAbsSize.x = absSize.x * (1 - me.controlWidth);
+ me.realFontSize.y = me.fontSize / me.itemAbsSize.y;
+ me.realFontSize.x = me.fontSize / me.itemAbsSize.x;
me.realUpperMargin1 = 0.5 * (1 - 2.5 * me.realFontSize.y);
me.realUpperMargin2 = me.realUpperMargin1 + 1.5 * me.realFontSize.y;
me.itemAbsSize = '0 0 0';
SUPER(XonoticSoundList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
- me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize.y * me.itemHeight));
- me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize.x * (1 - me.controlWidth)));
+ me.itemAbsSize.y = absSize.y * me.itemHeight;
+ me.itemAbsSize.x = absSize.x * (1 - me.controlWidth);
+ me.realFontSize.y = me.fontSize / me.itemAbsSize.y;
+ me.realFontSize.x = me.fontSize / me.itemAbsSize.x;
me.realUpperMargin = 0.5 * (1 - me.realFontSize.y);
me.columnNumberOrigin = 0;
me.itemAbsSize = '0 0 0';
SUPER(XonoticStatsList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
- me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize.y * me.itemHeight));
- me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize.x * (1 - me.controlWidth)));
+ me.itemAbsSize.y = absSize.y * me.itemHeight;
+ me.itemAbsSize.x = absSize.x * (1 - me.controlWidth);
+ me.realFontSize.y = me.fontSize / me.itemAbsSize.y;
+ me.realFontSize.x = me.fontSize / me.itemAbsSize.x;
me.realUpperMargin = 0.5 * (1 - me.realFontSize.y);
#if 0