Browse Source

merged with fungus changes for character image size

master
Lynxelia 10 years ago
parent
commit
3482314fa3
  1. 2
      .gitignore
  2. 7
      Assets/Fungus/Dialog/Editor/AddOptionEditor.cs
  3. 12
      Assets/Fungus/Dialog/Editor/ChooseEditor.cs
  4. 4
      Assets/Fungus/Dialog/Editor/SayEditor.cs
  5. 5
      Assets/Fungus/Portrait.meta
  6. 5
      Assets/FungusExamples/Tutorial.meta

2
.gitignore vendored

@ -10,3 +10,5 @@
*.sln
*.userprefs
.gitignore

7
Assets/Fungus/Dialog/Editor/AddOptionEditor.cs

@ -35,13 +35,14 @@ namespace Fungus
new GUIContent("Target Sequence", "Sequence to execute when this option is selected by the player."),
new GUIContent("<Continue>"),
t.GetFungusScript());
serializedObject.ApplyModifiedProperties();
base.DrawCommandGUI();
serializedObject.Update();
EditorGUILayout.PropertyField(hideOnSelectedProp, new GUIContent("Hide On Selected", "Hide this option forever once the player has selected it."));
serializedObject.ApplyModifiedProperties();
}
}

12
Assets/Fungus/Dialog/Editor/ChooseEditor.cs

@ -31,9 +31,7 @@ namespace Fungus
public override void DrawCommandGUI()
{
serializedObject.Update();
CommandEditor.ObjectField<Character>(characterProp,
new GUIContent("Character", "Character to display in dialog"),
new GUIContent("<None>"),
@ -43,7 +41,7 @@ namespace Fungus
new GUIContent("Choose Dialog", "Choose Dialog object to use to display the multiple player choices"),
new GUIContent("<Default>"),
ChooseDialog.activeDialogs);
EditorGUILayout.BeginHorizontal();
EditorGUILayout.PropertyField(chooseTextProp);
@ -51,7 +49,7 @@ namespace Fungus
EditorGUILayout.EndHorizontal();
EditorGUILayout.BeginHorizontal();
GUILayout.FlexibleSpace();
if (GUILayout.Button(new GUIContent("Tag Help", "Show help info for tags"), new GUIStyle(EditorStyles.miniButton)))
{
@ -79,7 +77,9 @@ namespace Fungus
Texture2D characterTexture = t.character.profileSprite.texture;
float aspect = (float)characterTexture.width / (float)characterTexture.height;
Rect previewRect = GUILayoutUtility.GetAspectRect(aspect, GUILayout.Width(250), GUILayout.ExpandWidth(true));
Rect previewRect = GUILayoutUtility.GetAspectRect(aspect, GUILayout.Width(100), GUILayout.ExpandWidth(true));
CharacterEditor characterEditor = Editor.CreateEditor(t.character) as CharacterEditor;
characterEditor.DrawPreview(previewRect, characterTexture);
DestroyImmediate(characterEditor);

4
Assets/Fungus/Dialog/Editor/SayEditor.cs

@ -105,7 +105,9 @@ namespace Fungus
Texture2D characterTexture = t.character.profileSprite.texture;
float aspect = (float)characterTexture.width / (float)characterTexture.height;
Rect previewRect = GUILayoutUtility.GetAspectRect(aspect, GUILayout.Width(250), GUILayout.ExpandWidth(true));
Rect previewRect = GUILayoutUtility.GetAspectRect(aspect, GUILayout.Width(100), GUILayout.ExpandWidth(true));
CharacterEditor characterEditor = Editor.CreateEditor(t.character) as CharacterEditor;
characterEditor.DrawPreview(previewRect, characterTexture);
DestroyImmediate(characterEditor);

5
Assets/Fungus/Portrait.meta

@ -0,0 +1,5 @@
fileFormatVersion: 2
guid: 0018d8c9e4d14f043af5b7e5b48e7b50
folderAsset: yes
DefaultImporter:
userData:

5
Assets/FungusExamples/Tutorial.meta

@ -0,0 +1,5 @@
fileFormatVersion: 2
guid: febb44a1ff0963a4ab2049cd9139fbaa
folderAsset: yes
DefaultImporter:
userData:
Loading…
Cancel
Save