X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fmenu%2Fitem%2Fnexposee.c;h=ca7ab8fc3785c479c27bee31ee099268a80a3659;hb=23ad6cc4775660c14ef42575146550887f44775e;hp=02f12242525835f1735029b0eda0365f03907faf;hpb=30cd3220d0370aa10dfb62eeb2ee3145d56b1c68;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/menu/item/nexposee.c b/qcsrc/menu/item/nexposee.c index 02f122425..ca7ab8fc3 100644 --- a/qcsrc/menu/item/nexposee.c +++ b/qcsrc/menu/item/nexposee.c @@ -92,7 +92,7 @@ void Nexposee_calc(entity me) float scale; entity e, e2; vector emins, emaxs, e2mins, e2maxs; - + for(scale = 0.7;; scale *= 0.99) { Nexposee_Calc_Scale(me, scale); @@ -228,7 +228,7 @@ float Nexposee_mousePress(entity me, vector pos) } else if(me.animationState == 2) { - if not(SUPER(Nexposee).mousePress(me, pos)) + if (!(SUPER(Nexposee).mousePress(me, pos))) { me.animationState = 3; SUPER(Nexposee).setFocus(me, NULL); @@ -263,7 +263,7 @@ float Nexposee_mouseMove(entity me, vector pos) if(me.animationState == 0) { if(me.mouseFocusedChild) - if(me.mouseFocusedChild != e) + if(me.mouseFocusedChild != e || me.mouseFocusedChild != me.selectedChild) me.selectedChild = me.mouseFocusedChild; return 1; } @@ -279,7 +279,7 @@ float Nexposee_keyUp(entity me, float scan, float ascii, float shift) float Nexposee_keyDown(entity me, float scan, float ascii, float shift) { - float nexposeeKey; + float nexposeeKey = 0; if(me.animationState == 2) if(SUPER(Nexposee).keyDown(me, scan, ascii, shift)) return 1; @@ -291,20 +291,21 @@ float Nexposee_keyDown(entity me, float scan, float ascii, float shift) { if(me.selectedChild) me.selectedChild = me.selectedChild.prevSibling; - if not(me.selectedChild) + if (!me.selectedChild) me.selectedChild = me.lastChild; } else { if(me.selectedChild) me.selectedChild = me.selectedChild.nextSibling; - if not(me.selectedChild) + if (!me.selectedChild) me.selectedChild = me.firstChild; } } } switch(me.animationState) { + default: case 0: case 3: nexposeeKey = ((scan == K_SPACE) || (scan == K_ENTER) || (scan == K_KP_ENTER)); @@ -318,6 +319,7 @@ float Nexposee_keyDown(entity me, float scan, float ascii, float shift) { switch(me.animationState) { + default: case 0: case 3: me.animationState = 1; @@ -329,7 +331,7 @@ float Nexposee_keyDown(entity me, float scan, float ascii, float shift) } if(me.focusedChild) me.selectedChild = me.focusedChild; - if not(me.selectedChild) + if (!me.selectedChild) me.animationState = 0; SUPER(Nexposee).setFocus(me, NULL); return 1;