(ded4a3e0a) v0.9.0.7
This commit is contained in:
@@ -0,0 +1,110 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{FB8E0F6F-522F-4C22-A2F2-1097EB549FE5}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>MonoDevelop.MonoGame.Android</RootNamespace>
|
||||
<AssemblyName>MonoDevelop.MonoGame.Android</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\bin\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG;</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\bin\Release</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="MonoDevelop.Ide">
|
||||
<HintPath>/Applications/Xamarin Studio.app/Contents/Resources/lib/monodevelop/bin/MonoDevelop.Ide.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="MonoDevelop.Core">
|
||||
<HintPath>/Applications/Xamarin Studio.app/Contents/Resources/lib/monodevelop/bin/MonoDevelop.Core.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="MonoDevelop.DesignerSupport">
|
||||
<HintPath>/Applications/Xamarin Studio.app/Contents/Resources/lib/monodevelop/AddIns/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="MonoDevelop.MonoDroid">
|
||||
<HintPath>/Applications/Xamarin Studio.app/Contents/Resources/lib/monodevelop/AddIns/MonoDevelop.MonoDroid/MonoDevelop.MonoDroid.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Xamarin.Components.Ide">
|
||||
<HintPath>/Applications/Xamarin Studio.app/Contents/Resources/lib/monodevelop/AddIns/Xamarin.Ide/Xamarin.Components.Ide.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Xamarin.Ide">
|
||||
<HintPath>/Applications/Xamarin Studio.app/Contents/Resources/lib/monodevelop/AddIns/Xamarin.Ide/Xamarin.Ide.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Xamarin.Ide.Insights">
|
||||
<HintPath>/Applications/Xamarin Studio.app/Contents/Resources/lib/monodevelop//AddIns/Xamarin.Ide.Insights/Xamarin.Ide.Insights.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\MonoDevelop.MonoGame.Core\MonoDevelop.MonoGame.Core.csproj">
|
||||
<Project>{3FE5AAE8-BE24-4FC3-AF86-2AA3C3CD8DB4}</Project>
|
||||
<Name>MonoDevelop.MonoGame.Core</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="templates\" />
|
||||
<Folder Include="icons\" />
|
||||
<Folder Include="templates\Android\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="templates\MonoGameAndroidProject.xpt.xml">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="templates\Android\AboutAssets.txt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="templates\Android\AboutContent.txt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="templates\Android\AboutResources.txt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="templates\Android\Splash.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="templates\Android\Styles.xml">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="templates\Android\Resource.cs">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="templates\Android\AndroidManifest.xml">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="templates\Android\Activity1.cs">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="MonoGameAndroidProject.cs" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
|
||||
namespace MonoDevelop.MonoGame.Android
|
||||
{
|
||||
public class MonoGameAndroidProject : MonoDevelop.MonoDroid.MonoDroidProject
|
||||
{
|
||||
public MonoGameAndroidProject () : base()
|
||||
{
|
||||
}
|
||||
|
||||
public override MonoDevelop.Projects.SolutionItemConfiguration CreateConfiguration (string name)
|
||||
{
|
||||
return base.CreateConfiguration (name);
|
||||
}
|
||||
|
||||
protected override void PopulateSupportFileList (MonoDevelop.Projects.FileCopySet list, MonoDevelop.Projects.ConfigurationSelector configuration)
|
||||
{
|
||||
base.PopulateSupportFileList (list, configuration);
|
||||
}
|
||||
|
||||
[Obsolete]
|
||||
public override string ProjectType {
|
||||
get {
|
||||
return "MonoGameAndroid";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
// Information about this assembly is defined by the following attributes.
|
||||
// Change them to the values specific to your project.
|
||||
[assembly: AssemblyTitle ("MonoDevelop.MonoGame.Android")]
|
||||
[assembly: AssemblyDescription ("")]
|
||||
[assembly: AssemblyConfiguration ("")]
|
||||
[assembly: AssemblyCompany ("")]
|
||||
[assembly: AssemblyProduct ("")]
|
||||
[assembly: AssemblyCopyright ("MonoGame Team")]
|
||||
[assembly: AssemblyTrademark ("")]
|
||||
[assembly: AssemblyCulture ("")]
|
||||
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
|
||||
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
|
||||
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
|
||||
[assembly: AssemblyVersion ("1.0.*")]
|
||||
// The following attributes are used to specify the signing key for the assembly,
|
||||
// if desired. See the Mono documentation for more information about signing.
|
||||
//[assembly: AssemblyDelaySign(false)]
|
||||
//[assembly: AssemblyKeyFile("")]
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
Any raw assets you want to be deployed with your application can be placed in
|
||||
this directory (and child directories) and given a Build Action of "AndroidAsset".
|
||||
|
||||
These files will be deployed with you package and will be accessible using Android's
|
||||
AssetManager, like this:
|
||||
|
||||
public class ReadAsset : Activity
|
||||
{
|
||||
protected override void OnCreate (Bundle bundle)
|
||||
{
|
||||
base.OnCreate (bundle);
|
||||
|
||||
InputStream input = Assets.Open ("my_asset.txt");
|
||||
}
|
||||
}
|
||||
|
||||
Additionally, some Android functions will automatically load asset files:
|
||||
|
||||
Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");
|
||||
@@ -0,0 +1,44 @@
|
||||
Images, layout descriptions, binary blobs and string dictionaries can be included
|
||||
in your application as resource files. Various Android APIs are designed to
|
||||
operate on the resource IDs instead of dealing with images, strings or binary blobs
|
||||
directly.
|
||||
|
||||
For example, a sample Android app that contains a user interface layout (main.axml),
|
||||
an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
|
||||
would keep its resources in the "Resources" directory of the application:
|
||||
|
||||
Resources/
|
||||
drawable/
|
||||
icon.png
|
||||
|
||||
layout/
|
||||
main.axml
|
||||
|
||||
values/
|
||||
strings.xml
|
||||
|
||||
In order to get the build system to recognize Android resources, set the build action to
|
||||
"AndroidResource". The native Android APIs do not operate directly with filenames, but
|
||||
instead operate on resource IDs. When you compile an Android application that uses resources,
|
||||
the build system will package the resources for distribution and generate a class called "R"
|
||||
(this is an Android convention) that contains the tokens for each one of the resources
|
||||
included. For example, for the above Resources layout, this is what the R class would expose:
|
||||
|
||||
public class R {
|
||||
public class drawable {
|
||||
public const int icon = 0x123;
|
||||
}
|
||||
|
||||
public class layout {
|
||||
public const int main = 0x456;
|
||||
}
|
||||
|
||||
public class strings {
|
||||
public const int first_string = 0xabc;
|
||||
public const int second_string = 0xbcd;
|
||||
}
|
||||
}
|
||||
|
||||
You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main
|
||||
to reference the layout/main.axml file, or R.strings.first_string to reference the first
|
||||
string in the dictionary file values/strings.xml.
|
||||
@@ -0,0 +1,44 @@
|
||||
Images, layout descriptions, binary blobs and string dictionaries can be included
|
||||
in your application as resource files. Various Android APIs are designed to
|
||||
operate on the resource IDs instead of dealing with images, strings or binary blobs
|
||||
directly.
|
||||
|
||||
For example, a sample Android app that contains a user interface layout (main.axml),
|
||||
an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
|
||||
would keep its resources in the "Resources" directory of the application:
|
||||
|
||||
Resources/
|
||||
drawable/
|
||||
icon.png
|
||||
|
||||
layout/
|
||||
main.axml
|
||||
|
||||
values/
|
||||
strings.xml
|
||||
|
||||
In order to get the build system to recognize Android resources, set the build action to
|
||||
"AndroidResource". The native Android APIs do not operate directly with filenames, but
|
||||
instead operate on resource IDs. When you compile an Android application that uses resources,
|
||||
the build system will package the resources for distribution and generate a class called "R"
|
||||
(this is an Android convention) that contains the tokens for each one of the resources
|
||||
included. For example, for the above Resources layout, this is what the R class would expose:
|
||||
|
||||
public class R {
|
||||
public class drawable {
|
||||
public const int icon = 0x123;
|
||||
}
|
||||
|
||||
public class layout {
|
||||
public const int main = 0x456;
|
||||
}
|
||||
|
||||
public class strings {
|
||||
public const int first_string = 0xabc;
|
||||
public const int second_string = 0xbcd;
|
||||
}
|
||||
}
|
||||
|
||||
You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main
|
||||
to reference the layout/main.axml file, or R.strings.first_string to reference the first
|
||||
string in the dictionary file values/strings.xml.
|
||||
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
|
||||
using Android.App;
|
||||
using Android.Content;
|
||||
using Android.Runtime;
|
||||
using Android.Content.PM;
|
||||
using Android.Views;
|
||||
using Android.Widget;
|
||||
using Android.OS;
|
||||
|
||||
using Microsoft.Xna.Framework;
|
||||
|
||||
namespace ${Namespace}
|
||||
{
|
||||
[Activity (Label = "${ProjectName}",
|
||||
MainLauncher = true,
|
||||
Icon = "@drawable/icon",
|
||||
Theme = "@style/Theme.Splash",
|
||||
AlwaysRetainTaskState=true,
|
||||
LaunchMode=LaunchMode.SingleInstance,
|
||||
ScreenOrientation = ScreenOrientation.FullUser,
|
||||
ConfigurationChanges = ConfigChanges.Orientation |
|
||||
ConfigChanges.KeyboardHidden |
|
||||
ConfigChanges.Keyboard |
|
||||
ConfigChanges.ScreenSize |
|
||||
ConfigChanges.ScreenLayout)]
|
||||
public class Activity1 : AndroidGameActivity
|
||||
{
|
||||
protected override void OnCreate (Bundle bundle)
|
||||
{
|
||||
base.OnCreate (bundle);
|
||||
|
||||
var g = new Game1 ();
|
||||
SetContentView (g.Services.GetService<View>());
|
||||
g.Run ();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="${ProjectName}">
|
||||
<uses-sdk android:minSdkVersion="10" />
|
||||
<application android:label="${ProjectName}">
|
||||
</application>
|
||||
</manifest>
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
#pragma warning disable 1591
|
||||
// ------------------------------------------------------------------------------
|
||||
// <autogenerated>
|
||||
// This code was generated by a tool.
|
||||
// Mono Runtime Version: 4.0.30319.17020
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </autogenerated>
|
||||
// ------------------------------------------------------------------------------
|
||||
|
||||
[assembly: Android.Runtime.ResourceDesignerAttribute("OpenGLApplication1.Resource", IsApplication=true)]
|
||||
|
||||
namespace ${Namespace}
|
||||
{
|
||||
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")]
|
||||
public partial class Resource
|
||||
{
|
||||
|
||||
static Resource()
|
||||
{
|
||||
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
|
||||
}
|
||||
|
||||
public static void UpdateIdValues()
|
||||
{
|
||||
}
|
||||
|
||||
public partial class Attribute
|
||||
{
|
||||
|
||||
static Attribute()
|
||||
{
|
||||
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
|
||||
}
|
||||
|
||||
private Attribute()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public partial class Drawable
|
||||
{
|
||||
|
||||
// aapt resource value: 0x7f020000
|
||||
public const int Icon = 2130837504;
|
||||
|
||||
static Drawable()
|
||||
{
|
||||
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
|
||||
}
|
||||
|
||||
private Drawable()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public partial class Id
|
||||
{
|
||||
|
||||
static Id()
|
||||
{
|
||||
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
|
||||
}
|
||||
|
||||
private Id()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public partial class Layout
|
||||
{
|
||||
|
||||
static Layout()
|
||||
{
|
||||
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
|
||||
}
|
||||
|
||||
private Layout()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public partial class String
|
||||
{
|
||||
|
||||
// aapt resource value: 0x7f040001
|
||||
public const int ApplicationName = 2130968577;
|
||||
|
||||
static String()
|
||||
{
|
||||
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
|
||||
}
|
||||
|
||||
private String()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 33 KiB |
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="Theme.Splash" parent="android:Theme">
|
||||
<item name="android:windowBackground">@drawable/splash</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0"?>
|
||||
<Template>
|
||||
<TemplateConfiguration>
|
||||
<_Name>MonoGame for Android Application</_Name>
|
||||
<Category>monogame/app/games</Category>
|
||||
<Icon>monogame-project</Icon>
|
||||
<LanguageName>C#</LanguageName>
|
||||
<_Description>Creates an MonoGame for Android Project </_Description>
|
||||
</TemplateConfiguration>
|
||||
|
||||
<Actions>
|
||||
<Open filename = "Game1.cs"/>
|
||||
</Actions>
|
||||
|
||||
<Combine name = "${ProjectName}" directory = ".">
|
||||
<Options>
|
||||
<StartupProject>${ProjectName}</StartupProject>
|
||||
</Options>
|
||||
|
||||
<Project name = "${ProjectName}" directory = "." type = "MonoDroid">
|
||||
<Options
|
||||
AndroidApplication="true"
|
||||
AndroidResgenFile="Resources/Resource.designer.cs"
|
||||
AndroidResgenClass="Resource"
|
||||
TargetFrameworkVersion="MonoAndroid,Version=v5.0" />
|
||||
<References>
|
||||
<Reference type="Gac" refto="System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" />
|
||||
<Reference type="Gac" refto="System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" />
|
||||
<Reference type="Gac" refto="System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" />
|
||||
<Reference type="Gac" refto="Mono.Android" />
|
||||
<Reference type="Gac" refto="OpenTK-1.0" />
|
||||
<Reference type="Package" refto="MonoGame.Framework" />
|
||||
</References>
|
||||
<Files>
|
||||
<File name="Activity1.cs" src="Android/Activity1.cs" />
|
||||
<File name="Game1.cs" src="Common/Game1.cs" />
|
||||
<Directory name="Resources">
|
||||
<File name="Resource.designer.cs" src="Android/Resource.cs" />
|
||||
<RawFile name="AboutResources.txt" src="Android/AboutResources.txt" />
|
||||
<Directory name="drawable">
|
||||
<RawFile name="Icon.png" src="Common/Icon-md.png" />
|
||||
<RawFile name="Splash.png" src="Android/Splash.png" />
|
||||
</Directory>
|
||||
<Directory name="values">
|
||||
<RawFile name="Styles.xml" src="Android/Styles.xml" />
|
||||
</Directory>
|
||||
</Directory>
|
||||
<Directory name="Properties">
|
||||
<File name="AssemblyInfo.cs" src="Common/AssemblyInfo.cs" />
|
||||
<File name="AndroidManifest.xml" src="Android/AndroidManifest.xml" />
|
||||
</Directory>
|
||||
<Directory name="Content">
|
||||
<File name="Content.mgcb" src="Common/Content.mgcb" BuildAction="MonoGameContentReference"/>
|
||||
</Directory>
|
||||
<Directory name="Assets">
|
||||
<RawFile name="AboutAssets.txt" src="Android/AboutAssets.txt" />
|
||||
<Directory name="Content">
|
||||
</Directory>
|
||||
</Directory>
|
||||
</Files>
|
||||
</Project>
|
||||
</Combine>
|
||||
</Template>
|
||||
Reference in New Issue
Block a user