-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from miss-architect/sdk-update-button
Updated SDK to support Button component and introduced support for newer
- Loading branch information
Showing
7 changed files
with
170 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,42 @@ | ||
<!-- This is a generated file. It is highly recommended that you DO NOT edit this file. --> | ||
<iq:manifest xmlns:iq="http://www.garmin.com/xml/connectiq" version="1"> | ||
<iq:application entry="SquashApp" id="020B05CFF17F4B248AE111724A7A6EC5" launcherIcon="@Drawables.LauncherIcon" minSdkVersion="1.3.1" name="@Strings.AppName" type="watch-app"> | ||
|
||
<!-- This is a generated file. It is highly recommended that you DO NOT edit this file. --><iq:manifest xmlns:iq="http://www.garmin.com/xml/connectiq" version="1"> | ||
<iq:application entry="SquashApp" id="020B05CFF17F4B248AE111724A7A6EC5" launcherIcon="@Drawables.LauncherIcon" minSdkVersion="3.0.0" name="@Strings.AppName" type="watch-app"> | ||
<iq:products> | ||
<iq:product id="fr630"/> | ||
<iq:product id="fr235"/> | ||
<iq:product id="fr735xt"/> | ||
<iq:product id="fr230"/> | ||
<iq:product id="vivoactive"/> | ||
<iq:product id="fenix3"/> | ||
<iq:product id="fenix3_hr"/> | ||
<iq:product id="fr920xt"/> | ||
<iq:product id="vivoactive_hr"/> | ||
<iq:product id="fenix5"/> | ||
<iq:product id="fenix5plus"/> | ||
<iq:product id="fenix5s"/> | ||
<iq:product id="fenix5splus"/> | ||
<iq:product id="fenix5x"/> | ||
<iq:product id="fenix5xplus"/> | ||
<iq:product id="fenix6"/> | ||
<iq:product id="fenix6pro"/> | ||
<iq:product id="fenix6s"/> | ||
<iq:product id="fenix6spro"/> | ||
<iq:product id="fenix6xpro"/> | ||
<iq:product id="fenixchronos"/> | ||
<iq:product id="fr245"/> | ||
<iq:product id="fr245m"/> | ||
<iq:product id="fr645"/> | ||
<iq:product id="fr645m"/> | ||
<iq:product id="fr745"/> | ||
<iq:product id="fr935"/> | ||
<iq:product id="fr945"/> | ||
<iq:product id="vivoactive3"/> | ||
<iq:product id="vivoactive3d"/> | ||
<iq:product id="vivoactive3m"/> | ||
<iq:product id="vivoactive3mlte"/> | ||
<iq:product id="vivoactive4"/> | ||
<iq:product id="vivoactive4s"/> | ||
</iq:products> | ||
|
||
<iq:permissions> | ||
<iq:uses-permission id="Background"/> | ||
<iq:uses-permission id="Fit"/> | ||
<iq:uses-permission id="FitContributor"/> | ||
<iq:uses-permission id="PersistedContent"/> | ||
<iq:uses-permission id="Sensor"/> | ||
<iq:uses-permission id="SensorHistory"/> | ||
</iq:permissions> | ||
|
||
<iq:languages> | ||
<iq:language>eng</iq:language> | ||
</iq:languages> | ||
|
||
</iq:application> | ||
</iq:manifest> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
<resources> | ||
<drawable-list id="player1field" x="2" y="27" width="70" height="42"> | ||
<shape type="rectangle" x="0" y="0" width="70" height="42" color="Gfx.COLOR_BLACK" border_color="Gfx.COLOR_WHITE" border_width="2"/> | ||
</drawable-list> | ||
|
||
<drawable-list id="player2field" x="74" y="27" width="70" height="42"> | ||
<shape type="rectangle" x="0" y="0" width="70" height="42" color="Gfx.COLOR_BLACK" border_color="Gfx.COLOR_WHITE" border_width="2"/> | ||
</drawable-list> | ||
|
||
<drawable-list id="stepsfield" x="2" y="82" width="70" height="42"> | ||
<shape type="rectangle" x="0" y="0" width="70" height="42" color="Gfx.COLOR_BLACK" border_color="Gfx.COLOR_WHITE" border_width="2"/> | ||
</drawable-list> | ||
|
||
<drawable-list id="heartratefield" x="74" y="82" width="70" height="42"> | ||
<shape type="rectangle" x="0" y="0" width="70" height="42" color="Gfx.COLOR_BLACK" border_color="Gfx.COLOR_WHITE" border_width="2"/> | ||
</drawable-list> | ||
|
||
<drawable-list id="timeField" x="2" y="127" width="70" height="42"> | ||
<shape type="rectangle" x="0" y="0" width="70" height="42" color="Gfx.COLOR_BLACK" border_color="Gfx.COLOR_WHITE" border_width="2"/> | ||
</drawable-list> | ||
|
||
<drawable-list id="calories" x="74" y="127" width="70" height="42"> | ||
<shape type="rectangle" x="0" y="0" width="70" height="42" color="Gfx.COLOR_BLACK" border_color="Gfx.COLOR_WHITE" border_width="2"/> | ||
</drawable-list> | ||
|
||
<resources> | ||
<drawable-list id="player1field" x="2" y="27" width="70" height="42"> | ||
<shape type="rectangle" x="0" y="0" width="70" height="42" color="Gfx.COLOR_BLACK" border_color="Gfx.COLOR_WHITE" border_width="2"/> | ||
</drawable-list> | ||
|
||
<drawable-list id="player2field" x="74" y="27" width="70" height="42"> | ||
<shape type="rectangle" x="0" y="0" width="70" height="42" color="Gfx.COLOR_BLACK" border_color="Gfx.COLOR_WHITE" border_width="2"/> | ||
</drawable-list> | ||
|
||
<drawable-list id="timeField" x="2" y="82" width="70" height="42"> | ||
<shape type="rectangle" x="0" y="0" width="70" height="42" color="Gfx.COLOR_BLACK" border_color="Gfx.COLOR_WHITE" border_width="2"/> | ||
</drawable-list> | ||
|
||
<drawable-list id="heartratefield" x="74" y="82" width="70" height="42"> | ||
<shape type="rectangle" x="0" y="0" width="70" height="42" color="Gfx.COLOR_BLACK" border_color="Gfx.COLOR_WHITE" border_width="2"/> | ||
</drawable-list> | ||
|
||
<drawable-list id="stepsfield" x="2" y="127" width="70" height="42"> | ||
<shape type="rectangle" x="0" y="0" width="70" height="42" color="Gfx.COLOR_BLACK" border_color="Gfx.COLOR_WHITE" border_width="2"/> | ||
</drawable-list> | ||
|
||
<drawable-list id="calories" x="74" y="127" width="70" height="42"> | ||
<shape type="rectangle" x="0" y="0" width="70" height="42" color="Gfx.COLOR_BLACK" border_color="Gfx.COLOR_WHITE" border_width="2"/> | ||
</drawable-list> | ||
|
||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,70 @@ | ||
using Toybox.WatchUi as Ui; | ||
using Toybox.Application as App; | ||
|
||
//! Class that holds the configuration of the game | ||
//! as total number of sets and the max score in | ||
//! one set. It reads the configuration from | ||
//! the object store of the application. | ||
class GameConfiguration { | ||
|
||
hidden var setMaxScore; | ||
hidden var setTotalSets; | ||
hidden var player1Name; | ||
hidden var player2Name; | ||
static var instance = null; | ||
static function getInstance() { | ||
if (instance == null) { | ||
instance = new GameConfiguration(); | ||
} | ||
return instance; | ||
} | ||
|
||
function initialize() { | ||
setMaxScore = readKeyInt("setMaxScore", 11); | ||
setTotalSets = readKeyInt("setTotalSets", 5); | ||
player1Name = readString("player1Name", 8, Ui.loadResource(Rez.Strings.player1_score_label)); | ||
player2Name = readString("player2Name", 8, Ui.loadResource(Rez.Strings.player2_score_label)); | ||
} | ||
|
||
// make sure property is of type number | ||
// see https://webcache.googleusercontent.com/search?cd=2&hl=en&ct=clnk&gl=ch& | ||
// q=cache:0hxHRJ_80hcJ:https://forums.garmin.com/archive/index.php/t-359183.html+ | ||
hidden function readKeyInt(key, thisDefault) { | ||
var value = App.getApp().getProperty(key); | ||
|
||
if(value == null || !(value instanceof Number)) { | ||
if(value != null) { | ||
value = value.toNumber(); | ||
} else { | ||
value = thisDefault; | ||
} | ||
} | ||
return value; | ||
} | ||
hidden function readString(key, length, thisDefault) { | ||
var value = App.getApp().getProperty(key); | ||
if(value == null) { | ||
value = thisDefault; | ||
} | ||
return value.substring(0, length); | ||
} | ||
function getMaxScore() { | ||
return setMaxScore; | ||
} | ||
function getTotalSets() { | ||
return setTotalSets; | ||
} | ||
function getPlayer1Name(){ | ||
return player1Name; | ||
} | ||
function getPlayer2Name() { | ||
return player2Name; | ||
} | ||
using Toybox.WatchUi as Ui; | ||
using Toybox.Application as App; | ||
|
||
//! Class that holds the configuration of the game | ||
//! as total number of sets and the max score in | ||
//! one set. It reads the configuration from | ||
//! the object store of the application. | ||
class GameConfiguration { | ||
|
||
hidden var setMaxScore; | ||
hidden var setTotalSets; | ||
hidden var player1Name; | ||
hidden var player2Name; | ||
static var instance = null; | ||
|
||
static function getInstance() { | ||
if (instance == null) { | ||
instance = new GameConfiguration(); | ||
} | ||
return instance; | ||
} | ||
|
||
function initialize() { | ||
setMaxScore = readKeyInt("setMaxScore", 11); | ||
setTotalSets = readKeyInt("setTotalSets", 5); | ||
player1Name = readString("player1Name", 8, App.loadResource(Rez.Strings.player1_score_label)); | ||
player2Name = readString("player2Name", 8, App.loadResource(Rez.Strings.player2_score_label)); | ||
} | ||
|
||
// make sure property is of type number | ||
// see https://webcache.googleusercontent.com/search?cd=2&hl=en&ct=clnk&gl=ch& | ||
// q=cache:0hxHRJ_80hcJ:https://forums.garmin.com/archive/index.php/t-359183.html+ | ||
hidden function readKeyInt(key, thisDefault) { | ||
var value = App.getApp().getProperty(key); | ||
|
||
if(value == null || !(value instanceof Number)) { | ||
if(value != null) { | ||
value = value.toNumber(); | ||
} else { | ||
value = thisDefault; | ||
} | ||
} | ||
return value; | ||
} | ||
|
||
hidden function readString(key, length, thisDefault) { | ||
var value = App.getApp().getProperty(key); | ||
|
||
if(value == null) { | ||
value = thisDefault; | ||
} | ||
return value.substring(0, length); | ||
} | ||
|
||
function getMaxScore() { | ||
return setMaxScore; | ||
} | ||
|
||
function getTotalSets() { | ||
return setTotalSets; | ||
} | ||
|
||
function getPlayer1Name(){ | ||
return player1Name; | ||
} | ||
|
||
function getPlayer2Name() { | ||
return player2Name; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.