#include "item/modalcontroller.c"
#include "item/image.c"
#include "item/label.c"
+#include "item/dialog.c"
#include "item/button.c"
#include "item/checkbox.c"
#include "item/radiobutton.c"
#include "item/borderimage.c"
#include "item/slider.c"
-#include "item/dialog.c"
#include "item/tab.c"
#include "item/textslider.c"
#include "item/listbox.c"
}
}
else if(argc == 2 && !isdemo()) // don't allow this command in demos
+ {
+ m_play_click_sound(MENU_SOUND_OPEN);
m_goto(strcat(filter, argv(1))); // switch to a menu item
+ }
if(filter)
strunzone(filter);
return;
}
void Button_playClickSound(entity me)
{
- m_play_click_sound(MENU_SOUND_EXECUTE);
+ if(me.onClick == DialogOpenButton_Click)
+ m_play_click_sound(MENU_SOUND_OPEN);
+ else if(me.onClick == Dialog_Close)
+ m_play_click_sound(MENU_SOUND_CLOSE);
+ else
+ m_play_click_sound(MENU_SOUND_EXECUTE);
}
#endif
{
if(key == K_ESCAPE)
{
+ m_play_click_sound(MENU_SOUND_CLOSE);
me.close(me);
return 1;
}
Nexposee_mouseMove(me, pos);
if(me.mouseFocusedChild)
{
+ m_play_click_sound(MENU_SOUND_OPEN);
me.animationState = 1;
SUPER(Nexposee).setFocus(me, NULL);
}
{
if (!(SUPER(Nexposee).mousePress(me, pos)))
{
+ m_play_click_sound(MENU_SOUND_CLOSE);
me.animationState = 3;
SUPER(Nexposee).setFocus(me, NULL);
}
default:
case 0:
case 3:
+ m_play_click_sound(MENU_SOUND_OPEN);
me.animationState = 1;
break;
case 1:
case 2:
+ m_play_click_sound(MENU_SOUND_CLOSE);
me.animationState = 3;
break;
}
// sounds
const string MENU_SOUND_CLEAR = "sound/menu/clear.wav";
+const string MENU_SOUND_CLOSE = "sound/menu/close.wav";
const string MENU_SOUND_EXECUTE = "sound/menu/execute.wav";
+const string MENU_SOUND_OPEN = "sound/menu/open.wav";
const string MENU_SOUND_SELECT = "sound/menu/select.wav";
const string MENU_SOUND_SLIDE = "sound/menu/slide.wav";
if(where_x <= 1)
{
// pop up map info screen
+ m_play_click_sound(MENU_SOUND_OPEN);
main.mapInfoDialog.loadMapInfo(main.mapInfoDialog, i, me);
DialogOpenButton_Click_withCoords(NULL, main.mapInfoDialog, me.origin + eX * (me.columnNameOrigin * me.size_x) + eY * ((me.itemHeight * i - me.scrollPos) * me.size_y), eY * me.itemAbsSize_y + eX * (me.itemAbsSize_x * me.columnNameSize));
}
if(scan == K_MOUSE2 || scan == K_SPACE || scan == K_ENTER || scan == K_KP_ENTER)
{
// pop up map info screen
+ m_play_click_sound(MENU_SOUND_OPEN);
main.mapInfoDialog.loadMapInfo(main.mapInfoDialog, me.selectedItem, me);
DialogOpenButton_Click_withCoords(NULL, main.mapInfoDialog, me.origin + eX * (me.columnNameOrigin * me.size_x) + eY * ((me.itemHeight * me.selectedItem - me.scrollPos) * me.size_y), eY * me.itemAbsSize_y + eX * (me.itemAbsSize_x * me.columnNameSize));
}
{
if(me.nItems != 0)
{
+ m_play_click_sound(MENU_SOUND_OPEN);
main.serverInfoDialog.loadServerInfo(main.serverInfoDialog, me.selectedItem);
DialogOpenButton_Click_withCoords(me, main.serverInfoDialog, org, sz);
return 1;