胡佳骏 431991caf0 SHAPAN 1 year ago
..
ReadMeEditor.cs 431991caf0 SHAPAN 1 year ago
ReadMeEditor.cs.meta 431991caf0 SHAPAN 1 year ago
TC_Area2DEditor.cs 431991caf0 SHAPAN 1 year ago
TC_Area2DEditor.cs.meta 431991caf0 SHAPAN 1 year ago
TC_AutoStampMaker.cs 431991caf0 SHAPAN 1 year ago
TC_AutoStampMaker.cs.meta 431991caf0 SHAPAN 1 year ago
TC_ComputeEditor.cs 431991caf0 SHAPAN 1 year ago
TC_ComputeEditor.cs.meta 431991caf0 SHAPAN 1 year ago
TC_GenerateEditor.cs 431991caf0 SHAPAN 1 year ago
TC_GenerateEditor.cs.meta 431991caf0 SHAPAN 1 year ago
TC_ItemBehaviourEditor.cs 431991caf0 SHAPAN 1 year ago
TC_ItemBehaviourEditor.cs.meta 431991caf0 SHAPAN 1 year ago
TC_LayerGUI.cs 431991caf0 SHAPAN 1 year ago
TC_LayerGUI.cs.meta 431991caf0 SHAPAN 1 year ago
TC_LayerGroupGUI.cs 431991caf0 SHAPAN 1 year ago
TC_LayerGroupGUI.cs.meta 431991caf0 SHAPAN 1 year ago
TC_LayerGroupResultGUI.cs 431991caf0 SHAPAN 1 year ago
TC_LayerGroupResultGUI.cs.meta 431991caf0 SHAPAN 1 year ago
TC_MeasureTerrainsEditor.cs 431991caf0 SHAPAN 1 year ago
TC_MeasureTerrainsEditor.cs.meta 431991caf0 SHAPAN 1 year ago
TC_NodeGUI.cs 431991caf0 SHAPAN 1 year ago
TC_NodeGUI.cs.meta 431991caf0 SHAPAN 1 year ago
TC_NodeGroupGUI.cs 431991caf0 SHAPAN 1 year ago
TC_NodeGroupGUI.cs.meta 431991caf0 SHAPAN 1 year ago
TC_NodeWindow.cs 431991caf0 SHAPAN 1 year ago
TC_NodeWindow.cs.meta 431991caf0 SHAPAN 1 year ago
TC_RawImageEditor.cs 431991caf0 SHAPAN 1 year ago
TC_RawImageEditor.cs.meta 431991caf0 SHAPAN 1 year ago
TC_SelectItemGUI.cs 431991caf0 SHAPAN 1 year ago
TC_SelectItemGUI.cs.meta 431991caf0 SHAPAN 1 year ago
TC_SelectItemGroupGUI.cs 431991caf0 SHAPAN 1 year ago
TC_SelectItemGroupGUI.cs.meta 431991caf0 SHAPAN 1 year ago
TC_SettingsEditor.cs 431991caf0 SHAPAN 1 year ago
TC_SettingsEditor.cs.meta 431991caf0 SHAPAN 1 year ago
TC_TerrainAreaEditor.cs 431991caf0 SHAPAN 1 year ago
TC_TerrainAreaEditor.cs.meta 431991caf0 SHAPAN 1 year ago
TC_TerrainLayerGUI.cs 431991caf0 SHAPAN 1 year ago
TC_TerrainLayerGUI.cs.meta 431991caf0 SHAPAN 1 year ago
TD.cs 431991caf0 SHAPAN 1 year ago
TD.cs.meta 431991caf0 SHAPAN 1 year ago

ReadMeEditor.cs

using UnityEngine;
using UnityEditor;
using System.Collections;

namespace TerrainComposer2
{
[CustomEditor (typeof(ReadMe))]
public class ReadMeEditor : Editor
{
public override void OnInspectorGUI()
{
ReadMe r = (ReadMe)target;

Event eventCurrent = Event.current;

GUI.changed = false;

if (eventCurrent.control && eventCurrent.shift && eventCurrent.keyCode == KeyCode.E && eventCurrent.type == EventType.KeyDown)
{
r.buttonEdit = !r.buttonEdit;
GUI.changed = true;
}

GUILayout.Space(5);

if (r.buttonEdit)
{
r.readme = EditorGUILayout.TextArea(r.readme);
r.buttonLink = EditorGUILayout.TextField(r.buttonLink);
}
else
{
EditorGUILayout.TextArea(r.readme);
GUILayout.Space(5);
GUI.backgroundColor = Color.green;
if (GUILayout.Button("Download Examples Pack"))
{
Application.OpenURL("https://mega.nz/#!7QBj3YzR!yHXkhDY2Njvk0obqSA36vzn5EVcN4biRC15nJSxK4ao");
}
if (GUILayout.Button("Download Stamp Pack"))
{
Application.OpenURL("https://mega.nz/#!HNIjxZZA!OQTmlM1jiT5rOCPz7_PZBJ-8UwJOPOsW-ghs25wHAik");
}
if (GUILayout.Button("Documentation"))
{
Application.OpenURL("http://www.terraincomposer.com/terraincomposer2-documentation/");
}
GUI.backgroundColor = Color.white;
}


if (GUI.changed) EditorUtility.SetDirty(target);
}

}
}