mirror of https://github.com/axmolengine/axmol.git
added wp8 support files and projects
This commit is contained in:
parent
623b7ae3f5
commit
101818ac62
|
@ -0,0 +1,133 @@
|
|||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2012
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelloCpp", "HelloCpp\HelloCpp.csproj", "{83CC88FE-7E79-4E1E-A129-742987130B5C}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloCppComponent", "HelloCppComponent\HelloCppComponent.vcxproj", "{60EC6889-C3C4-45AD-A006-47D9EE689212}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "..\..\..\cocos\2d\cocos2d_wp8.vcxproj", "{B5AF91B3-64EA-44E1-84B0-D759E93758FB}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CocosDenshion", "..\..\..\cocos\audio\proj.wp8\CocosDenshion.vcxproj", "{DF125891-EEE9-4466-B903-F828FD272158}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "chipmunk", "..\..\..\external\chipmunk\proj.wp8\chipmunk.vcxproj", "{BA568A33-98F9-4D2A-BFFF-C065ADCB447A}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|ARM = Debug|ARM
|
||||
Debug|Mixed Platforms = Debug|Mixed Platforms
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|ARM = Release|ARM
|
||||
Release|Mixed Platforms = Release|Mixed Platforms
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{83CC88FE-7E79-4E1E-A129-742987130B5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{83CC88FE-7E79-4E1E-A129-742987130B5C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{83CC88FE-7E79-4E1E-A129-742987130B5C}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
|
||||
{83CC88FE-7E79-4E1E-A129-742987130B5C}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{83CC88FE-7E79-4E1E-A129-742987130B5C}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{83CC88FE-7E79-4E1E-A129-742987130B5C}.Debug|ARM.Deploy.0 = Debug|ARM
|
||||
{83CC88FE-7E79-4E1E-A129-742987130B5C}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
||||
{83CC88FE-7E79-4E1E-A129-742987130B5C}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
||||
{83CC88FE-7E79-4E1E-A129-742987130B5C}.Debug|Mixed Platforms.Deploy.0 = Debug|x86
|
||||
{83CC88FE-7E79-4E1E-A129-742987130B5C}.Debug|Win32.ActiveCfg = Debug|x86
|
||||
{83CC88FE-7E79-4E1E-A129-742987130B5C}.Debug|Win32.Build.0 = Debug|x86
|
||||
{83CC88FE-7E79-4E1E-A129-742987130B5C}.Debug|Win32.Deploy.0 = Debug|x86
|
||||
{83CC88FE-7E79-4E1E-A129-742987130B5C}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{83CC88FE-7E79-4E1E-A129-742987130B5C}.Debug|x86.Build.0 = Debug|x86
|
||||
{83CC88FE-7E79-4E1E-A129-742987130B5C}.Debug|x86.Deploy.0 = Debug|x86
|
||||
{83CC88FE-7E79-4E1E-A129-742987130B5C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{83CC88FE-7E79-4E1E-A129-742987130B5C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{83CC88FE-7E79-4E1E-A129-742987130B5C}.Release|Any CPU.Deploy.0 = Release|Any CPU
|
||||
{83CC88FE-7E79-4E1E-A129-742987130B5C}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{83CC88FE-7E79-4E1E-A129-742987130B5C}.Release|ARM.Build.0 = Release|ARM
|
||||
{83CC88FE-7E79-4E1E-A129-742987130B5C}.Release|ARM.Deploy.0 = Release|ARM
|
||||
{83CC88FE-7E79-4E1E-A129-742987130B5C}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
||||
{83CC88FE-7E79-4E1E-A129-742987130B5C}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||
{83CC88FE-7E79-4E1E-A129-742987130B5C}.Release|Mixed Platforms.Deploy.0 = Release|x86
|
||||
{83CC88FE-7E79-4E1E-A129-742987130B5C}.Release|Win32.ActiveCfg = Release|x86
|
||||
{83CC88FE-7E79-4E1E-A129-742987130B5C}.Release|Win32.Build.0 = Release|x86
|
||||
{83CC88FE-7E79-4E1E-A129-742987130B5C}.Release|Win32.Deploy.0 = Release|x86
|
||||
{83CC88FE-7E79-4E1E-A129-742987130B5C}.Release|x86.ActiveCfg = Release|x86
|
||||
{83CC88FE-7E79-4E1E-A129-742987130B5C}.Release|x86.Build.0 = Release|x86
|
||||
{83CC88FE-7E79-4E1E-A129-742987130B5C}.Release|x86.Deploy.0 = Release|x86
|
||||
{60EC6889-C3C4-45AD-A006-47D9EE689212}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||
{60EC6889-C3C4-45AD-A006-47D9EE689212}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{60EC6889-C3C4-45AD-A006-47D9EE689212}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{60EC6889-C3C4-45AD-A006-47D9EE689212}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
||||
{60EC6889-C3C4-45AD-A006-47D9EE689212}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
||||
{60EC6889-C3C4-45AD-A006-47D9EE689212}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{60EC6889-C3C4-45AD-A006-47D9EE689212}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{60EC6889-C3C4-45AD-A006-47D9EE689212}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{60EC6889-C3C4-45AD-A006-47D9EE689212}.Debug|x86.Build.0 = Debug|Win32
|
||||
{60EC6889-C3C4-45AD-A006-47D9EE689212}.Release|Any CPU.ActiveCfg = Release|Win32
|
||||
{60EC6889-C3C4-45AD-A006-47D9EE689212}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{60EC6889-C3C4-45AD-A006-47D9EE689212}.Release|ARM.Build.0 = Release|ARM
|
||||
{60EC6889-C3C4-45AD-A006-47D9EE689212}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
||||
{60EC6889-C3C4-45AD-A006-47D9EE689212}.Release|Mixed Platforms.Build.0 = Release|Win32
|
||||
{60EC6889-C3C4-45AD-A006-47D9EE689212}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{60EC6889-C3C4-45AD-A006-47D9EE689212}.Release|Win32.Build.0 = Release|Win32
|
||||
{60EC6889-C3C4-45AD-A006-47D9EE689212}.Release|x86.ActiveCfg = Release|Win32
|
||||
{60EC6889-C3C4-45AD-A006-47D9EE689212}.Release|x86.Build.0 = Release|Win32
|
||||
{B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||
{B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
||||
{B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
||||
{B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Debug|x86.Build.0 = Debug|Win32
|
||||
{B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Release|Any CPU.ActiveCfg = Release|Win32
|
||||
{B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Release|ARM.Build.0 = Release|ARM
|
||||
{B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
||||
{B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Release|Mixed Platforms.Build.0 = Release|Win32
|
||||
{B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Release|Win32.Build.0 = Release|Win32
|
||||
{B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Release|x86.ActiveCfg = Release|Win32
|
||||
{B5AF91B3-64EA-44E1-84B0-D759E93758FB}.Release|x86.Build.0 = Release|Win32
|
||||
{DF125891-EEE9-4466-B903-F828FD272158}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||
{DF125891-EEE9-4466-B903-F828FD272158}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{DF125891-EEE9-4466-B903-F828FD272158}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{DF125891-EEE9-4466-B903-F828FD272158}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
||||
{DF125891-EEE9-4466-B903-F828FD272158}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
||||
{DF125891-EEE9-4466-B903-F828FD272158}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{DF125891-EEE9-4466-B903-F828FD272158}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{DF125891-EEE9-4466-B903-F828FD272158}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{DF125891-EEE9-4466-B903-F828FD272158}.Debug|x86.Build.0 = Debug|Win32
|
||||
{DF125891-EEE9-4466-B903-F828FD272158}.Release|Any CPU.ActiveCfg = Release|Win32
|
||||
{DF125891-EEE9-4466-B903-F828FD272158}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{DF125891-EEE9-4466-B903-F828FD272158}.Release|ARM.Build.0 = Release|ARM
|
||||
{DF125891-EEE9-4466-B903-F828FD272158}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
||||
{DF125891-EEE9-4466-B903-F828FD272158}.Release|Mixed Platforms.Build.0 = Release|Win32
|
||||
{DF125891-EEE9-4466-B903-F828FD272158}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{DF125891-EEE9-4466-B903-F828FD272158}.Release|Win32.Build.0 = Release|Win32
|
||||
{DF125891-EEE9-4466-B903-F828FD272158}.Release|x86.ActiveCfg = Release|Win32
|
||||
{DF125891-EEE9-4466-B903-F828FD272158}.Release|x86.Build.0 = Release|Win32
|
||||
{BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||
{BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
||||
{BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
||||
{BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Debug|x86.Build.0 = Debug|Win32
|
||||
{BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Release|Any CPU.ActiveCfg = Release|Win32
|
||||
{BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Release|ARM.Build.0 = Release|ARM
|
||||
{BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
||||
{BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Release|Mixed Platforms.Build.0 = Release|Win32
|
||||
{BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Release|Win32.Build.0 = Release|Win32
|
||||
{BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Release|x86.ActiveCfg = Release|Win32
|
||||
{BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -0,0 +1,20 @@
|
|||
<Application
|
||||
x:Class="PhoneDirect3DXamlAppInterop.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
|
||||
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone">
|
||||
|
||||
<!--Application Resources-->
|
||||
<Application.Resources>
|
||||
<local:LocalizedStrings xmlns:local="clr-namespace:PhoneDirect3DXamlAppInterop" x:Key="LocalizedStrings"/>
|
||||
</Application.Resources>
|
||||
|
||||
<Application.ApplicationLifetimeObjects>
|
||||
<!--Required object that handles lifetime events for the application-->
|
||||
<shell:PhoneApplicationService
|
||||
Launching="Application_Launching" Closing="Application_Closing"
|
||||
Activated="Application_Activated" Deactivated="Application_Deactivated"/>
|
||||
</Application.ApplicationLifetimeObjects>
|
||||
|
||||
</Application>
|
|
@ -0,0 +1,169 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using Microsoft.Phone.Controls;
|
||||
using Microsoft.Phone.Shell;
|
||||
|
||||
namespace PhoneDirect3DXamlAppInterop
|
||||
{
|
||||
public partial class App : Application
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides easy access to the root frame of the Phone Application.
|
||||
/// </summary>
|
||||
/// <returns>The root frame of the Phone Application.</returns>
|
||||
public PhoneApplicationFrame RootFrame { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Constructor for the Application object.
|
||||
/// </summary>
|
||||
public App()
|
||||
{
|
||||
// Global handler for uncaught exceptions.
|
||||
UnhandledException += Application_UnhandledException;
|
||||
|
||||
// Standard Silverlight initialization
|
||||
InitializeComponent();
|
||||
|
||||
// Phone-specific initialization
|
||||
InitializePhoneApplication();
|
||||
|
||||
// Show graphics profiling information while debugging.
|
||||
if (System.Diagnostics.Debugger.IsAttached)
|
||||
{
|
||||
// Display the current frame rate counters.
|
||||
Application.Current.Host.Settings.EnableFrameRateCounter = false;
|
||||
|
||||
// Show the areas of the app that are being redrawn in each frame.
|
||||
//Application.Current.Host.Settings.EnableRedrawRegions = true;
|
||||
|
||||
// Enable non-production analysis visualization mode,
|
||||
// which shows areas of a page that are handed off to GPU with a colored overlay.
|
||||
//Application.Current.Host.Settings.EnableCacheVisualization = true;
|
||||
|
||||
// Disable the application idle detection by setting the UserIdleDetectionMode property of the
|
||||
// application's PhoneApplicationService object to Disabled.
|
||||
// Caution:- Use this under debug mode only. Application that disables user idle detection will continue to run
|
||||
// and consume battery power when the user is not using the phone.
|
||||
PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Code to execute when the application is launching (eg, from Start)
|
||||
// This code will not execute when the application is reactivated
|
||||
private void Application_Launching(object sender, LaunchingEventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
// Code to execute when the application is activated (brought to foreground)
|
||||
// This code will not execute when the application is first launched
|
||||
private void Application_Activated(object sender, ActivatedEventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
// Code to execute when the application is deactivated (sent to background)
|
||||
// This code will not execute when the application is closing
|
||||
private void Application_Deactivated(object sender, DeactivatedEventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
// Code to execute when the application is closing (eg, user hit Back)
|
||||
// This code will not execute when the application is deactivated
|
||||
private void Application_Closing(object sender, ClosingEventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
// Code to execute if a navigation fails
|
||||
private void RootFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)
|
||||
{
|
||||
if (System.Diagnostics.Debugger.IsAttached)
|
||||
{
|
||||
// A navigation has failed; break into the debugger
|
||||
System.Diagnostics.Debugger.Break();
|
||||
}
|
||||
}
|
||||
|
||||
// Code to execute on Unhandled Exceptions
|
||||
private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
|
||||
{
|
||||
if (System.Diagnostics.Debugger.IsAttached)
|
||||
{
|
||||
// An unhandled exception has occurred; break into the debugger
|
||||
System.Diagnostics.Debugger.Break();
|
||||
}
|
||||
}
|
||||
|
||||
#region Phone application initialization
|
||||
|
||||
// Avoid double-initialization
|
||||
private bool phoneApplicationInitialized = false;
|
||||
|
||||
// Do not add any additional code to this method
|
||||
private void InitializePhoneApplication()
|
||||
{
|
||||
if (phoneApplicationInitialized)
|
||||
return;
|
||||
|
||||
// Create the frame but don't set it as RootVisual yet; this allows the splash
|
||||
// screen to remain active until the application is ready to render.
|
||||
RootFrame = new PhoneApplicationFrame();
|
||||
RootFrame.Navigated += CompleteInitializePhoneApplication;
|
||||
|
||||
// Handle navigation failures
|
||||
RootFrame.NavigationFailed += RootFrame_NavigationFailed;
|
||||
|
||||
// Handle reset requests for clearing the backstack
|
||||
RootFrame.Navigated += CheckForResetNavigation;
|
||||
|
||||
// Ensure we don't initialize again
|
||||
phoneApplicationInitialized = true;
|
||||
}
|
||||
|
||||
// Do not add any additional code to this method
|
||||
private void CompleteInitializePhoneApplication(object sender, NavigationEventArgs e)
|
||||
{
|
||||
// Set the root visual to allow the application to render
|
||||
if (RootVisual != RootFrame)
|
||||
RootVisual = RootFrame;
|
||||
|
||||
// Remove this handler since it is no longer needed
|
||||
RootFrame.Navigated -= CompleteInitializePhoneApplication;
|
||||
}
|
||||
|
||||
private void CheckForResetNavigation(object sender, NavigationEventArgs e)
|
||||
{
|
||||
// If the app has received a 'reset' navigation, then we need to check
|
||||
// on the next navigation to see if the page stack should be reset
|
||||
if (e.NavigationMode == NavigationMode.Reset)
|
||||
RootFrame.Navigated += ClearBackStackAfterReset;
|
||||
}
|
||||
|
||||
private void ClearBackStackAfterReset(object sender, NavigationEventArgs e)
|
||||
{
|
||||
// Unregister the event so it doesn't get called again
|
||||
RootFrame.Navigated -= ClearBackStackAfterReset;
|
||||
|
||||
// Only clear the stack for 'new' (forward) navigations
|
||||
if (e.NavigationMode != NavigationMode.New)
|
||||
return;
|
||||
|
||||
// For UI consistency, clear the entire page stack
|
||||
while (RootFrame.RemoveBackEntry() != null)
|
||||
{
|
||||
; // do nothing
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
abc899cd55086105f439df7a6d01db84168aebb5
|
|
@ -0,0 +1,20 @@
|
|||
<UserControl x:Class="PhoneDirect3DXamlAppInterop.EditBox"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
d:DesignHeight="480" d:DesignWidth="480">
|
||||
|
||||
<Grid x:Name="LayoutRoot" Background="{StaticResource PhoneSemitransparentBrush}">
|
||||
<!--<TextBox KeyDown="OnKeyDownHandler" Height="72" x:Name="textinput" TextWrapping="Wrap" VerticalAlignment="Top" Margin="0,0,220,0" TextChanged="textinput_TextChanged"/>-->
|
||||
<!-- comment TextBox and uncomment PasswordBox to use PasswordBox -->
|
||||
<!--<PasswordBox KeyDown="OnKeyDownHandler" Height="72" x:Name="textinput" TextWrapping="Wrap" VerticalAlignment="Top" Margin="0,0,220,0" TextChanged="textinput_TextChanged"/>-->
|
||||
<Button Content="Done" VerticalAlignment="Top" Width="108" Background="{StaticResource PhoneChromeBrush}" HorizontalAlignment="Right" Margin="0,0,120,0" Click="Done_Click"/>
|
||||
<Button Content="Cancel" VerticalAlignment="Top" Width="131" Background="{StaticResource PhoneChromeBrush}" HorizontalAlignment="Right" Click="Cancel_Click"/>
|
||||
|
||||
</Grid>
|
||||
</UserControl>
|
|
@ -0,0 +1,191 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2014 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Navigation;
|
||||
using Microsoft.Phone.Controls;
|
||||
using Microsoft.Phone.Shell;
|
||||
using PhoneDirect3DXamlAppComponent;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace PhoneDirect3DXamlAppInterop
|
||||
{
|
||||
public partial class EditBox : UserControl
|
||||
{
|
||||
private MainPage m_mainPage = null;
|
||||
private String m_strText = "";
|
||||
private String m_strPlaceholder = "";
|
||||
private bool bIsFocus = false;
|
||||
private int m_inputFlag = 0;
|
||||
private Control m_textinput = null;
|
||||
|
||||
public void initTextinput(int maxLen, int inputMode)
|
||||
{
|
||||
if (m_inputFlag == 0)
|
||||
{
|
||||
// kEditBoxInputFlagPassword
|
||||
PasswordBox pwdBox = new PasswordBox();
|
||||
pwdBox.MaxLength = maxLen < 0 ? 0 : maxLen;
|
||||
pwdBox.Password = m_strText;
|
||||
pwdBox.GotFocus += pwdBox_GotFocus;
|
||||
m_textinput = pwdBox;
|
||||
}
|
||||
else
|
||||
{
|
||||
TextBox textbox = new TextBox();
|
||||
textbox.MaxLength = maxLen < 0 ? 0 : maxLen;
|
||||
SetInputScope(textbox, inputMode);
|
||||
textbox.TextChanged += textinput_TextChanged;
|
||||
textbox.GotFocus += textinput_GotFocus;
|
||||
textbox.LostFocus += textinput_LostFocus;
|
||||
m_textinput = textbox;
|
||||
}
|
||||
m_textinput.Margin = new System.Windows.Thickness(0, 0, 220, 0);
|
||||
m_textinput.Height = 72.0;
|
||||
m_textinput.TabIndex = 0;
|
||||
m_textinput.VerticalAlignment = VerticalAlignment.Top;
|
||||
m_textinput.KeyDown += OnKeyDownHandler;
|
||||
this.LayoutRoot.Children.Add(m_textinput);
|
||||
}
|
||||
|
||||
void pwdBox_GotFocus(object sender, RoutedEventArgs e)
|
||||
{
|
||||
((PasswordBox)m_textinput).SelectAll();
|
||||
}
|
||||
|
||||
public EditBox(MainPage page, String strPlaceholder, String strText, int maxLen, int inputMode, int inputFlag)
|
||||
{
|
||||
m_mainPage = page;
|
||||
InitializeComponent();
|
||||
m_strText = strText;
|
||||
m_strPlaceholder = strPlaceholder;
|
||||
m_inputFlag = inputFlag;
|
||||
initTextinput(maxLen, inputMode);
|
||||
this.Loaded += EditBox_Loaded;
|
||||
}
|
||||
|
||||
void EditBox_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
m_textinput.Focus();
|
||||
}
|
||||
|
||||
void textinput_LostFocus(object sender, RoutedEventArgs e)
|
||||
{
|
||||
// TextBox.LostFocus
|
||||
TextBox curBox = (TextBox)m_textinput;
|
||||
bIsFocus = false;
|
||||
m_strText = curBox.Text;
|
||||
string strText = "";
|
||||
strText = curBox.Text;
|
||||
if (strText == "" && m_inputFlag != 0)
|
||||
{
|
||||
curBox.Text = m_strPlaceholder;
|
||||
}
|
||||
}
|
||||
|
||||
void textinput_GotFocus(object sender, RoutedEventArgs e)
|
||||
{
|
||||
// TextBox.GotFocus
|
||||
TextBox curBox = (TextBox)m_textinput;
|
||||
bIsFocus = true;
|
||||
curBox.Text = m_strText;
|
||||
curBox.Select(curBox.Text.Length, 0);
|
||||
}
|
||||
|
||||
private void OnKeyDownHandler(object sender, System.Windows.Input.KeyEventArgs e)
|
||||
{
|
||||
switch (e.Key)
|
||||
{
|
||||
case Key.Enter:
|
||||
Done_Click(sender, null);
|
||||
e.Handled = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void Done_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
m_mainPage.OnSelectText(sender, m_inputFlag == 0 ? ((PasswordBox)m_textinput).Password : m_strText);
|
||||
((Grid)this.Parent).Children.Remove(this);
|
||||
}
|
||||
|
||||
private void Cancel_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
((Grid)this.Parent).Children.Remove(this);
|
||||
}
|
||||
|
||||
private void textinput_TextChanged(object sender, TextChangedEventArgs e)
|
||||
{
|
||||
// TextBox.textinput_TextChanged
|
||||
if (bIsFocus)
|
||||
m_strText = ((TextBox)m_textinput).Text;
|
||||
}
|
||||
|
||||
private void SetInputScope(TextBox curBox, int inputMode)
|
||||
{
|
||||
// TextBox.SetInputScope
|
||||
InputScope inputScope = new InputScope();
|
||||
InputScopeName name = new InputScopeName();
|
||||
|
||||
switch (inputMode)
|
||||
{
|
||||
case 0:// kEditBoxInputModeAny
|
||||
name.NameValue = InputScopeNameValue.Default;
|
||||
break;
|
||||
case 1:// kEditBoxInputModeEmailAddr
|
||||
name.NameValue = InputScopeNameValue.EmailNameOrAddress;
|
||||
break;
|
||||
case 2:// kEditBoxInputModeNumeric
|
||||
name.NameValue = InputScopeNameValue.Number;
|
||||
break;
|
||||
case 3:// kEditBoxInputModePhoneNumber
|
||||
name.NameValue = InputScopeNameValue.TelephoneNumber;
|
||||
break;
|
||||
case 4:// kEditBoxInputModeUrl
|
||||
name.NameValue = InputScopeNameValue.Url;
|
||||
break;
|
||||
case 5:// kEditBoxInputModeDecimal
|
||||
name.NameValue = InputScopeNameValue.Digits;
|
||||
break;
|
||||
case 6:// kEditBoxInputModeSingleLine
|
||||
name.NameValue = InputScopeNameValue.Default;
|
||||
break;
|
||||
default:
|
||||
name.NameValue = InputScopeNameValue.Default;
|
||||
break;
|
||||
}
|
||||
|
||||
inputScope.Names.Add(name);
|
||||
curBox.InputScope = inputScope;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,177 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>10.0.20506</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{83CC88FE-7E79-4E1E-A129-742987130B5C}</ProjectGuid>
|
||||
<ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>PhoneDirect3DXamlAppInterop</RootNamespace>
|
||||
<AssemblyName>PhoneDirect3DXamlAppInterop</AssemblyName>
|
||||
<TargetFrameworkIdentifier>WindowsPhone</TargetFrameworkIdentifier>
|
||||
<TargetFrameworkVersion>v8.0</TargetFrameworkVersion>
|
||||
<SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
|
||||
<SilverlightApplication>true</SilverlightApplication>
|
||||
<SupportedCultures>
|
||||
</SupportedCultures>
|
||||
<XapOutputs>true</XapOutputs>
|
||||
<GenerateSilverlightManifest>true</GenerateSilverlightManifest>
|
||||
<XapFilename>PhoneDirect3DXamlAppInterop_$(Configuration)_$(Platform).xap</XapFilename>
|
||||
<SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
|
||||
<SilverlightAppEntry>PhoneDirect3DXamlAppInterop.App</SilverlightAppEntry>
|
||||
<ValidateXaml>true</ValidateXaml>
|
||||
<MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
|
||||
<ThrowErrorsInValidation>true</ThrowErrorsInValidation>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>Bin\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
|
||||
<NoStdLib>true</NoStdLib>
|
||||
<NoConfig>true</NoConfig>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>Bin\Release</OutputPath>
|
||||
<DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
|
||||
<NoStdLib>true</NoStdLib>
|
||||
<NoConfig>true</NoConfig>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>Bin\x86\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
|
||||
<NoStdLib>true</NoStdLib>
|
||||
<NoConfig>true</NoConfig>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>Bin\x86\Release</OutputPath>
|
||||
<DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
|
||||
<NoStdLib>true</NoStdLib>
|
||||
<NoConfig>true</NoConfig>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|ARM' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>Bin\ARM\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
|
||||
<NoStdLib>true</NoStdLib>
|
||||
<NoConfig>true</NoConfig>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|ARM' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>Bin\ARM\Release</OutputPath>
|
||||
<DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
|
||||
<NoStdLib>true</NoStdLib>
|
||||
<NoConfig>true</NoConfig>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="App.xaml.cs" />
|
||||
<Compile Include="EditBox.xaml.cs" />
|
||||
<Compile Include="LocalizedStrings.cs" />
|
||||
<Compile Include="MainPage.xaml.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Resources\AppResources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>AppResources.resx</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Properties\AppManifest.xml" />
|
||||
<None Include="Properties\WMAppManifest.xml">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Assets\AlignmentGrid.png" />
|
||||
<Content Include="Assets\ApplicationIcon.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Assets\Tiles\FlipCycleTileLarge.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Assets\Tiles\FlipCycleTileMedium.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Assets\Tiles\FlipCycleTileSmall.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Assets\Tiles\IconicTileMediumLarge.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Assets\Tiles\IconicTileSmall.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="SplashScreenImage.jpg" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\HelloCppComponent\HelloCppComponent.vcxproj">
|
||||
<Name>HelloCppComponent</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Resources\AppResources.resx">
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>AppResources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Include="App.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="EditBox.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="MainPage.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="..\..\Resources\**\*">
|
||||
<Link>Assets\Resources\%(RecursiveDir)%(FileName)%(Extension)</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<ProjectExtensions />
|
||||
|
||||
</Project>
|
|
@ -0,0 +1,14 @@
|
|||
using PhoneDirect3DXamlAppInterop.Resources;
|
||||
|
||||
namespace PhoneDirect3DXamlAppInterop
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides access to string resources.
|
||||
/// </summary>
|
||||
public class LocalizedStrings
|
||||
{
|
||||
private static AppResources _localizedResources = new AppResources();
|
||||
|
||||
public AppResources LocalizedResources { get { return _localizedResources; } }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
<phone:PhoneApplicationPage
|
||||
x:Class="PhoneDirect3DXamlAppInterop.MainPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
|
||||
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
SupportedOrientations="Landscape" Orientation="Landscape"
|
||||
shell:SystemTray.IsVisible="False">
|
||||
|
||||
<!--LayoutRoot is the root grid where all page content is placed-->
|
||||
<DrawingSurfaceBackgroundGrid x:Name="DrawingSurfaceBackground" Loaded="DrawingSurfaceBackground_Loaded">
|
||||
<StackPanel Orientation="Horizontal" Margin="10,0,0,0" Height="30" VerticalAlignment="Top" x:Name="MemoryDisplay">
|
||||
<TextBlock Text="Memory: "/>
|
||||
<TextBlock x:Name="MemoryTextBlock"/>
|
||||
<TextBlock Text=" MB"/>
|
||||
<TextBlock Text=" Peak: "/>
|
||||
<TextBlock x:Name="PeakMemoryTextBlock"/>
|
||||
<TextBlock Text=" MB"/>
|
||||
</StackPanel>
|
||||
</DrawingSurfaceBackgroundGrid>
|
||||
|
||||
</phone:PhoneApplicationPage>
|
|
@ -0,0 +1,202 @@
|
|||
#if DEBUG
|
||||
#define DISPLAY_MEMORY
|
||||
#endif
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Shapes;
|
||||
using Microsoft.Phone.Controls;
|
||||
using PhoneDirect3DXamlAppComponent;
|
||||
using System.Threading;
|
||||
using System.Diagnostics;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Phone.Shell;
|
||||
using Windows.UI.Input;
|
||||
using System.Windows.Threading;
|
||||
using Microsoft.Phone.Info;
|
||||
|
||||
namespace PhoneDirect3DXamlAppInterop
|
||||
{
|
||||
public partial class MainPage : PhoneApplicationPage
|
||||
{
|
||||
private Direct3DInterop m_d3dInterop = null;
|
||||
private DispatcherTimer m_timer;
|
||||
|
||||
// event handler for CCEditBox
|
||||
private event EventHandler<String> m_receiveHandler;
|
||||
|
||||
// invisible XAML TextBox for Cocos2d-x keyboard input
|
||||
TextBox m_textBox = null;
|
||||
|
||||
// Constructor
|
||||
public MainPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
#if DISPLAY_MEMORY
|
||||
StartTimer();
|
||||
#else
|
||||
MemoryDisplay.Visibility = Visibility.Collapsed;
|
||||
#endif
|
||||
}
|
||||
|
||||
private void DrawingSurfaceBackground_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (m_d3dInterop == null)
|
||||
{
|
||||
m_d3dInterop = new Direct3DInterop();
|
||||
|
||||
// Set WindowBounds to size of DrawingSurface
|
||||
m_d3dInterop.WindowBounds = new Windows.Foundation.Size(
|
||||
(float)Application.Current.Host.Content.ActualWidth,
|
||||
(float)Application.Current.Host.Content.ActualHeight
|
||||
);
|
||||
|
||||
// Hook-up native component to DrawingSurfaceBackgroundGrid
|
||||
DrawingSurfaceBackground.SetBackgroundContentProvider(m_d3dInterop.CreateContentProvider());
|
||||
DrawingSurfaceBackground.SetBackgroundManipulationHandler(m_d3dInterop);
|
||||
|
||||
// Hook-up Cocos2d-x delegates
|
||||
m_d3dInterop.SetCocos2dEventDelegate(OnCocos2dEvent);
|
||||
m_d3dInterop.SetCocos2dMessageBoxDelegate(OnCocos2dMessageBoxEvent);
|
||||
m_d3dInterop.SetCocos2dEditBoxDelegate(OpenEditBox);
|
||||
}
|
||||
}
|
||||
|
||||
// called when the user presses the back button on the device
|
||||
protected override void OnBackKeyPress(CancelEventArgs e)
|
||||
{
|
||||
m_d3dInterop.OnBackKeyPress();
|
||||
// cocos2d-x will async send Cocos2dEvent.TerminateApp event if it is time to exit app.
|
||||
// We do not want to exit now, so we set e.Cancel to true.
|
||||
e.Cancel = true;
|
||||
}
|
||||
|
||||
public void OnKeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
ModifierKeys modifiers = Keyboard.Modifiers;
|
||||
|
||||
switch (e.Key)
|
||||
{
|
||||
case Key.Escape:
|
||||
m_d3dInterop.OnCocos2dKeyEvent(Cocos2dKeyEvent.Escape);
|
||||
e.Handled = true;
|
||||
break;
|
||||
case Key.Back:
|
||||
m_d3dInterop.OnCocos2dKeyEvent(Cocos2dKeyEvent.Back);
|
||||
e.Handled = true;
|
||||
break;
|
||||
case Key.Enter:
|
||||
m_d3dInterop.OnCocos2dKeyEvent(Cocos2dKeyEvent.Enter);
|
||||
e.Handled = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void OnKeyUp(object sender, KeyEventArgs e)
|
||||
{
|
||||
m_d3dInterop.OnCocos2dKeyEvent(Cocos2dKeyEvent.Text, m_textBox.Text);
|
||||
m_textBox.Text = "";
|
||||
}
|
||||
|
||||
// Called by the Cocos2d-x C++ engine to display a MessageBox
|
||||
public void OnCocos2dMessageBoxEvent(String title, String text)
|
||||
{
|
||||
Dispatcher.BeginInvoke(() =>
|
||||
{
|
||||
MessageBox.Show(text, title, MessageBoxButton.OK);
|
||||
});
|
||||
}
|
||||
|
||||
// events called by the Cocos2d-x C++ engine to be handled by C#
|
||||
public void OnCocos2dEvent(Cocos2dEvent theEvent)
|
||||
{
|
||||
Dispatcher.BeginInvoke(() =>
|
||||
{
|
||||
switch (theEvent)
|
||||
{
|
||||
case Cocos2dEvent.TerminateApp:
|
||||
Application.Current.Terminate();
|
||||
break;
|
||||
|
||||
case Cocos2dEvent.ShowKeyboard:
|
||||
if (m_textBox == null)
|
||||
{
|
||||
m_textBox = new TextBox();
|
||||
m_textBox.Opacity = 0.0;
|
||||
m_textBox.Width = 1;
|
||||
m_textBox.Height = 1;
|
||||
m_textBox.MaxLength = 1;
|
||||
m_textBox.KeyDown += OnKeyDown;
|
||||
m_textBox.KeyUp += OnKeyUp;
|
||||
DrawingSurfaceBackground.Children.Add(m_textBox);
|
||||
}
|
||||
m_textBox.Focus();
|
||||
break;
|
||||
|
||||
case Cocos2dEvent.HideKeyboard:
|
||||
if (m_textBox != null)
|
||||
{
|
||||
DrawingSurfaceBackground.Children.Remove(m_textBox);
|
||||
}
|
||||
m_textBox = null;
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Called by the Cocos2d-x C++ engine to display a CCEditBox
|
||||
public void OpenEditBox(String strPlaceHolder, string strText, int maxLength, int inputMode, int inputFlag, EventHandler<String> receiveHandler)
|
||||
{
|
||||
m_receiveHandler = receiveHandler;
|
||||
Deployment.Current.Dispatcher.BeginInvoke(() =>
|
||||
{
|
||||
EditBox editbox = new EditBox(this, strPlaceHolder, strText, maxLength, inputMode, inputFlag);
|
||||
DrawingSurfaceBackground.Children.Add(editbox);
|
||||
});
|
||||
}
|
||||
|
||||
public void OnSelectText(object sender, String str)
|
||||
{
|
||||
if (m_d3dInterop != null && m_receiveHandler != null)
|
||||
{
|
||||
m_d3dInterop.OnCocos2dEditboxEvent(sender, str, m_receiveHandler);
|
||||
}
|
||||
}
|
||||
|
||||
private void StartTimer()
|
||||
{
|
||||
m_timer = new DispatcherTimer();
|
||||
m_timer.Interval = new TimeSpan(0, 0, 1);
|
||||
m_timer.Tick += new EventHandler(TimerTick);
|
||||
m_timer.Start();
|
||||
}
|
||||
|
||||
private void TimerTick(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
// These are TextBlock controls that are created in the page’s XAML file.
|
||||
float value = DeviceStatus.ApplicationCurrentMemoryUsage / (1024.0f * 1024.0f);
|
||||
MemoryTextBlock.Text = value.ToString();
|
||||
value = DeviceStatus.ApplicationPeakMemoryUsage / (1024.0f * 1024.0f);
|
||||
PeakMemoryTextBlock.Text = value.ToString();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MemoryTextBlock.Text = ex.Message;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
>
|
||||
<Deployment.Parts>
|
||||
</Deployment.Parts>
|
||||
</Deployment>
|
|
@ -0,0 +1,37 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Resources;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("PhoneDirect3DXamlAppInterop")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("PhoneDirect3DXamlAppInterop")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2012")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("e9152507-1b95-4fca-9d7f-444a024ccb98")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: NeutralResourcesLanguageAttribute("en-US")]
|
|
@ -0,0 +1,37 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Deployment xmlns="http://schemas.microsoft.com/windowsphone/2012/deployment" AppPlatformVersion="8.0">
|
||||
<DefaultLanguage xmlns="" code="en-US" />
|
||||
<App xmlns="" ProductID="{83cc88fe-7e79-4e1e-a129-742987130b5c}" Title="PhoneDirect3DXamlAppInterop" RuntimeType="Silverlight" Version="1.0.0.0" Genre="apps.normal" Author="PhoneDirect3DXamlAppInterop author" Description="Sample description" Publisher="PhoneDirect3DXamlAppInterop" PublisherID="{ebf6c0e1-80a3-41f1-8553-4aaab70da912}">
|
||||
<IconPath IsRelative="true" IsResource="false">Assets\ApplicationIcon.png</IconPath>
|
||||
<Capabilities>
|
||||
<Capability Name="ID_CAP_NETWORKING"/>
|
||||
<Capability Name="ID_CAP_MEDIALIB_AUDIO"/>
|
||||
<Capability Name="ID_CAP_MEDIALIB_PLAYBACK"/>
|
||||
<Capability Name="ID_CAP_SENSORS"/>
|
||||
<Capability Name="ID_CAP_WEBBROWSERCOMPONENT"/>
|
||||
</Capabilities>
|
||||
<Tasks>
|
||||
<DefaultTask Name="_default" NavigationPage="MainPage.xaml" />
|
||||
</Tasks>
|
||||
<Tokens>
|
||||
<PrimaryToken TokenID="PhoneDirect3DXamlAppInteropToken" TaskName="_default">
|
||||
<TemplateFlip>
|
||||
<SmallImageURI IsRelative="true" IsResource="false">Assets\Tiles\FlipCycleTileSmall.png</SmallImageURI>
|
||||
<Count>0</Count>
|
||||
<BackgroundImageURI IsRelative="true" IsResource="false">Assets\Tiles\FlipCycleTileMedium.png</BackgroundImageURI>
|
||||
<Title>PhoneDirect3DXamlAppInterop</Title>
|
||||
<BackContent></BackContent>
|
||||
<BackBackgroundImageURI></BackBackgroundImageURI>
|
||||
<BackTitle></BackTitle>
|
||||
<DeviceLockImageURI></DeviceLockImageURI>
|
||||
<HasLarge></HasLarge>
|
||||
</TemplateFlip>
|
||||
</PrimaryToken>
|
||||
</Tokens>
|
||||
<ScreenResolutions>
|
||||
<ScreenResolution Name="ID_RESOLUTION_WVGA" />
|
||||
<ScreenResolution Name="ID_RESOLUTION_WXGA" />
|
||||
<ScreenResolution Name="ID_RESOLUTION_HD720P" />
|
||||
</ScreenResolutions>
|
||||
</App>
|
||||
</Deployment>
|
83
templates/cpp-template-default/proj.wp8-xaml/HelloCpp/Resources/AppResources.Designer.cs
generated
Normal file
83
templates/cpp-template-default/proj.wp8-xaml/HelloCpp/Resources/AppResources.Designer.cs
generated
Normal file
|
@ -0,0 +1,83 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17626
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace PhoneDirect3DXamlAppInterop.Resources
|
||||
{
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
public class AppResources
|
||||
{
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal AppResources()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
public static global::System.Resources.ResourceManager ResourceManager
|
||||
{
|
||||
get
|
||||
{
|
||||
if (object.ReferenceEquals(resourceMan, null))
|
||||
{
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("PhoneDirect3DXamlAppInterop.Resources.AppResources", typeof(AppResources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
public static global::System.Globalization.CultureInfo Culture
|
||||
{
|
||||
get
|
||||
{
|
||||
return resourceCulture;
|
||||
}
|
||||
set
|
||||
{
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to MY APPLICATION.
|
||||
/// </summary>
|
||||
public static string ApplicationTitle
|
||||
{
|
||||
get
|
||||
{
|
||||
return ResourceManager.GetString("ApplicationTitle", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,123 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="ApplicationTitle" xml:space="preserve">
|
||||
<value>MY APPLICATION</value>
|
||||
</data>
|
||||
</root>
|
|
@ -0,0 +1 @@
|
|||
8a7cdf9e2a742c437953755b7c7735459e36b1ab
|
|
@ -0,0 +1,232 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|ARM">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|ARM">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{60ec6889-c3c4-45ad-a006-47d9ee689212}</ProjectGuid>
|
||||
<RootNamespace>PhoneDirect3DXamlAppComponent</RootNamespace>
|
||||
<DefaultLanguage>en-US</DefaultLanguage>
|
||||
<MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
|
||||
<WinMDAssembly>true</WinMDAssembly>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup>
|
||||
<!-- If OutDir was set outside of the project file, then we will append ProjectName -->
|
||||
<OutDir Condition="'$(OutDirWasSpecified)' == 'true'">$(OutDir)\$(MSBuildProjectName)\</OutDir>
|
||||
<!-- else, OutDir needs to have project specific directory in order to handle files with unique names -->
|
||||
<OutDir Condition="'$(OutDirWasSpecified)' != 'true' and '$(Platform)' == 'Win32'">$(SolutionDir)$(Configuration)\$(MSBuildProjectName)\</OutDir>
|
||||
<OutDir Condition="'$(OutDirWasSpecified)' != 'true' and '$(Platform)' != 'Win32'">$(SolutionDir)$(Platform)\$(Configuration)\$(MSBuildProjectName)\</OutDir>
|
||||
<!-- After OutDir has been fixed, disable Microsoft.common.targets from fixing it again -->
|
||||
<OutDirWasSpecified>false</OutDirWasSpecified>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v110_wp80</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v110_wp80</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v110_wp80</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v110_wp80</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="..\..\..\..\cocos\2d\cocos2d_winrt_headers.props" />
|
||||
<Import Project="..\..\..\..\cocos\2d\cocos2d_winrt.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
||||
<Import Project="..\..\..\..\cocos\2d\cocos2d_winrt_headers.props" />
|
||||
<Import Project="..\..\..\..\cocos\2d\cocos2d_winrt.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="..\..\..\..\cocos\2d\cocos2d_winrt_headers.props" />
|
||||
<Import Project="..\..\..\..\cocos\2d\cocos2d_winrt.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
|
||||
<Import Project="..\..\..\..\cocos\2d\cocos2d_winrt_headers.props" />
|
||||
<Import Project="..\..\..\..\cocos\2d\cocos2d_winrt.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<GenerateManifest>false</GenerateManifest>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>WP8;_WINRT_DLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<AdditionalUsingDirectories>$(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<CompileAsWinRT>true</CompileAsWinRT>
|
||||
<ForcedIncludeFiles>pch.h</ForcedIncludeFiles>
|
||||
<AdditionalOptions>/Zm200 %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)..\..\Classes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
<AdditionalDependencies>d3d11.lib;libGLESv2_phone.lib;libEGL_phone.lib;xaudio2.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<IgnoreSpecificDefaultLibraries>ole32.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<GenerateWindowsMetadata>true</GenerateWindowsMetadata>
|
||||
<AdditionalLibraryDirectories>$(EngineRoot)external\wp8-specific\angle\prebuilt\$(Platform)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>WP8;_WINRT_DLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<AdditionalUsingDirectories>$(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<CompileAsWinRT>true</CompileAsWinRT>
|
||||
<ForcedIncludeFiles>pch.h</ForcedIncludeFiles>
|
||||
<AdditionalOptions>/Zm200 %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)..\..\Classes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
<AdditionalDependencies>d3d11.lib;libGLESv2_phone.lib;libEGL_phone.lib;xaudio2.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<IgnoreSpecificDefaultLibraries>ole32.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<GenerateWindowsMetadata>true</GenerateWindowsMetadata>
|
||||
<AdditionalLibraryDirectories>$(EngineRoot)external\wp8-specific\angle\prebuilt\$(Platform)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>WP8;_WINRT_DLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<AdditionalUsingDirectories>$(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<CompileAsWinRT>true</CompileAsWinRT>
|
||||
<ForcedIncludeFiles>pch.h</ForcedIncludeFiles>
|
||||
<AdditionalOptions>/Zm200 %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)..\..\Classes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
<AdditionalDependencies>d3d11.lib;libGLESv2_phone.lib;libEGL_phone.lib;xaudio2.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<IgnoreSpecificDefaultLibraries>ole32.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<GenerateWindowsMetadata>true</GenerateWindowsMetadata>
|
||||
<AdditionalLibraryDirectories>$(EngineRoot)external\wp8-specific\angle\prebuilt\$(Platform)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>WP8;_WINRT_DLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<AdditionalUsingDirectories>$(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<CompileAsWinRT>true</CompileAsWinRT>
|
||||
<ForcedIncludeFiles>pch.h</ForcedIncludeFiles>
|
||||
<AdditionalOptions>/Zm200 %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)..\..\Classes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
<AdditionalDependencies>d3d11.lib;libGLESv2_phone.lib;libEGL_phone.lib;xaudio2.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<IgnoreSpecificDefaultLibraries>ole32.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<GenerateWindowsMetadata>true</GenerateWindowsMetadata>
|
||||
<AdditionalLibraryDirectories>$(EngineRoot)external\wp8-specific\angle\prebuilt\$(Platform)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="platform.winmd">
|
||||
<IsWinMDFile>true</IsWinMDFile>
|
||||
<Private>false</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\..\cocos\2d\cocos2d_wp8.vcxproj">
|
||||
<Project>{b5af91b3-64ea-44e1-84b0-d759e93758fb}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\cocos\audio\proj.wp8\CocosDenshion.vcxproj">
|
||||
<Project>{df125891-eee9-4466-b903-f828fd272158}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\external\chipmunk\proj.wp8\chipmunk.vcxproj">
|
||||
<Project>{ba568a33-98f9-4d2a-bfff-c065adcb447a}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\..\cocos\2d\platform\wp8-xaml\cpp\Cocos2dRenderer.cpp" />
|
||||
<ClCompile Include="..\..\..\..\cocos\2d\platform\wp8-xaml\cpp\Direct3DContentProvider.cpp" />
|
||||
<ClCompile Include="..\..\..\..\cocos\2d\platform\wp8-xaml\cpp\Direct3DInterop.cpp" />
|
||||
<ClCompile Include="..\..\..\..\cocos\2d\platform\wp8-xaml\cpp\DirectXBase.cpp" />
|
||||
<ClCompile Include="..\..\..\..\cocos\2d\platform\wp8-xaml\cpp\EditBoxEvent.cpp" />
|
||||
<ClCompile Include="..\..\..\..\cocos\2d\platform\wp8-xaml\cpp\InputEvent.cpp" />
|
||||
<ClCompile Include="..\..\Classes\AppDelegate.cpp" />
|
||||
<ClCompile Include="..\..\Classes\HelloWorldScene.cpp" />
|
||||
<ClCompile Include="pch.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\..\cocos\2d\platform\wp8-xaml\cpp\Cocos2dRenderer.h" />
|
||||
<ClInclude Include="..\..\..\..\cocos\2d\platform\wp8-xaml\cpp\Direct3DContentProvider.h" />
|
||||
<ClInclude Include="..\..\..\..\cocos\2d\platform\wp8-xaml\cpp\Direct3DInterop.h" />
|
||||
<ClInclude Include="..\..\..\..\cocos\2d\platform\wp8-xaml\cpp\DirectXBase.h" />
|
||||
<ClInclude Include="..\..\..\..\cocos\2d\platform\wp8-xaml\cpp\DirectXHelper.h" />
|
||||
<ClInclude Include="..\..\..\..\cocos\2d\platform\wp8-xaml\cpp\EditBoxEvent.h" />
|
||||
<ClInclude Include="..\..\..\..\cocos\2d\platform\wp8-xaml\cpp\InputEvent.h" />
|
||||
<ClInclude Include="..\..\..\..\cocos\2d\platform\wp8-xaml\cpp\InputEventTypes.h" />
|
||||
<ClInclude Include="..\..\Classes\AppDelegate.h" />
|
||||
<ClInclude Include="..\..\Classes\HelloWorldScene.h" />
|
||||
<ClInclude Include="pch.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\..\..\external\wp8-specific\angle\prebuilt\ARM\libEGL_phone.dll">
|
||||
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</DeploymentContent>
|
||||
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="..\..\..\..\external\wp8-specific\angle\prebuilt\ARM\libGLESv2_phone.dll">
|
||||
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</DeploymentContent>
|
||||
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="..\..\..\..\external\wp8-specific\angle\prebuilt\Win32\libEGL_phone.dll">
|
||||
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</DeploymentContent>
|
||||
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="..\..\..\..\external\wp8-specific\angle\prebuilt\Win32\libGLESv2_phone.dll">
|
||||
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</DeploymentContent>
|
||||
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DeploymentContent>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsPhone\v$(TargetPlatformVersion)\Microsoft.Cpp.WindowsPhone.$(TargetPlatformVersion).targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
|
@ -0,0 +1,46 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\..\cocos\2d\platform\wp8-xaml\cpp\Cocos2dRenderer.cpp" />
|
||||
<ClCompile Include="..\..\..\..\cocos\2d\platform\wp8-xaml\cpp\Direct3DContentProvider.cpp" />
|
||||
<ClCompile Include="..\..\..\..\cocos\2d\platform\wp8-xaml\cpp\Direct3DInterop.cpp" />
|
||||
<ClCompile Include="..\..\..\..\cocos\2d\platform\wp8-xaml\cpp\DirectXBase.cpp" />
|
||||
<ClCompile Include="..\..\..\..\cocos\2d\platform\wp8-xaml\cpp\EditBoxEvent.cpp" />
|
||||
<ClCompile Include="..\..\..\..\cocos\2d\platform\wp8-xaml\cpp\InputEvent.cpp" />
|
||||
<ClCompile Include="pch.cpp" />
|
||||
<ClCompile Include="..\..\Classes\AppDelegate.cpp">
|
||||
<Filter>Classes</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\Classes\HelloWorldScene.cpp">
|
||||
<Filter>Classes</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\..\cocos\2d\platform\wp8-xaml\cpp\Cocos2dRenderer.h" />
|
||||
<ClInclude Include="..\..\..\..\cocos\2d\platform\wp8-xaml\cpp\Direct3DContentProvider.h" />
|
||||
<ClInclude Include="..\..\..\..\cocos\2d\platform\wp8-xaml\cpp\Direct3DInterop.h" />
|
||||
<ClInclude Include="..\..\..\..\cocos\2d\platform\wp8-xaml\cpp\DirectXBase.h" />
|
||||
<ClInclude Include="..\..\..\..\cocos\2d\platform\wp8-xaml\cpp\DirectXHelper.h" />
|
||||
<ClInclude Include="..\..\..\..\cocos\2d\platform\wp8-xaml\cpp\EditBoxEvent.h" />
|
||||
<ClInclude Include="..\..\..\..\cocos\2d\platform\wp8-xaml\cpp\InputEvent.h" />
|
||||
<ClInclude Include="..\..\..\..\cocos\2d\platform\wp8-xaml\cpp\InputEventTypes.h" />
|
||||
<ClInclude Include="pch.h" />
|
||||
<ClInclude Include="..\..\Classes\AppDelegate.h">
|
||||
<Filter>Classes</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\Classes\HelloWorldScene.h">
|
||||
<Filter>Classes</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="Classes">
|
||||
<UniqueIdentifier>{facbd0ff-d271-46ef-8324-beff0cbcb424}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\..\..\external\wp8-specific\angle\prebuilt\Win32\libEGL_phone.dll" />
|
||||
<None Include="..\..\..\..\external\wp8-specific\angle\prebuilt\Win32\libGLESv2_phone.dll" />
|
||||
<None Include="..\..\..\..\external\wp8-specific\angle\prebuilt\ARM\libEGL_phone.dll" />
|
||||
<None Include="..\..\..\..\external\wp8-specific\angle\prebuilt\ARM\libGLESv2_phone.dll" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -0,0 +1 @@
|
|||
#include "pch.h"
|
|
@ -0,0 +1,3 @@
|
|||
#pragma once
|
||||
|
||||
#include "cocos2d.h"
|
Loading…
Reference in New Issue