package nak.nakloidGUI.gui.preferencePages.ini;

import org.eclipse.jface.preference.BooleanFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;

import nak.nakloidGUI.NakloidGUI;

public class GeneralIniPage extends FieldEditorPreferencePage {
	public GeneralIniPage() {
		super(FieldEditorPreferencePage.GRID);
		setTitle("Nakloid");
		setMessage(getTitle());
		setDescription("Nakloidに関する設定項目です");
		setPreferenceStore(NakloidGUI.preferenceStore);
	}

	@Override
	protected void createFieldEditors() {
		Composite container = new Composite(getFieldEditorParent(), SWT.LEFT);
		container.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
		container.setLayout(new GridLayout());
		{
			BooleanFieldEditor field = new BooleanFieldEditor("ini.output.print_debug", "ログ表示をデバッグモードにする", container);
			addField(field);
		}
		{
			BooleanFieldEditor field = new BooleanFieldEditor("ini.vocal_library.use_uwc_cache", "UWCキャッシュを使用する", container);
			addField(field);
		}
	}
}

@@ -161,16 +161,72 @@
 cePage;%0A
+import org.eclipse.jface.preference.IntegerFieldEditor;%0A
 import o
@@ -1193,13 +1193,261 @@
 d);%0A%09%09%7D%0A
+%09%09%7B%0A%09%09%09IntegerFieldEditor ifeVibratoOffset = new IntegerFieldEditor(%22ini.input.track%22, %22%E4%BD%BF%E7%94%A8%E3%81%99%E3%82%8BMIDI%E3%83%88%E3%83%A9%E3%83%83%E3%82%AF%22, container, 2);%0A%09%09%09ifeVibratoOffset.setValidRange(1, 99);%0A%09%09%09ifeVibratoOffset.setErrorMessage(%22%E6%AD%A3%E3%81%AE%E6%95%B4%E6%95%B0%E3%82%92%E5%85%A5%E5%8A%9B%E3%81%97%E3%81%A6%E4%B8%8B%E3%81%95%E3%81%84%22);%0A%09%09%09addField(ifeVibratoOffset);%0A%09%09%7D%0A
 %09%7D%0A%7D%0A

add midi track preference