]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/cvarlist.c
Merge remote-tracking branch 'origin/master' into divVerent/simplified-sound-sliders
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / cvarlist.c
index 4d36c92581b277b338afbc05982d88cac6012f96..52f1a1f26e7890d18da2c2a4257749815605e9d9 100644 (file)
@@ -35,6 +35,7 @@ entity makeXonoticCvarList();
 void CvarList_Filter_Change(entity box, entity me);
 void CvarList_Value_Change(entity box, entity me);
 void CvarList_Revert_Click(entity btn, entity me);
+void CvarList_End_Editing(entity box, entity me);
 #endif
 
 #ifdef IMPLEMENTATION
@@ -165,7 +166,10 @@ float XonoticCvarList_keyDown(entity me, float scan, float ascii, float shift)
                return 1;
        }
        else if(scan == K_ENTER)
+       {
                me.cvarValueBox.parent.setFocus(me.cvarValueBox.parent, me.cvarValueBox);
+               return 1;
+       }
        else if(SUPER(XonoticCvarList).keyDown(me, scan, ascii, shift))
                return 1;
        else if(!me.controlledTextbox)
@@ -192,4 +196,9 @@ void CvarList_Revert_Click(entity btn, entity me)
        me.cvarValueBox.cursorPos = strlen(me.cvarDefault);
 }
 
+void CvarList_End_Editing(entity box, entity me)
+{
+       box.parent.setFocus(box.parent, me);
+}
+
 #endif