Exemplo n.º 1
0
void WeaponsList_MoveUp_Click(entity box, entity me)
{
	if(me.selectedItem > 0)
	{
		cvar_set("cl_weaponpriority", swapInPriorityList(cvar_string("cl_weaponpriority"), me.selectedItem - 1, me.selectedItem));
		me.selectedItem -= 1;
	}
}
Exemplo n.º 2
0
void WeaponsList_MoveDown_Click(entity box, entity me)
{
	if(me.selectedItem < me.nItems - 1)
	{
		cvar_set("cl_weaponpriority", swapInPriorityList(cvar_string("cl_weaponpriority"), me.selectedItem, me.selectedItem + 1));
		me.selectedItem += 1;
	}
}
Exemplo n.º 3
0
float mouseDragNexuizWeaponsList(entity me, vector pos)
{
	float f, i;
	i = me.selectedItem;
	f = mouseDragListBox(me, pos);
	if(me.selectedItem != i)
		cvar_set("cl_weaponpriority", swapInPriorityList(cvar_string("cl_weaponpriority"), me.selectedItem, i));
	return f;
}
Exemplo n.º 4
0
float XonoticWeaponsList_mouseDrag(entity me, vector pos)
{
	float f, i;
	i = me.selectedItem;
	f = SUPER(XonoticWeaponsList).mouseDrag(me, pos);
	if(me.selectedItem != i)
		cvar_set("cl_weaponpriority", swapInPriorityList(cvar_string("cl_weaponpriority"), me.selectedItem, i));
	return f;
}