]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'sev/small_fixes' into 'master'
authorMario <zacjardine@y7mail.com>
Sun, 14 Dec 2014 22:27:34 +0000 (22:27 +0000)
committerMario <zacjardine@y7mail.com>
Sun, 14 Dec 2014 22:27:34 +0000 (22:27 +0000)
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

qcsrc/common/notifications.qh
qcsrc/menu/item/listbox.c
qcsrc/menu/item/slider.c
qcsrc/menu/xonotic/dialog_settings_game_model.c
qcsrc/menu/xonotic/screenshotlist.c

index d8988110061db98c86a6b23ae89f3581226635c5..35a2aebd814b198243939c603beca8707a8f7f2d 100644 (file)
@@ -501,7 +501,7 @@ void Send_Notification_WOCOVA(
     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"), "") \
index 0f9502d97f022bb7c434da93aa4c6cf219e25df3..d4eaab2a7b8277e51866df26756550f5c6378c8c 100644 (file)
@@ -309,7 +309,7 @@ void ListBox_updateControlTopBottom(entity me)
                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?
                {
index b071a1af34109ebe4c6adb536abda42d82b859d8..c92db27e984f84be22a86ff2ae8049d190c3d478 100644 (file)
@@ -104,7 +104,7 @@ float Slider_keyDown(entity me, float key, float ascii, float shift)
        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));
@@ -112,7 +112,7 @@ float Slider_keyDown(entity me, float key, float ascii, float shift)
                        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));
@@ -120,7 +120,7 @@ float Slider_keyDown(entity me, float key, float ascii, float shift)
                        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));
@@ -128,7 +128,7 @@ float Slider_keyDown(entity me, float key, float ascii, float shift)
                        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));
index e7f68180b37566808f0bb88bbe54e5dad7b3161a..0e93378e7d784cb1dc584f17aeb0b489eca62840 100644 (file)
@@ -40,7 +40,7 @@ void XonoticGameModelSettingsTab_fill(entity me)
        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:")));
index e073c7235d25a165abaa53569cb7d268026dccf4..dd8b61ed3f97fc942a456ef2799939c1f9e17f2a 100644 (file)
@@ -296,7 +296,7 @@ void XonoticScreenshotList_clickListBoxItem(entity me, float i, vector where)
 
 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;
        }