Added output of GamePad ThumbSticks to TextRendering sample as a showcase for a possible bug in SharpDX
This commit is contained in:
parent
108cc7fc03
commit
29f0b9b774
@ -116,7 +116,7 @@ namespace ANX.Framework
|
||||
#region Equals
|
||||
public bool Equals(CurveKey other)
|
||||
{
|
||||
try
|
||||
if (other != null)
|
||||
{
|
||||
return other.Position == Position &&
|
||||
other.Value == Value &&
|
||||
@ -124,18 +124,18 @@ namespace ANX.Framework
|
||||
other.TangentOut == TangentOut &&
|
||||
other.Continuity == Continuity;
|
||||
}
|
||||
catch (NullReferenceException e)
|
||||
{
|
||||
return ((object)this)==null;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj is CurveKey)
|
||||
CurveKey ck = obj as CurveKey;
|
||||
if (ck != null)
|
||||
{
|
||||
return Equals(obj as CurveKey);
|
||||
return Equals(ck);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
#endregion
|
||||
|
@ -103,10 +103,13 @@ namespace TextRendering
|
||||
|
||||
spriteBatch.DrawString(this.debugFont, "This screen is powered by the ANX.Framework!\r\nsecond line", new Vector2(100, 100 + this.debugFont.LineSpacing), Color.Black, 0.0f, new Vector2(1, -1), Vector2.One, SpriteEffects.None, 0.0f);
|
||||
spriteBatch.DrawString(this.debugFont, "This screen is powered by the ANX.Framework!\r\nsecond line", new Vector2(100, 100 + this.debugFont.LineSpacing), Color.Red, 0.0f, Vector2.Zero, Vector2.One, SpriteEffects.None, 1.0f);
|
||||
spriteBatch.DrawString(this.debugFont, "Mouse X: "+Mouse.GetState().X, new Vector2(100, 400 ), Color.DarkOrange);
|
||||
spriteBatch.DrawString(this.debugFont, "Mouse Y:" + Mouse.GetState().Y, new Vector2(100, 500), Color.DarkOrange);
|
||||
spriteBatch.DrawString(this.debugFont, "Mouse X: " + Mouse.GetState().X, new Vector2(100, 100 + this.debugFont.LineSpacing * 3), Color.DarkOrange);
|
||||
spriteBatch.DrawString(this.debugFont, "Mouse Y:" + Mouse.GetState().Y, new Vector2(100, 100 + this.debugFont.LineSpacing * 4), Color.DarkOrange);
|
||||
spriteBatch.DrawString(this.debugFont, "rotated Text", new Vector2(100, 150), Color.Green, MathHelper.ToRadians(90), Vector2.Zero, 1.0f, SpriteEffects.None, 1.0f);
|
||||
|
||||
GamePadState state = GamePad.GetState(PlayerIndex.One);
|
||||
spriteBatch.DrawString(this.debugFont, String.Format("GamePad Left: {0} Right: {1}", state.ThumbSticks.Left, state.ThumbSticks.Right) , new Vector2(100, 100 + this.debugFont.LineSpacing * 5), Color.Red, 0.0f, Vector2.Zero, Vector2.One, SpriteEffects.None, 1.0f);
|
||||
|
||||
spriteBatch.End();
|
||||
|
||||
base.Draw(gameTime);
|
||||
|
1
Samples/WindowsGame/AddInSelector.Designer.cs
generated
1
Samples/WindowsGame/AddInSelector.Designer.cs
generated
@ -108,6 +108,7 @@
|
||||
// pictureBox1
|
||||
//
|
||||
this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.pictureBox1.Image = global::WindowsGame1.Resource1.Logo;
|
||||
this.pictureBox1.Location = new System.Drawing.Point(0, 0);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(507, 169);
|
||||
|
@ -119,6 +119,6 @@
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="Logo" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\ANX.Framework_Logo01.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<value>Resources\ANX.Framework.Logo_459x121.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
BIN
Samples/WindowsGame/Resources/ANX.Framework.Logo_459x121.png
Normal file
BIN
Samples/WindowsGame/Resources/ANX.Framework.Logo_459x121.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
Binary file not shown.
Before Width: | Height: | Size: 57 KiB |
@ -92,7 +92,7 @@
|
||||
<Content Include="GameThumbnail.png">
|
||||
<XnaPlatformSpecific>true</XnaPlatformSpecific>
|
||||
</Content>
|
||||
<None Include="Resources\ANX.Framework_Logo01.png" />
|
||||
<None Include="Resources\ANX.Framework.Logo_459x121.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\ANX.Framework\ANX.Framework.csproj">
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user