X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fmenu%2Fxonotic%2Fweaponslist.c;h=b6c536a90441cf7bf1cedc471bcc12280f786b84;hb=615bb68a764d1dc8064077a1c86a349975ad3e5b;hp=952c3c956af14273fa62a3ecded70b9935dfeb42;hpb=7e0864d035fea38e3127a0728909641536c1a99d;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/menu/xonotic/weaponslist.c b/qcsrc/menu/xonotic/weaponslist.c index 952c3c956..b6c536a90 100644 --- a/qcsrc/menu/xonotic/weaponslist.c +++ b/qcsrc/menu/xonotic/weaponslist.c @@ -65,16 +65,16 @@ void XonoticWeaponsList_resizeNotify(entity me, vector relOrigin, vector relSize } float XonoticWeaponsList_mouseDrag(entity me, vector pos) { - float f, i, scrollbar; + float f, i; i = me.selectedItem; f = SUPER(XonoticWeaponsList).mouseDrag(me, pos); - + if(me.pressed != 1) // don't change priority if the person is just scrolling { if(me.selectedItem != i) cvar_set("cl_weaponpriority", swapInPriorityList(cvar_string("cl_weaponpriority"), me.selectedItem, i)); } - + return f; } string XonoticWeaponsList_toString(entity me) @@ -97,7 +97,10 @@ void XonoticWeaponsList_drawListBoxItem(entity me, float i, vector absSize, floa if(isSelected) draw_Fill('0 0 0', '1 1 0', SKINCOLOR_LISTBOX_SELECTED, SKINALPHA_LISTBOX_SELECTED); e = get_weaponinfo(stof(argv(i))); - draw_Text(me.realUpperMargin * eY, e.message, me.realFontSize, '1 1 1', SKINALPHA_TEXT, 0); + string msg = e.message; + if(e.spawnflags & WEP_FLAG_MUTATORBLOCKED) + msg = sprintf(_("%s (mutator weapon)"), msg); + draw_Text(me.realUpperMargin * eY, msg, me.realFontSize, SKINCOLOR_TEXT, SKINALPHA_TEXT, 0); } float XonoticWeaponsList_keyDown(entity me, float scan, float ascii, float shift)