e.onClick = NextSound_Click;
e.onClickEntity = soundList;
me.TR(me);
- me.TD(me, 1, me.columns, e = makeXonoticButton(_("Set selected as default menu track"), '0 0 0'));
+ me.TD(me, 1, me.columns / 2, e = makeXonoticButton(_("Set selected as menu track"), '0 0 0'));
e.onClick = SoundList_Menu_Track_Change;
e.onClickEntity = soundList;
+ me.TD(me, 1, me.columns / 2, e = makeXonoticButton(_("Reset default menu track"), '0 0 0'));
+ e.onClick = SoundList_Menu_Track_Reset;
+ e.onClickEntity = soundList;
}
#endif
void NextSound_Click(entity btn, entity me);
void SoundList_Filter_Change(entity box, entity me);
void SoundList_Menu_Track_Change(entity box, entity me);
+void SoundList_Menu_Track_Reset(entity box, entity me);
#endif
#ifdef IMPLEMENTATION
}
s = me.soundName(me,i);
+ if(s == cvar_defstring("menu_cdtrack"))
+ s = strcat(s, " [default menu track]");
+ else if(s == cvar_string("menu_cdtrack"))
+ s = strcat(s, " [current menu track]");
+ s = strcat(ftos(i+1), ") ", s);
s = draw_TextShortenToWidth(s, me.columnNameSize, 0, me.realFontSize);
draw_Text(me.realUpperMargin * eY + me.columnNameOrigin * eX, s, me.realFontSize, '1 1 1', SKINALPHA_TEXT, 0);
}
cvar_set("menu_cdtrack", me.soundName(me,me.selectedItem));
}
+void SoundList_Menu_Track_Reset(entity box, entity me)
+{
+ cvar_set("menu_cdtrack", cvar_defstring("menu_cdtrack"));
+}
+
void SoundList_Filter_Change(entity box, entity me)
{
if(me.filterString)