Skip to content
Browse files

Settings Panel Added

Settings Panel added with Privacy Policy and About Page.  Default.js
updated with the simple call to generate the Settings Panel.  Included
iFrame (commented out) in case you want to load external HTML in your
own app.
  • Loading branch information...
1 parent 9ecbb0b commit fd43f6104e4b6a155cadd14c1401443ad55be282 disbitski committed
View
3 SpaceCadet/SpaceCadet.jsproj
@@ -53,9 +53,12 @@
<AppxManifest Include="package.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
+ <Content Include="css\settings.css" />
<Content Include="css\space.css" />
<Content Include="default.html" />
<Content Include="fonts\FINALOLD.TTF" />
+ <Content Include="html\about.html" />
+ <Content Include="html\privacy.html" />
<Content Include="images\accept.png" />
<Content Include="images\explosion.png" />
<Content Include="images\helmet.png" />
View
3 SpaceCadet/css/settings.css
@@ -0,0 +1,3 @@
+body {
+ font-size: 22px;
+}
View
33 SpaceCadet/html/about.html
@@ -0,0 +1,33 @@
+<!doctype HTML>
+<html>
+ <head>
+ <title>About settings flyout</title>
+ <link href="/css/settings.css" rel="stylesheet" />
+ </head>
+ <body>
+ <!-- BEGINSETTINGSFLYOUT -->
+ <div data-win-control="WinJS.UI.SettingsFlyout" aria-label="About Space Cadet settings flyout" data-win-options="{settingsCommandId:'aboutSettings',width:'wide'}">
+ <!-- Use either 'win-ui-light' or 'win-ui-dark' depending on the contrast between the header title and background color -->
+ <div class="win-ui-dark win-header" style="background-color:#001E4E"> <!-- Background color reflects app's personality -->
+ <button type="button" onclick="WinJS.UI.SettingsFlyout.show()" class="win-backbutton"></button>
+ <div class="win-label">About Space Cadet</div>
+ </div>
+ <div class="win-content">
+ <div class="win-settings-section">
+ <div id="aboutSpaceCadet">
+ <!--<iframe src="http://insertyourdoman/insertyourhtml.html" width="566" height="600"/>-->
+ Space Cadet is a completely free game for educational and entertainment purposes only. The code for this game is open source and available at <a href="http://win8gamekit.codeplex.com" target="_blank" >Win8gamekit.codeplex.com</a><p>
+ For more information about my other free games, apps and developer starter kits check out <a href="http://blogs.msdn.com/davedev/" target="_blank" >my blog</a> on MSDN.<p>
+ Other Apps from DaveDev Productions:<br />
+ <ul>
+ <li>Balloons (<a href="http://bit.ly/balloonswin8" target="_blank" >Windows Store</a>)</li>
+ <li>DoodlePad (<a href="http://www.windowsphone.com/s?appid=aded583e-cadc-df11-a844-00237de2db9e" target="_blank" >Windows Phone</a>)</li>
+ <li>DoodlePad Free (<a href="http://www.windowsphone.com/s?appid=5188a4a4-421c-e011-9264-00237de2db9e" target="_blank" >Windows Phone</a>)</li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+ <!-- ENDSETTINGSFLYOUT -->
+ </body>
+</html>
View
31 SpaceCadet/html/privacy.html
@@ -0,0 +1,31 @@
+<!doctype HTML>
+<html>
+ <head>
+ <title>Legal notices settings flyout</title>
+ <link href="/css/settings.css" rel="stylesheet" />
+ </head>
+ <body>
+ <!-- BEGINSETTINGSFLYOUT -->
+ <div data-win-control="WinJS.UI.SettingsFlyout" aria-label="Legal notices settings flyout" data-win-options="{settingsCommandId:'privacySettings',width:'wide'}">
+ <!-- Use either 'win-ui-light' or 'win-ui-dark' depending on the contrast between the header title and background color -->
+ <div class="win-ui-dark win-header" style="background-color:#001E4E"> <!-- Background color reflects app's personality -->
+ <button type="button" onclick="WinJS.UI.SettingsFlyout.show()" class="win-backbutton"></button>
+ <div class="win-label">Privacy Policy</div>
+ </div>
+ <div class="win-content">
+ <div class="win-settings-section">
+ <div id="privacyPolicy">
+ <!--<iframe src="http://insertyourdoman/insertyourhtml.html" width="566" height="600"/>-->
+ This privacy policy governs your use of the software application Space Cadet ("Application") for mobile devices that was created by DaveDev Productions.
+
+ The Application is for educational and entertainment purposes only and does not share any information about you or the location of your mobile device.
+
+ The only Internet operation performed by the Application is via the "Share Charm" invoked by you. In this instance your Score, Level and Name will be shared to another Windows Store Application you specify.
+
+ </div>
+ </div>
+ </div>
+ </div>
+ <!-- ENDSETTINGSFLYOUT -->
+ </body>
+</html>
View
13 SpaceCadet/js/default.js
@@ -3,7 +3,7 @@
/// <reference path="starField.js" />
// Title: Space Cadet
-// Version 1.0 Windows 8 RTM
+// Version 1.1 Windows 8 RTM
// Desc: Fun Space Game to demonstrate Win8 Metro Style App using HTML5 Canvas, CSS3,
// Accelerometer, Camera, Touch, and Trial APIs
//
@@ -33,7 +33,7 @@
var activation = Windows.ApplicationModel.Activation;
//Version
- var GAME_VERSION = "1.00 RTM";
+ var GAME_VERSION = "1.1";
//ship and screen constants
var POINTS_SHIPHIT = 100;
@@ -230,6 +230,15 @@
var dataTransferManager = Windows.ApplicationModel.DataTransfer.DataTransferManager.getForCurrentView();
dataTransferManager.addEventListener("datarequested", shareScore);
+ //About and Privacy Policy Settings Charm
+ WinJS.Application.onsettings = function (e) {
+ e.detail.applicationcommands = {
+ "aboutSettings": { title: "About Space Cadet", href: "/html/about.html" },
+ "privacySettings": { title: "Privacy Policy", href: "/html/privacy.html" }
+ };
+ WinJS.UI.SettingsFlyout.populateSettings(e);
+ };
+
//Game Menu
showMenu();

0 comments on commit fd43f61

Please sign in to comment.
Something went wrong with that request. Please try again.