Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

Commit

Permalink
Screenshot update; minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
brunurd committed Oct 18, 2018
1 parent 659d29a commit 7e0aeee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions Diplomata/Editor/Windows/TalkableMessagesEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,7 @@ public void Main()
if (nextColumn == null)
{
context.columns = ArrayHelper.Add(context.columns, new Column(context.columns.Length, Controller.Instance.Options));
nextColumn = context.columns[context.columns.Length];
nextColumn = context.columns[context.columns.Length - 1];
}

// Create a new message.
Expand Down Expand Up @@ -1061,22 +1061,20 @@ private void Sidebar()
EditorGUILayout.Separator();
GUILayout.Label("Message attributes (most influence in): ");

foreach (string attrName in Controller.Instance.Options.attributes)
foreach (var attrName in Controller.Instance.Options.attributes)
{
for (int i = 0; i < message.attributes.Length; i++)
for (var i = 0; i < message.attributes.Length; i++)
{
if (message.attributes[i].key == attrName)
{
break;
}
else if (i == message.attributes.Length - 1)
{
if (i == message.attributes.Length - 1)
message.attributes = ArrayHelper.Add(message.attributes, new AttributeDictionary(attrName));
}
}
if (message.attributes.Length == 0)
message.attributes = ArrayHelper.Add(message.attributes, new AttributeDictionary(attrName));
}

for (int i = 0; i < message.attributes.Length; i++)
for (var i = 0; i < message.attributes.Length; i++)
{
message.attributes[i].value =
(byte) EditorGUILayout.Slider(message.attributes[i].key, message.attributes[i].value, 0, 100);
Expand Down
Binary file modified Textures/Screenshot.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7e0aeee

Please sign in to comment.