Merge remote-tracking branch 'origin/master' into gi
This commit is contained in:
@@ -482,7 +482,6 @@ namespace FlaxEditor.Windows
|
||||
continue;
|
||||
|
||||
var startIndex = _textBuffer.Length;
|
||||
|
||||
switch (_timestampsFormats)
|
||||
{
|
||||
case InterfaceOptions.TimestampsFormats.Utc:
|
||||
@@ -496,12 +495,12 @@ namespace FlaxEditor.Windows
|
||||
_textBuffer.AppendFormat("[ {0:00}:{1:00}:{2:00}.{3:000} ]: ", diff.Hours, diff.Minutes, diff.Seconds, diff.Milliseconds);
|
||||
break;
|
||||
}
|
||||
|
||||
if (_showLogType)
|
||||
{
|
||||
_textBuffer.AppendFormat("[{0}] ", entry.Level);
|
||||
}
|
||||
|
||||
var prefixLength = _textBuffer.Length - startIndex;
|
||||
if (entry.Message.IndexOf('\r') != -1)
|
||||
entry.Message = entry.Message.Replace("\r", "");
|
||||
_textBuffer.Append(entry.Message);
|
||||
@@ -548,27 +547,34 @@ namespace FlaxEditor.Windows
|
||||
if (textBlock.Range.Length > 0)
|
||||
{
|
||||
// Parse compilation error/warning
|
||||
var match = _compileRegex.Match(entryText, line.FirstCharIndex, textBlock.Range.Length);
|
||||
if (match.Success)
|
||||
var regexStart = line.FirstCharIndex;
|
||||
if (j == 0)
|
||||
regexStart += prefixLength;
|
||||
var regexLength = line.LastCharIndex - regexStart;
|
||||
if (regexLength > 0)
|
||||
{
|
||||
switch (match.Groups["level"].Value)
|
||||
var match = _compileRegex.Match(entryText, regexStart, regexLength);
|
||||
if (match.Success)
|
||||
{
|
||||
case "error":
|
||||
textBlock.Style = _output.ErrorStyle;
|
||||
break;
|
||||
case "warning":
|
||||
textBlock.Style = _output.WarningStyle;
|
||||
break;
|
||||
switch (match.Groups["level"].Value)
|
||||
{
|
||||
case "error":
|
||||
textBlock.Style = _output.ErrorStyle;
|
||||
break;
|
||||
case "warning":
|
||||
textBlock.Style = _output.WarningStyle;
|
||||
break;
|
||||
}
|
||||
textBlock.Tag = new TextBlockTag
|
||||
{
|
||||
Type = TextBlockTag.Types.CodeLocation,
|
||||
Url = match.Groups["path"].Value,
|
||||
Line = int.Parse(match.Groups["line"].Value),
|
||||
};
|
||||
}
|
||||
textBlock.Tag = new TextBlockTag
|
||||
{
|
||||
Type = TextBlockTag.Types.CodeLocation,
|
||||
Url = match.Groups["path"].Value,
|
||||
Line = int.Parse(match.Groups["line"].Value),
|
||||
};
|
||||
// TODO: parsing hyperlinks with link
|
||||
// TODO: parsing file paths with link
|
||||
}
|
||||
// TODO: parsing hyperlinks with link
|
||||
// TODO: parsing file paths with link
|
||||
}
|
||||
|
||||
prevBlockBottom += line.Size.Y;
|
||||
|
||||
@@ -326,7 +326,7 @@ namespace FlaxEditor.Windows
|
||||
|
||||
_isUpdatingSelection = false;
|
||||
}
|
||||
|
||||
|
||||
private bool ValidateDragAsset(AssetItem assetItem)
|
||||
{
|
||||
return assetItem.OnEditorDrag(this);
|
||||
@@ -417,7 +417,7 @@ namespace FlaxEditor.Windows
|
||||
public override DragDropEffect OnDragEnter(ref Vector2 location, DragData data)
|
||||
{
|
||||
var result = base.OnDragEnter(ref location, data);
|
||||
if (result == DragDropEffect.None && Editor.StateMachine.CurrentState.CanEditScene)
|
||||
if (Editor.StateMachine.CurrentState.CanEditScene)
|
||||
{
|
||||
if (_dragHandlers == null)
|
||||
_dragHandlers = new DragHandlers();
|
||||
@@ -426,14 +426,14 @@ namespace FlaxEditor.Windows
|
||||
_dragAssets = new DragAssets(ValidateDragAsset);
|
||||
_dragHandlers.Add(_dragAssets);
|
||||
}
|
||||
if (_dragAssets.OnDragEnter(data))
|
||||
if (_dragAssets.OnDragEnter(data) && result == DragDropEffect.None)
|
||||
return _dragAssets.Effect;
|
||||
if (_dragActorType == null)
|
||||
{
|
||||
_dragActorType = new DragActorType(ValidateDragActorType);
|
||||
_dragHandlers.Add(_dragActorType);
|
||||
}
|
||||
if (_dragActorType.OnDragEnter(data))
|
||||
if (_dragActorType.OnDragEnter(data) && result == DragDropEffect.None)
|
||||
return _dragActorType.Effect;
|
||||
}
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user