Small Fixes
I've had a look at some of the recent changes, great to see so much progress.
This branch adds some very minor fixes for things I noticed:
**Typo**
Fixed typo in the menu (the string is not yet part of the translation files)
**Screenshot viewer controls**
In analogy to the maplist and serverlist, I've added the possibility to open screenshots with LMB and space.
**Arc notification**
The arc kill notification still uses the hlac image, I've updated it
**Slider direction**
Currently, mousewheeldown and the PgDn key move the slider up, while
mousewheelup and the PgUp key move the slider down.
This doesn't make sense, so I've inverted the controls.
**Scrollbar thumb minimum height**
The scrollbar image is subdivided into 3 segments with a ratio of 1:2:1.
While the middle segment is intended to be stretched, the outer segments are not.
The current minimum height for the scrollbar thumb is 1*width, causing the thumb to be cut off, as seen in the advanced settings dialog.
I've changed the minimum height to fully include all "unstretchable" segments.
![minfactor](https://gitlab.com/uploads/xonotic/xonotic-data.pk3dir/
402cf3bdc2/minfactor.png)
See merge request !52
MSG_INFO_NOTIF(1, INFO_WATERMARK, 1, 0, "s1", "", "", _("^F3SVQC Build information: ^F4%s"), "") \
MSG_INFO_NOTIF(1, INFO_WEAPON_ACCORDEON_MURDER, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "weapontuba", _("^BG%s%s^K1 died of ^BG%s^K1's great playing on the @!#%%'n Accordeon%s%s"), "") \
MSG_INFO_NOTIF(1, INFO_WEAPON_ACCORDEON_SUICIDE, 2, 1, "s1 s2loc spree_lost", "s1", "weapontuba", _("^BG%s^K1 hurt their own ears with the @!#%%'n Accordeon%s%s"), "") \
- MSG_INFO_NOTIF(1, INFO_WEAPON_ARC_MURDER, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "weaponhlac", _("^BG%s%s^K1 was electrocuted by ^BG%s^K1's Arc%s%s"), "") \
+ MSG_INFO_NOTIF(1, INFO_WEAPON_ARC_MURDER, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "weaponarc", _("^BG%s%s^K1 was electrocuted by ^BG%s^K1's Arc%s%s"), "") \
MSG_INFO_NOTIF(1, INFO_WEAPON_BLASTER_MURDER, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "weaponlaser", _("^BG%s%s^K1 was shot to death by ^BG%s^K1's Blaster%s%s"), "") \
MSG_INFO_NOTIF(1, INFO_WEAPON_BLASTER_SUICIDE, 2, 1, "s1 s2loc spree_lost", "s1", "weaponlaser", _("^BG%s^K1 shot themself to hell with their Blaster%s%s"), "") \
MSG_INFO_NOTIF(1, INFO_WEAPON_CRYLINK_MURDER, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "weaponcrylink", _("^BG%s%s^K1 felt the strong pull of ^BG%s^K1's Crylink%s%s"), "") \
me.controlBottom = min((me.scrollPos + 1) / me.getTotalHeight(me), 1);
float minfactor;
- minfactor = 1 * me.controlWidth / me.size_y * me.size_x;
+ minfactor = 2 * me.controlWidth / me.size_y * me.size_x;
f = me.controlBottom - me.controlTop;
if(f < minfactor) // FIXME good default?
{
if(me.disabled)
return 0;
inRange = (almost_in_bounds(me.valueMin, me.value, me.valueMax));
- if(key == K_LEFTARROW || key == K_KP_LEFTARROW || key == K_MWHEELUP)
+ if(key == K_LEFTARROW || key == K_KP_LEFTARROW || key == K_MWHEELDOWN)
{
if(inRange)
me.setValue(me, median(me.valueMin, me.value - me.valueKeyStep, me.valueMax));
me.setValue(me, me.valueMax);
return 1;
}
- if(key == K_RIGHTARROW || key == K_KP_RIGHTARROW || key == K_MWHEELDOWN)
+ if(key == K_RIGHTARROW || key == K_KP_RIGHTARROW || key == K_MWHEELUP)
{
if(inRange)
me.setValue(me, median(me.valueMin, me.value + me.valueKeyStep, me.valueMax));
me.setValue(me, me.valueMin);
return 1;
}
- if(key == K_PGUP || key == K_KP_PGUP)
+ if(key == K_PGDN || key == K_KP_PGDN)
{
if(inRange)
me.setValue(me, median(me.valueMin, me.value - me.valuePageStep, me.valueMax));
me.setValue(me, me.valueMax);
return 1;
}
- if(key == K_PGDN || key == K_KP_PGDN)
+ if(key == K_PGUP || key == K_KP_PGUP)
{
if(inRange)
me.setValue(me, median(me.valueMin, me.value + me.valuePageStep, me.valueMax));
me.TR(me);
me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_simple_items", _("Use simple 2D images instead of item models")));
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Unvailable alpha:")));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Unavailable alpha:")));
me.TD(me, 1, 2, e = makeXonoticSlider(0, 1, 0.1, "cl_ghost_items"));
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Unavailable color:")));
float XonoticScreenshotList_keyDown(entity me, float scan, float ascii, float shift)
{
- if(scan == K_ENTER || scan == K_KP_ENTER) {
+ if(scan == K_ENTER || scan == K_KP_ENTER || scan == K_MOUSE2 || scan == K_SPACE) {
me.startScreenshot(me);
return 1;
}