Show More
Commit Description:
Fix right click to jump....
Commit Description:
Fix right click to jump.
Apparently I had it right the whole time, it's just that it would get triggered
many times because I wasn't checking that the mouse was previously released.
References:
File last commit:
Show/Diff file:
Action:
FNA/src/Content/ContentReaders/EnumReader.cs
51 lines | 984 B | text/x-csharp | CSharpLexer
51 lines | 984 B | text/x-csharp | CSharpLexer
r0 | #region License | |||
/* FNA - XNA4 Reimplementation for Desktop Platforms | ||||
* Copyright 2009-2020 Ethan Lee and the MonoGame Team | ||||
* | ||||
* Released under the Microsoft Public License. | ||||
* See LICENSE for details. | ||||
*/ | ||||
#endregion | ||||
#region Using Statements | ||||
using System; | ||||
#endregion | ||||
namespace Microsoft.Xna.Framework.Content | ||||
{ | ||||
internal class EnumReader<T> : ContentTypeReader<T> | ||||
{ | ||||
#region Private ContentTypeReader Instance | ||||
ContentTypeReader elementReader; | ||||
#endregion | ||||
#region Public Constructor | ||||
public EnumReader() | ||||
{ | ||||
} | ||||
#endregion | ||||
#region Protected Initialization Method | ||||
protected internal override void Initialize(ContentTypeReaderManager manager) | ||||
{ | ||||
Type readerType = Enum.GetUnderlyingType(typeof(T)); | ||||
elementReader = manager.GetTypeReader(readerType); | ||||
} | ||||
#endregion | ||||
#region Protected Read Method | ||||
protected internal override T Read(ContentReader input, T existingInstance) | ||||
{ | ||||
return input.ReadRawObject<T>(elementReader); | ||||
} | ||||
#endregion | ||||
} | ||||
} | ||||