ATTRIB(XonoticCvarList, columnValueOrigin, float, 0)
ATTRIB(XonoticCvarList, columnValueSize, float, 0)
+ METHOD(XonoticCvarList, mouseRelease, float(entity, vector))
METHOD(XonoticCvarList, setSelected, void(entity, float))
+
ATTRIB(XonoticCvarList, controlledTextbox, entity, NULL)
ATTRIB(XonoticCvarList, cvarNameBox, entity, NULL)
ATTRIB(XonoticCvarList, cvarDescriptionBox, entity, NULL)
CvarList_Revert_Click(world, me);
return 1;
}
+ else if(scan == K_ENTER)
+ me.cvarValueBox.parent.setFocus(me.cvarValueBox.parent, me.cvarValueBox);
else if(SUPER(XonoticCvarList).keyDown(me, scan, ascii, shift))
return 1;
else if(!me.controlledTextbox)
return me.controlledTextbox.keyDown(me.controlledTextbox, scan, ascii, shift);
}
+float XonoticCvarList_mouseRelease(entity me, vector pos)
+{
+ if(me.pressed == 2)
+ me.cvarValueBox.parent.setFocus(me.cvarValueBox.parent, me.cvarValueBox);
+ return SUPER(XonoticCvarList).mouseRelease(me, pos);
+}
+
void CvarList_Value_Change(entity box, entity me)
{
cvar_set(me.cvarNameBox.text, box.text);
me.cvarValueBox.setText(me.cvarValueBox, me.cvarDefault);
me.cvarValueBox.cursorPos = strlen(me.cvarDefault);
}
+
#endif