fixed issue #1082 (SpriteFont UTF8 issue)

This commit is contained in:
Glatzemann 2012-11-14 08:37:38 +00:00 committed by Konstantin Koch
parent 5b871f27fa
commit a5f4931578
8 changed files with 18874 additions and 18890 deletions

View File

@ -33,12 +33,15 @@ namespace ANX.Framework.Content.Pipeline.Importer
public override FontDescription Import(string filename, ContentImporterContext context) public override FontDescription Import(string filename, ContentImporterContext context)
{ {
_logger = context.Logger; _logger = context.Logger;
var doc = XDocument.Load(filename); using (TextReader tr = File.OpenText(filename))
FontDescription fontDescription = DeserializeFont(doc); {
fontDescription.Identity = new ContentIdentity(new FileInfo(filename).FullName, var doc = XDocument.Load(tr);
"FontDescriptionImporter"); FontDescription fontDescription = DeserializeFont(doc);
fontDescription.Identity = new ContentIdentity(new FileInfo(filename).FullName,
"FontDescriptionImporter");
return fontDescription; return fontDescription;
}
} }

View File

@ -14,7 +14,6 @@ namespace ANX.InputDevices.Windows.ModernUI
[PercentageComplete(80)] [PercentageComplete(80)]
[TestState(TestStateAttribute.TestState.Untested)] [TestState(TestStateAttribute.TestState.Untested)]
[Developer("rene87")] [Developer("rene87")]
class Mouse : IMouse class Mouse : IMouse
{ {
private int _wheel; private int _wheel;
@ -25,16 +24,11 @@ namespace ANX.InputDevices.Windows.ModernUI
private ButtonState _middle; private ButtonState _middle;
private ButtonState _xButton1; private ButtonState _xButton1;
private ButtonState _xButton2; private ButtonState _xButton2;
public IntPtr WindowHandle public IntPtr WindowHandle
{ {
get get;
{ set;
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
} }
public Mouse() public Mouse()
@ -54,7 +48,6 @@ namespace ANX.InputDevices.Windows.ModernUI
void Mouse_PointerWheelChanged(CoreWindow sender, PointerEventArgs args) void Mouse_PointerWheelChanged(CoreWindow sender, PointerEventArgs args)
{ {
this._wheel += args.CurrentPoint.Properties.MouseWheelDelta; this._wheel += args.CurrentPoint.Properties.MouseWheelDelta;
} }
@ -66,18 +59,22 @@ namespace ANX.InputDevices.Windows.ModernUI
{ {
this._left = ButtonState.Released; this._left = ButtonState.Released;
} }
if (!args.CurrentPoint.Properties.IsMiddleButtonPressed) if (!args.CurrentPoint.Properties.IsMiddleButtonPressed)
{ {
this._middle = ButtonState.Released; this._middle = ButtonState.Released;
} }
if (!args.CurrentPoint.Properties.IsRightButtonPressed) if (!args.CurrentPoint.Properties.IsRightButtonPressed)
{ {
this._right = ButtonState.Released; this._right = ButtonState.Released;
} }
if (!args.CurrentPoint.Properties.IsXButton1Pressed) if (!args.CurrentPoint.Properties.IsXButton1Pressed)
{ {
this._xButton1 = ButtonState.Released; this._xButton1 = ButtonState.Released;
} }
if (!args.CurrentPoint.Properties.IsXButton2Pressed) if (!args.CurrentPoint.Properties.IsXButton2Pressed)
{ {
this._xButton2 = ButtonState.Released; this._xButton2 = ButtonState.Released;
@ -97,22 +94,27 @@ namespace ANX.InputDevices.Windows.ModernUI
{ {
this._left = ButtonState.Pressed; this._left = ButtonState.Pressed;
} }
if (args.CurrentPoint.Properties.IsMiddleButtonPressed) if (args.CurrentPoint.Properties.IsMiddleButtonPressed)
{ {
this._middle = ButtonState.Pressed; this._middle = ButtonState.Pressed;
} }
if (args.CurrentPoint.Properties.IsRightButtonPressed) if (args.CurrentPoint.Properties.IsRightButtonPressed)
{ {
this._right = ButtonState.Pressed; this._right = ButtonState.Pressed;
} }
if (args.CurrentPoint.Properties.IsXButton1Pressed) if (args.CurrentPoint.Properties.IsXButton1Pressed)
{ {
this._xButton1 = ButtonState.Pressed; this._xButton1 = ButtonState.Pressed;
} }
if (args.CurrentPoint.Properties.IsXButton2Pressed) if (args.CurrentPoint.Properties.IsXButton2Pressed)
{ {
this._xButton2 = ButtonState.Pressed; this._xButton2 = ButtonState.Pressed;
} }
this._x = (int)args.CurrentPoint.Position.X; this._x = (int)args.CurrentPoint.Position.X;
this._y = (int)args.CurrentPoint.Position.Y; this._y = (int)args.CurrentPoint.Position.Y;
} }
@ -121,7 +123,6 @@ namespace ANX.InputDevices.Windows.ModernUI
this._left = ButtonState.Pressed; this._left = ButtonState.Pressed;
this._x = (int)args.CurrentPoint.Position.X; this._x = (int)args.CurrentPoint.Position.X;
this._y = (int)args.CurrentPoint.Position.Y; this._y = (int)args.CurrentPoint.Position.Y;
} }
} }
@ -129,16 +130,13 @@ namespace ANX.InputDevices.Windows.ModernUI
{ {
this._x = args.MouseDelta.X; this._x = args.MouseDelta.X;
this._y = args.MouseDelta.Y; this._y = args.MouseDelta.Y;
} }
public MouseState GetState() public MouseState GetState()
{ {
return new MouseState(this._x, this._y, this._wheel, this._left, this._middle, this._right, this._xButton1, this._xButton2); return new MouseState(this._x, this._y, this._wheel, this._left, this._middle, this._right, this._xButton1, this._xButton2);
} }
public void SetPosition(int x, int y) public void SetPosition(int x, int y)
{ {
throw new NotImplementedException(); throw new NotImplementedException();

View File

@ -1,5 +1,9 @@
using ANX.Framework.NonXNA; #region Using Statements
using ANX.Framework.NonXNA;
using ANX.Framework.NonXNA.InputSystem; using ANX.Framework.NonXNA.InputSystem;
using ANX.Framework.NonXNA.Development;
#endregion
// This file is part of the ANX.Framework created by the // This file is part of the ANX.Framework created by the
// "ANX.Framework developer group" and released under the Ms-PL license. // "ANX.Framework developer group" and released under the Ms-PL license.
@ -7,13 +11,11 @@ using ANX.Framework.NonXNA.InputSystem;
namespace ANX.InputDevices.Windows.ModernUI namespace ANX.InputDevices.Windows.ModernUI
{ {
class MouseCreator : IMouseCreator [PercentageComplete(100)]
[TestState(TestStateAttribute.TestState.Tested)]
[Developer("Glatzemann")]
public class MouseCreator : IMouseCreator
{ {
public IMouse CreateDevice()
{
return new Mouse();
}
public string Name public string Name
{ {
get get
@ -29,5 +31,10 @@ namespace ANX.InputDevices.Windows.ModernUI
return 10; return 10;
} }
} }
public IMouse CreateDevice()
{
return new Mouse();
}
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest"> <Package xmlns="http://schemas.microsoft.com/appx/2010/manifest">
<Identity Name="SimpleNoContent" Publisher="CN=ANX-Team" Version="1.0.0.0" /> <Identity Name="SimpleNoContent" Publisher="CN=Roland" Version="1.0.0.0" />
<Properties> <Properties>
<DisplayName>SimpleNoContent</DisplayName> <DisplayName>SimpleNoContent</DisplayName>
<PublisherDisplayName>ANX Developer Team</PublisherDisplayName> <PublisherDisplayName>ANX Developer Team</PublisherDisplayName>

View File

@ -36,15 +36,6 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Game1.cs" /> <Compile Include="Game1.cs" />

View File

@ -11,7 +11,8 @@
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{BC8A1FFA-BEE3-4634-8014-F334798102B3};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <ProjectTypeGuids>{BC8A1FFA-BEE3-4634-8014-F334798102B3};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<DefaultLanguage>en-US</DefaultLanguage> <DefaultLanguage>en-US</DefaultLanguage>
<PackageCertificateKeyFile>Test_TemporaryKey.pfx</PackageCertificateKeyFile> <PackageCertificateKeyFile>SimpleNoContent_WindowsMetro_TemporaryKey.pfx</PackageCertificateKeyFile>
<PackageCertificateThumbprint>1C2E795E3865B788B3FBA2FE1F8BB56353190C08</PackageCertificateThumbprint>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
@ -35,18 +36,6 @@
<PropertyGroup> <PropertyGroup>
<ApplicationIcon>anx.ico</ApplicationIcon> <ApplicationIcon>anx.ico</ApplicationIcon>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Game1.cs" /> <Compile Include="Game1.cs" />
<Compile Include="Program.cs" /> <Compile Include="Program.cs" />
@ -81,6 +70,7 @@
</Target> </Target>
--> -->
<ItemGroup> <ItemGroup>
<None Include="SimpleNoContent_WindowsMetro_TemporaryKey.pfx" />
<None Include="Test_TemporaryKey.pfx" /> <None Include="Test_TemporaryKey.pfx" />
<AppxManifest Include="Manifest.appxmanifest"> <AppxManifest Include="Manifest.appxmanifest">
<SubType>Designer</SubType> <SubType>Designer</SubType>

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern // Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// übernehmen, indem Sie "*" eingeben: // übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.4.1.*")] [assembly: AssemblyVersion("0.4.2.*")]
[assembly: AssemblyFileVersion("0.4.1.0")] [assembly: AssemblyFileVersion("0.4.2.0")]