]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/item/nexposee.c
get rid of some dead code
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / item / nexposee.c
index c9232b192d62b3d40b97cb460288f8cd4deb6a67..304bf1dd241c053fa707c13a39898f4a0377fcbf 100644 (file)
@@ -35,6 +35,7 @@ void ExposeeCloseButton_Click(entity button, entity other); // un-exposees the c
 #ifdef IMPLEMENTATION
 
 .vector Nexposee_initialSize;
+.vector Nexposee_initialFontScale;
 .vector Nexposee_initialOrigin;
 .float Nexposee_initialAlpha;
 
@@ -61,7 +62,7 @@ void ExposeeCloseButton_Click(entity button, entity other)
 void Nexposee_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
 {
        me.calc(me);
-       me.resizeNotifyLie(me, relOrigin, relSize, absOrigin, absSize, Nexposee_initialOrigin, Nexposee_initialSize);
+       me.resizeNotifyLie(me, relOrigin, relSize, absOrigin, absSize, Nexposee_initialOrigin, Nexposee_initialSize, Nexposee_initialFontScale);
 }
 
 void Nexposee_Calc_Scale(entity me, float scale)
@@ -141,14 +142,13 @@ void Nexposee_draw(entity me)
        float a0;
        entity e;
        float f;
+       vector fs;
 
        if(me.animationState == -1)
        {
                me.animationState = 0;
        }
 
-       //print(ftos(me.animationState), "\n");
-
        f = min(1, frametime * 5);
        switch(me.animationState)
        {
@@ -203,7 +203,9 @@ void Nexposee_draw(entity me)
                }
                me.setAlphaOf(me, e, e.Container_alpha * (1 - f) + a * f);
 
-               e.Container_fontscale = globalToBoxSize(e.Container_size, e.Nexposee_initialSize);
+               fs = globalToBoxSize(e.Container_size, e.Nexposee_initialSize);
+               e.Container_fontscale_x = fs_x * e.Nexposee_initialFontScale_x;
+               e.Container_fontscale_y = fs_y * e.Nexposee_initialFontScale_y;
        }
 
        SUPER(Nexposee).draw(me);
@@ -305,7 +307,7 @@ float Nexposee_keyDown(entity me, float scan, float ascii, float shift)
        {
                case 0:
                case 3:
-                       nexposeeKey = ((scan == K_SPACE) || (scan == K_ENTER));
+                       nexposeeKey = ((scan == K_SPACE) || (scan == K_ENTER) || (scan == K_KP_ENTER));
                        break;
                case 1:
                case 2:
@@ -338,9 +340,12 @@ float Nexposee_keyDown(entity me, float scan, float ascii, float shift)
 void Nexposee_addItem(entity me, entity other, vector theOrigin, vector theSize, float theAlpha)
 {
        SUPER(Nexposee).addItem(me, other, theOrigin, theSize, theAlpha);
+       other.Nexposee_initialFontScale = other.Container_fontscale;
        other.Nexposee_initialSize = other.Container_size;
        other.Nexposee_initialOrigin = other.Container_origin;
        other.Nexposee_initialAlpha = other.Container_alpha;
+       if(other.Nexposee_initialFontScale == '0 0 0')
+               other.Nexposee_initialFontScale = '1 1 0';
 }
 
 void Nexposee_focusEnter(entity me)