Add rules screen after first login, add level text to profile screen, add references to Netsyms TOS
This commit is contained in:
parent
156fd6454d
commit
02af40c19b
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0" xmlns:cdv="http://cordova.apache.org/ns/1.0" id="com.netsyms.terranquest.TerranQuest" version="1.0.0">
|
||||
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0" xmlns:cdv="http://cordova.apache.org/ns/1.0" id="com.netsyms.terranquest.TerranQuest" version="1.1.2">
|
||||
<name>TerranQuest</name>
|
||||
<description>
|
||||
Augmented Reality fantasy game
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,5 +1,5 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<manifest android:hardwareAccelerated="true" android:versionCode="10000" android:versionName="1.0.0" package="com.netsyms.terranquest.TerranQuest" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<manifest android:hardwareAccelerated="true" android:versionCode="10102" android:versionName="1.1.2" package="com.netsyms.terranquest.TerranQuest" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<application android:hardwareAccelerated="true" android:icon="@drawable/icon" android:label="@string/app_name" android:supportsRtl="true">
|
||||
|
@ -83,6 +83,16 @@ body {
|
||||
background: rgba(0,0,0,.9);
|
||||
}
|
||||
|
||||
#overlay-main #main-content {
|
||||
overflow-x: auto;
|
||||
overflow-y: auto;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#mainCloseBtn {
|
||||
z-index: 999999;
|
||||
position: absolute;
|
||||
|
@ -22,14 +22,15 @@ var map = L.map('map');
|
||||
var tileurl = "http://tile.stamen.com/terrain/{z}/{x}/{y}.jpg";
|
||||
map.setZoom(16);
|
||||
map.dragging.disable();
|
||||
map.touchZoom.disable();
|
||||
map.doubleClickZoom.disable();
|
||||
map.scrollWheelZoom.disable();
|
||||
//map.touchZoom.disable();
|
||||
//map.doubleClickZoom.disable();
|
||||
//map.scrollWheelZoom.disable();
|
||||
map.keyboard.disable();
|
||||
$(".leaflet-control-zoom").css("visibility", "hidden");
|
||||
// Disable tap handler, if present.
|
||||
if (map.tap)
|
||||
map.tap.disable();
|
||||
//if (map.tap) {
|
||||
// map.tap.disable();
|
||||
//}
|
||||
var lc = L.control.locate({
|
||||
position: 'topleft', // set the location of the control
|
||||
layer: undefined, // use your own layer for the location marker, creates a new layer by default
|
||||
@ -63,8 +64,8 @@ var lc = L.control.locate({
|
||||
},
|
||||
locateOptions: {} // define location options e.g enableHighAccuracy: true or maxZoom: 10
|
||||
}).addTo(map);
|
||||
map.addLayer(new L.tileLayer(tileurl, {minZoom: 16, maxZoom: 16}));
|
||||
//map.setView(new L.LatLng(46, -112), 15);
|
||||
map.addLayer(new L.tileLayer(tileurl, {minZoom: 15, maxZoom: 17}));
|
||||
|
||||
lc.start();
|
||||
|
||||
function mapPos(lat, lon) {
|
||||
@ -183,7 +184,9 @@ setTimeout(function () {
|
||||
* Syncs the user's stats with the server and calls refreshStats().
|
||||
*/
|
||||
function syncStats() {
|
||||
$.getJSON(mkApiUrl('getstats') + "?user=" + username, null, function (data) {
|
||||
$.getJSON(mkApiUrl('getstats'), {
|
||||
user: username
|
||||
}, function (data) {
|
||||
if (data.status === 'OK') {
|
||||
maxenergy = data.stats.maxenergy;
|
||||
energy = data.stats.energy;
|
||||
@ -248,13 +251,21 @@ $("#chatsendform").submit(function (event) {
|
||||
|
||||
function toggleChat() {
|
||||
if ($('#chatmsgs').css('display') === 'none') {
|
||||
$('#chatmsgs').css('display', 'block');
|
||||
$("#chatmsgs").animate({scrollTop: $('#chatmsgs').prop("scrollHeight")}, 1000);
|
||||
openChat();
|
||||
} else {
|
||||
$('#chatmsgs').css('display', 'none');
|
||||
closeChat();
|
||||
}
|
||||
}
|
||||
|
||||
function closeChat() {
|
||||
$('#chatmsgs').css('display', 'none');
|
||||
}
|
||||
|
||||
function openChat() {
|
||||
$('#chatmsgs').css('display', 'block');
|
||||
$("#chatmsgs").animate({scrollTop: $('#chatmsgs').prop("scrollHeight")}, 1000);
|
||||
}
|
||||
|
||||
function openProfile(user) {
|
||||
user = typeof user !== 'undefined' ? user : username;
|
||||
$('#main-content').load("screens/profile.html", null, function (x) {
|
||||
@ -263,6 +274,11 @@ function openProfile(user) {
|
||||
});
|
||||
}
|
||||
|
||||
function openRules() {
|
||||
$('#main-content').load("screens/rules.html", null, function (x) {
|
||||
$('#overlay-main').css('display', 'block');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -285,4 +301,10 @@ document.addEventListener("backbutton", function (event) {
|
||||
} else if ($('#chatmsgs').css('display') !== 'none') {
|
||||
toggleChat();
|
||||
}
|
||||
}, false);
|
||||
}, false);
|
||||
|
||||
// Show the rules
|
||||
if (localStorage.getItem("seenrules") !== 'yes') {
|
||||
openRules();
|
||||
localStorage.setItem("seenrules", 'yes');
|
||||
}
|
@ -38,7 +38,7 @@
|
||||
<div class="btn btn-info"><i class="fa fa-comments-o"></i></div>
|
||||
</div>
|
||||
<form id="chatsendform">
|
||||
<input type="text" class="form-control" id="chatbox-input" placeholder="Type to chat" />
|
||||
<input type="text" class="form-control" id="chatbox-input" onclick="openChat()" placeholder="Type to chat" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,5 +1,6 @@
|
||||
<div class="h3" id="player-name"></div>
|
||||
<div class="h4">Badges</div>
|
||||
<div class="h4" id="player-name"></div>
|
||||
<p id="player-level"></p>
|
||||
<div class="h5">Badges</div>
|
||||
<div id="loading-badges">
|
||||
<i class="fa fa-spinner fa-pulse"></i> Loading...
|
||||
</div>
|
||||
@ -14,9 +15,23 @@
|
||||
function loadProfile(user) {
|
||||
$('#player-name').text(user);
|
||||
loadBadges(user);
|
||||
loadPlayerStats(user);
|
||||
}
|
||||
|
||||
function loadPlayerStats(user) {
|
||||
$.getJSON(mkApiUrl('getstats'), {
|
||||
user: user
|
||||
}, function (data) {
|
||||
if (data.status === 'OK') {
|
||||
$('#player-level').text('Level ' + Math.floor(data.stats.level));
|
||||
} else {
|
||||
$('#player-level').text('Error: cannot load player stats.');
|
||||
}
|
||||
}).fail(function () {
|
||||
$('#player-level').text('Error: check your connection.');
|
||||
});
|
||||
}
|
||||
|
||||
// TODO: Make this actually use the database/API!
|
||||
function loadBadges(user) {
|
||||
$('#loading-badges').html('<i class="fa fa-spinner fa-pulse"></i> Loading...');
|
||||
$('#loading-badges').css('display', 'block');
|
||||
|
18
platforms/android/assets/www/screens/rules.html
Normal file
18
platforms/android/assets/www/screens/rules.html
Normal file
@ -0,0 +1,18 @@
|
||||
<div class="h4">Rules</div>
|
||||
<p>Please read these rules. Because TerranQuest is a game involving other
|
||||
people and the environment, it's important to show good etiquette.</p>
|
||||
<ol class="list-group">
|
||||
<li class="list-group-item">Do not endanger yourself or others</li>
|
||||
<li class="list-group-item">be considerate and polite in the in-game chat, and don't swear</li>
|
||||
<li class="list-group-item">Observe all local laws and rules</li>
|
||||
<li class="list-group-item">Respect property rights and obtain permission for playing on private land</li>
|
||||
<li class="list-group-item">Be nice to other people and try not to look too creepy</li>
|
||||
<li class="list-group-item">Respect and minimize your impact on the environment</li>
|
||||
<li class="list-group-item">Don't tamper with or deface any objects, landmarks, barcodes, or other real-world items</li>
|
||||
<li class="list-group-item">Pick up any trash you find and dispose of it properly if you can</li>
|
||||
<li class="list-group-item">Socialize with any players of other games, such as Geocaching and Ingress, you might meet</li>
|
||||
<li class="list-group-item">Follow the Netsyms Technologies Terms of Service at netsyms.com/legal</li>
|
||||
<!--
|
||||
<li class="list-group-item"></li>
|
||||
-->
|
||||
</ol>
|
@ -32,6 +32,8 @@
|
||||
<span class="input-group-addon" id="basic-addon-nameicon"><i class="fa fa-male fa-fw"></i></span>
|
||||
<input type="text" placeholder="Real Name" id="nameBox" class="form-control" aria-describedby="basic-addon-nameicon" autocorrect="off" autocapitalize="off" spellcheck="false" />
|
||||
</div>
|
||||
<br />
|
||||
<p>By signing up, you agree to the Netsyms Technologies Terms of Service and Privacy Policy at netsyms.com/legal</p>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<a href="#" onclick="dosignup()" id="signupBtn" class="btn btn-success btn-wide"><i class="fa fa-user-plus"></i> Sign Up</a><br /><br />
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<widget id="com.netsyms.terranquest.TerranQuest" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0" xmlns:gap="http://phonegap.com/ns/1.0">
|
||||
<widget id="com.netsyms.terranquest.TerranQuest" version="1.1.2" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0" xmlns:gap="http://phonegap.com/ns/1.0">
|
||||
<preference name="loglevel" value="DEBUG" />
|
||||
<feature name="Geolocation">
|
||||
<param name="android-package" value="org.apache.cordova.geolocation.Geolocation" />
|
||||
|
@ -83,6 +83,16 @@ body {
|
||||
background: rgba(0,0,0,.9);
|
||||
}
|
||||
|
||||
#overlay-main #main-content {
|
||||
overflow-x: auto;
|
||||
overflow-y: auto;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#mainCloseBtn {
|
||||
z-index: 999999;
|
||||
position: absolute;
|
||||
|
@ -22,14 +22,15 @@ var map = L.map('map');
|
||||
var tileurl = "http://tile.stamen.com/terrain/{z}/{x}/{y}.jpg";
|
||||
map.setZoom(16);
|
||||
map.dragging.disable();
|
||||
map.touchZoom.disable();
|
||||
map.doubleClickZoom.disable();
|
||||
map.scrollWheelZoom.disable();
|
||||
//map.touchZoom.disable();
|
||||
//map.doubleClickZoom.disable();
|
||||
//map.scrollWheelZoom.disable();
|
||||
map.keyboard.disable();
|
||||
$(".leaflet-control-zoom").css("visibility", "hidden");
|
||||
// Disable tap handler, if present.
|
||||
if (map.tap)
|
||||
map.tap.disable();
|
||||
//if (map.tap) {
|
||||
// map.tap.disable();
|
||||
//}
|
||||
var lc = L.control.locate({
|
||||
position: 'topleft', // set the location of the control
|
||||
layer: undefined, // use your own layer for the location marker, creates a new layer by default
|
||||
@ -63,8 +64,8 @@ var lc = L.control.locate({
|
||||
},
|
||||
locateOptions: {} // define location options e.g enableHighAccuracy: true or maxZoom: 10
|
||||
}).addTo(map);
|
||||
map.addLayer(new L.tileLayer(tileurl, {minZoom: 16, maxZoom: 16}));
|
||||
//map.setView(new L.LatLng(46, -112), 15);
|
||||
map.addLayer(new L.tileLayer(tileurl, {minZoom: 15, maxZoom: 17}));
|
||||
|
||||
lc.start();
|
||||
|
||||
function mapPos(lat, lon) {
|
||||
@ -183,7 +184,9 @@ setTimeout(function () {
|
||||
* Syncs the user's stats with the server and calls refreshStats().
|
||||
*/
|
||||
function syncStats() {
|
||||
$.getJSON(mkApiUrl('getstats') + "?user=" + username, null, function (data) {
|
||||
$.getJSON(mkApiUrl('getstats'), {
|
||||
user: username
|
||||
}, function (data) {
|
||||
if (data.status === 'OK') {
|
||||
maxenergy = data.stats.maxenergy;
|
||||
energy = data.stats.energy;
|
||||
@ -248,13 +251,21 @@ $("#chatsendform").submit(function (event) {
|
||||
|
||||
function toggleChat() {
|
||||
if ($('#chatmsgs').css('display') === 'none') {
|
||||
$('#chatmsgs').css('display', 'block');
|
||||
$("#chatmsgs").animate({scrollTop: $('#chatmsgs').prop("scrollHeight")}, 1000);
|
||||
openChat();
|
||||
} else {
|
||||
$('#chatmsgs').css('display', 'none');
|
||||
closeChat();
|
||||
}
|
||||
}
|
||||
|
||||
function closeChat() {
|
||||
$('#chatmsgs').css('display', 'none');
|
||||
}
|
||||
|
||||
function openChat() {
|
||||
$('#chatmsgs').css('display', 'block');
|
||||
$("#chatmsgs").animate({scrollTop: $('#chatmsgs').prop("scrollHeight")}, 1000);
|
||||
}
|
||||
|
||||
function openProfile(user) {
|
||||
user = typeof user !== 'undefined' ? user : username;
|
||||
$('#main-content').load("screens/profile.html", null, function (x) {
|
||||
@ -263,6 +274,11 @@ function openProfile(user) {
|
||||
});
|
||||
}
|
||||
|
||||
function openRules() {
|
||||
$('#main-content').load("screens/rules.html", null, function (x) {
|
||||
$('#overlay-main').css('display', 'block');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -285,4 +301,10 @@ document.addEventListener("backbutton", function (event) {
|
||||
} else if ($('#chatmsgs').css('display') !== 'none') {
|
||||
toggleChat();
|
||||
}
|
||||
}, false);
|
||||
}, false);
|
||||
|
||||
// Show the rules
|
||||
if (localStorage.getItem("seenrules") !== 'yes') {
|
||||
openRules();
|
||||
localStorage.setItem("seenrules", 'yes');
|
||||
}
|
@ -38,7 +38,7 @@
|
||||
<div class="btn btn-info"><i class="fa fa-comments-o"></i></div>
|
||||
</div>
|
||||
<form id="chatsendform">
|
||||
<input type="text" class="form-control" id="chatbox-input" placeholder="Type to chat" />
|
||||
<input type="text" class="form-control" id="chatbox-input" onclick="openChat()" placeholder="Type to chat" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,5 +1,6 @@
|
||||
<div class="h3" id="player-name"></div>
|
||||
<div class="h4">Badges</div>
|
||||
<div class="h4" id="player-name"></div>
|
||||
<p id="player-level"></p>
|
||||
<div class="h5">Badges</div>
|
||||
<div id="loading-badges">
|
||||
<i class="fa fa-spinner fa-pulse"></i> Loading...
|
||||
</div>
|
||||
@ -14,9 +15,23 @@
|
||||
function loadProfile(user) {
|
||||
$('#player-name').text(user);
|
||||
loadBadges(user);
|
||||
loadPlayerStats(user);
|
||||
}
|
||||
|
||||
function loadPlayerStats(user) {
|
||||
$.getJSON(mkApiUrl('getstats'), {
|
||||
user: user
|
||||
}, function (data) {
|
||||
if (data.status === 'OK') {
|
||||
$('#player-level').text('Level ' + Math.floor(data.stats.level));
|
||||
} else {
|
||||
$('#player-level').text('Error: cannot load player stats.');
|
||||
}
|
||||
}).fail(function () {
|
||||
$('#player-level').text('Error: check your connection.');
|
||||
});
|
||||
}
|
||||
|
||||
// TODO: Make this actually use the database/API!
|
||||
function loadBadges(user) {
|
||||
$('#loading-badges').html('<i class="fa fa-spinner fa-pulse"></i> Loading...');
|
||||
$('#loading-badges').css('display', 'block');
|
||||
|
18
www/screens/rules.html
Normal file
18
www/screens/rules.html
Normal file
@ -0,0 +1,18 @@
|
||||
<div class="h4">Rules</div>
|
||||
<p>Please read these rules. Because TerranQuest is a game involving other
|
||||
people and the environment, it's important to show good etiquette.</p>
|
||||
<ol class="list-group">
|
||||
<li class="list-group-item">Do not endanger yourself or others</li>
|
||||
<li class="list-group-item">Be considerate and polite in the in-game chat, and don't swear</li>
|
||||
<li class="list-group-item">Observe all local laws and rules</li>
|
||||
<li class="list-group-item">Respect property rights and obtain permission for playing on private land</li>
|
||||
<li class="list-group-item">Be nice to other people and try not to look too creepy</li>
|
||||
<li class="list-group-item">Respect and minimize your impact on the environment</li>
|
||||
<li class="list-group-item">Don't tamper with or deface any objects, landmarks, barcodes, or other real-world items</li>
|
||||
<li class="list-group-item">Pick up any trash you find and dispose of it properly if you can</li>
|
||||
<li class="list-group-item">Socialize with any players of other games, such as Geocaching and Ingress, you might meet</li>
|
||||
<li class="list-group-item">Follow the Netsyms Technologies Terms of Service at netsyms.com/legal</li>
|
||||
<!--
|
||||
<li class="list-group-item"></li>
|
||||
-->
|
||||
</ol>
|
@ -32,6 +32,8 @@
|
||||
<span class="input-group-addon" id="basic-addon-nameicon"><i class="fa fa-male fa-fw"></i></span>
|
||||
<input type="text" placeholder="Real Name" id="nameBox" class="form-control" aria-describedby="basic-addon-nameicon" autocorrect="off" autocapitalize="off" spellcheck="false" />
|
||||
</div>
|
||||
<br />
|
||||
<p>By signing up, you agree to the Netsyms Technologies Terms of Service and Privacy Policy at netsyms.com/legal</p>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<a href="#" onclick="dosignup()" id="signupBtn" class="btn btn-success btn-wide"><i class="fa fa-user-plus"></i> Sign Up</a><br /><br />
|
||||
|
Reference in New Issue
Block a user