diff options
| author | The Fuzzy Riolu <[email protected]> | 2018-03-12 11:52:38 -0400 |
|---|---|---|
| committer | The Fuzzy Riolu <[email protected]> | 2018-03-12 12:02:33 -0400 |
| commit | 40d01342d00c57dce5069e53a455db048a2967d5 (patch) | |
| tree | 99e64bed61317a564253e456e2aa45fba3c0c6ec /WatercolorGames.Pong/Resources | |
| parent | cdb0da6c34228a4034dbe179dc268aaded532619 (diff) | |
| download | shiftos-pong-master.tar.gz shiftos-pong-master.tar.bz2 shiftos-pong-master.zip | |
Diffstat (limited to 'WatercolorGames.Pong/Resources')
| -rw-r--r-- | WatercolorGames.Pong/Resources/AboutResources.txt | 44 | ||||
| -rw-r--r-- | WatercolorGames.Pong/Resources/Drawable/Icon.png | bin | 0 -> 24313 bytes | |||
| -rw-r--r-- | WatercolorGames.Pong/Resources/Drawable/Splash.png | bin | 0 -> 33526 bytes | |||
| -rw-r--r-- | WatercolorGames.Pong/Resources/Resource.Designer.cs | 102 | ||||
| -rw-r--r-- | WatercolorGames.Pong/Resources/Values/Strings.xml | 6 | ||||
| -rw-r--r-- | WatercolorGames.Pong/Resources/Values/Styles.xml | 7 |
6 files changed, 159 insertions, 0 deletions
diff --git a/WatercolorGames.Pong/Resources/AboutResources.txt b/WatercolorGames.Pong/Resources/AboutResources.txt new file mode 100644 index 0000000..b0fc999 --- /dev/null +++ b/WatercolorGames.Pong/Resources/AboutResources.txt @@ -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.xml), +an internationalization string table (Strings.xml) and some icons (drawable/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, the build action should be set +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 +"Resource" that contains the tokens for each one of the resources included. For example, +for the above Resources layout, this is what the Resource class would expose: + +public class Resource { + public class Drawable { + public const int Icon = 0x123; + } + + public class Layout { + public const int Main = 0x456; + } + + public class String { + public const int FirstString = 0xabc; + public const int SecondString = 0xbcd; + } +} + +You would then use Resource.Drawable.Icon to reference the Drawable/Icon.png file, or +Resource.Layout.Main to reference the Layout/Main.axml file, or Resource.String.FirstString +to reference the first string in the dictionary file Values/Strings.xml.
\ No newline at end of file diff --git a/WatercolorGames.Pong/Resources/Drawable/Icon.png b/WatercolorGames.Pong/Resources/Drawable/Icon.png Binary files differnew file mode 100644 index 0000000..f6f4f41 --- /dev/null +++ b/WatercolorGames.Pong/Resources/Drawable/Icon.png diff --git a/WatercolorGames.Pong/Resources/Drawable/Splash.png b/WatercolorGames.Pong/Resources/Drawable/Splash.png Binary files differnew file mode 100644 index 0000000..2f86107 --- /dev/null +++ b/WatercolorGames.Pong/Resources/Drawable/Splash.png diff --git a/WatercolorGames.Pong/Resources/Resource.Designer.cs b/WatercolorGames.Pong/Resources/Resource.Designer.cs new file mode 100644 index 0000000..2072910 --- /dev/null +++ b/WatercolorGames.Pong/Resources/Resource.Designer.cs @@ -0,0 +1,102 @@ +#pragma warning disable 1591 +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +[assembly: global::Android.Runtime.ResourceDesignerAttribute("WatercolorGames.Pong.Resource", IsApplication=true)] + +namespace WatercolorGames.Pong +{ + + + [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; + + // aapt resource value: 0x7f020001 + public const int Splash = 2130837505; + + static Drawable() + { + global::Android.Runtime.ResourceIdManager.UpdateIdValues(); + } + + private Drawable() + { + } + } + + public partial class String + { + + // aapt resource value: 0x7f030001 + public const int ApplicationName = 2130903041; + + // aapt resource value: 0x7f030000 + public const int Hello = 2130903040; + + // aapt resource value: 0x7f030002 + public const int WelcomeToPong = 2130903042; + + static String() + { + global::Android.Runtime.ResourceIdManager.UpdateIdValues(); + } + + private String() + { + } + } + + public partial class Style + { + + // aapt resource value: 0x7f040000 + public const int Theme_Splash = 2130968576; + + static Style() + { + global::Android.Runtime.ResourceIdManager.UpdateIdValues(); + } + + private Style() + { + } + } + } +} +#pragma warning restore 1591 diff --git a/WatercolorGames.Pong/Resources/Values/Strings.xml b/WatercolorGames.Pong/Resources/Values/Strings.xml new file mode 100644 index 0000000..8a21300 --- /dev/null +++ b/WatercolorGames.Pong/Resources/Values/Strings.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <string name="Hello">Hello World, Click Me!</string> + <string name="ApplicationName">ShiftOS Pong</string> + <string name="WelcomeToPong">Welcome to ShiftOS Pong.\n\nShiftOS was a game made by Philip Adams where the goal was to upgrade an experimental operating system using "Codepoints" to one usable as a daily driver.\n\nOne of the upgrades you could buy with Codepoints was a special version of the classic arcade game "Pong". This is that game.\n\nThe goal is simple - earn as many Codepoints as you can by beating the computer or surviving the level. Each level lasts one minute, and the higher the level, the more Codepoints you can earn - but the harder the game will get. Losing the ball will end your run!\n\nTap your screen to start playing.</string> +</resources> diff --git a/WatercolorGames.Pong/Resources/Values/Styles.xml b/WatercolorGames.Pong/Resources/Values/Styles.xml new file mode 100644 index 0000000..5102134 --- /dev/null +++ b/WatercolorGames.Pong/Resources/Values/Styles.xml @@ -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> |
