METHOD(XonoticGametypeList, loadCvars, void(entity))
METHOD(XonoticGametypeList, saveCvars, void(entity))
METHOD(XonoticGametypeList, keyDown, float(entity, float, float, float))
+ METHOD(XonoticGametypeList, clickListBoxItem, void(entity, float, vector))
ATTRIB(XonoticGametypeList, realFontSize, vector, '0 0 0')
ATTRIB(XonoticGametypeList, realUpperMargin, float, 0)
SUPER(XonoticGametypeList).setSelected(me, i);
me.saveCvars(me);
}
-
void XonoticGametypeList_loadCvars(entity me)
{
float t;
me.columnNameOrigin = me.columnIconOrigin + me.columnIconSize + (0.5 * me.realFontSize_x);
me.columnNameSize = 1 - me.columnIconSize - (1.5 * me.realFontSize_x);
}
-
float XonoticGametypeList_keyDown(entity me, float scan, float ascii, float shift)
{
if(scan == K_ENTER || scan == K_KP_ENTER)
{
+ m_play_click_sound(MENU_SOUND_EXECUTE);
me.parent.gameTypeSelectNotify(me.parent);
return 1;
}
return SUPER(XonoticGametypeList).keyDown(me, scan, ascii, shift);
}
+void XonoticGametypeList_clickListBoxItem(entity me, float i, vector where)
+{
+ m_play_click_sound(MENU_SOUND_SELECT);
+}
#endif
localcmd("\nbind \"", keynumtostring(k), "\" \"", KEY_NOT_BOUND_CMD, "\"\n");
}
}
+ m_play_click_sound(MENU_SOUND_SELECT);
localcmd("\nbind \"", keynumtostring(key), "\" \"", func, "\"\n");
localcmd("-zoom\n"); // to make sure we aren't in togglezoom'd state
cvar_set("_hud_showbinds_reload", "1");
//localcmd("\nunbind \"", keynumtostring(k), "\"\n");
localcmd("\nbind \"", keynumtostring(k), "\" \"", KEY_NOT_BOUND_CMD, "\"\n");
}
+ m_play_click_sound(MENU_SOUND_CLEAR);
localcmd("-zoom\n"); // to make sure we aren't in togglezoom'd state
cvar_set("_hud_showbinds_reload", "1");
}
void XonoticLanguageList_doubleClickListBoxItem(entity me, float i, vector where)
{
+ m_play_click_sound(MENU_SOUND_EXECUTE);
me.setLanguage(me);
}
float XonoticLanguageList_keyDown(entity me, float scan, float ascii, float shift)
{
- if(scan == K_ENTER || scan == K_KP_ENTER) {
+ if(scan == K_ENTER || scan == K_KP_ENTER)
+ {
+ m_play_click_sound(MENU_SOUND_EXECUTE);
me.setLanguage(me);
return 1;
}
{
if(where_x <= me.columnPreviewOrigin + me.columnPreviewSize)
if(where_x >= 0)
+ {
+ m_play_click_sound(MENU_SOUND_SELECT);
me.g_maplistCacheToggle(me, i);
+ }
}
void XonoticMapList_doubleClickListBoxItem(entity me, float i, vector where)
}
else if(scan == K_MOUSE3 || scan == K_INS || scan == K_KP_INS)
{
+ m_play_click_sound(MENU_SOUND_SELECT);
me.g_maplistCacheToggle(me, me.selectedItem);
}
else if(ascii == 43) // +
{
if (!me.g_maplistCacheQuery(me, me.selectedItem))
+ {
+ m_play_click_sound(MENU_SOUND_SELECT);
me.g_maplistCacheToggle(me, me.selectedItem);
+ }
}
else if(ascii == 45) // -
{
if(me.g_maplistCacheQuery(me, me.selectedItem))
+ {
+ m_play_click_sound(MENU_SOUND_SELECT);
me.g_maplistCacheToggle(me, me.selectedItem);
+ }
}
else if(scan == K_BACKSPACE)
{
ipstr = netaddress_resolve(me.ipAddressBox.text, 26000);
if(ipstr != "")
{
+ m_play_click_sound(MENU_SOUND_SELECT);
me.toggleFavorite(me, me.ipAddressBox.text);
me.ipAddressBoxFocused = -1;
}
void XonoticSkinList_doubleClickListBoxItem(entity me, float i, vector where)
{
+ m_play_click_sound(MENU_SOUND_EXECUTE);
me.setSkin(me);
}
float XonoticSkinList_keyDown(entity me, float scan, float ascii, float shift)
{
- if(scan == K_ENTER || scan == K_KP_ENTER) {
+ if(scan == K_ENTER || scan == K_KP_ENTER)
+ {
+ m_play_click_sound(MENU_SOUND_EXECUTE);
me.setSkin(me);
return 1;
}