public override void DrawTab(Window <LocalizationWindow> owner) { EditorGUILayout.LabelField("Help"); var e = JMilesGUILayoutEvents.Button("Reload files (Warning, does not save data!)", EditorStyles.toolbarButton); if (e.EventIsMouse0InRect) { var yes = EditorUtility.DisplayDialog("Reload all files", "Are you sure you want to reload all the files, this will delete any non-saved changes!", "Yes (possable loss of data)", "No"); if (yes) { LocalizationEditor.LoadAll(); } } }
public override void DrawGUI() { if (JMilesGUILayoutEvents.Button("Randomize Seed + Generate")) { RandomizeSeed(); GenerateMap(); } using (EditorDisposables.HorizontalScope()) { if (JMilesGUILayoutEvents.Button("Randomize Seed")) { RandomizeSeed(); } if (JMilesGUILayoutEvents.Button("Generate Map")) { GenerateMap(); } } }
private void DrawFooterGUI() { using (new GUILayout.HorizontalScope()) { using (new GUILayout.HorizontalScope(EditorStyles.toolbarButton, GUILayout.Width(Owner.position.width * 0.5f))) { var e1 = JMilesGUILayoutEvents.Button("Generate Pages, From Active Language Pages (non-destructive)", EditorStyles.toolbarButton); if (e1.EventIsMouse0InRect) { LocalizationEditor.GenerateAllPagesFromActive(); } //else if (e1.EventIsMouse1InRect) //{ // Debug.Log("e1 Right Click"); //} } using (new GUILayout.HorizontalScope(EditorStyles.toolbarButton, GUILayout.Width(Owner.position.width * 0.5f))) { var e2 = JMilesGUILayoutEvents.Button("Generate Pages, From Active Language Pages and copy the data (non-destructive)", EditorStyles.toolbarButton); if (e2.EventIsMouse0InRect) { LocalizationEditor.GenerateAllPagesFromActive(true); } //else if (e2.EventIsMouse1InRect) //{ // Debug.Log("e2 Right Click"); //} } //if (GUILayout.Button("Generate Pages, From Active Language Pages (non-destructive)", EditorStyles.toolbarButton)) //{ // LocalizationEditor.GenerateAllPagesFromActive(); //} //if (GUILayout.Button("Generate Pages, From Active Language Pages and copy the data (non-destructive)", EditorStyles.toolbarButton)) //{ // LocalizationEditor.GenerateAllPagesFromActive(true); //} } DrawAddLangGUI(); }