コード例 #1
0
ファイル: context.c プロジェクト: RushOnline/editor-on-fire
void eof_prepare_context_menu(void)
{
	int vselected = 0;

	if(eof_song && eof_song_loaded)
	{
		vselected = eof_count_selected_notes(NULL);
		if(vselected)
		{	//If at least one note is selected, enable the Copy function
			eof_right_click_menu_normal[0].flags = 0;
			eof_right_click_menu_note[2].flags = 0;
		}
		else
		{
			eof_right_click_menu_normal[0].flags = D_DISABLED;
			eof_right_click_menu_note[2].flags = D_DISABLED;
		}
		if(eof_vocals_selected)
		{
			if(exists("eof.vocals.clipboard"))
			{	//If there is a vocal clipboard file, enable the Paste function
				eof_right_click_menu_normal[1].flags = 0;
				eof_right_click_menu_note[3].flags = 0;
			}
			else
			{
				eof_right_click_menu_normal[1].flags = D_DISABLED;
				eof_right_click_menu_note[3].flags = D_DISABLED;
			}
		}
		else
		{
			if(exists("eof.clipboard"))
			{	//If there is a note clipboard file, enable the Paste function
				eof_right_click_menu_normal[1].flags = 0;
				eof_right_click_menu_note[3].flags = 0;
			}
			else
			{
				eof_right_click_menu_normal[1].flags = D_DISABLED;
				eof_right_click_menu_note[3].flags = D_DISABLED;
			}
		}
		if(eof_track_diff_populated_status[eof_note_type])
		{	//If the active instrument difficulty is populated, enable the Selection submenu
			eof_right_click_menu_normal[6].flags = 0;
			eof_right_click_menu_note[8].flags = 0;
		}
		else
		{
			eof_right_click_menu_normal[6].flags = D_DISABLED;
			eof_right_click_menu_note[7].flags = D_DISABLED;
		}
	}
}
コード例 #2
0
ファイル: main.c プロジェクト: alex9490/editor-on-fire
void eof_prepare_main_menu(void)
{
	eof_main_menu[4].flags = D_DISABLED; //The note menu is always disabled unless at least one note is selected

	if(eof_song && eof_song_loaded)
	{
		eof_main_menu[1].flags = 0; // Edit
		eof_main_menu[2].flags = 0; // Song
		eof_main_menu[3].flags = 0; // Track
		eof_main_menu[5].flags = 0; // Beat

		/* disable Note menu when no notes are selected */
		if(eof_count_selected_notes(NULL, 1) || ((eof_input_mode == EOF_INPUT_FEEDBACK) && (eof_seek_hover_note >= 0)))
		{	//If notes are selected, or the seek position is at a note position when Feedback input mode is in use
			eof_main_menu[4].flags = 0; // Note
		}
	}
	else
	{
		eof_main_menu[1].flags = D_DISABLED; // Edit
		eof_main_menu[2].flags = D_DISABLED; // Song
		eof_main_menu[5].flags = D_DISABLED; // Beat
	}
}