Skip to content

Commit

Permalink
Release v1.3.0
Browse files Browse the repository at this point in the history
V1.3.0
  • Loading branch information
sennescheepers authored Sep 8, 2021
2 parents b8ee267 + 59b70d1 commit c850b28
Show file tree
Hide file tree
Showing 12 changed files with 80 additions and 43 deletions.
2 changes: 1 addition & 1 deletion manifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- 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="3">
<iq:application entry="Forerunner55WatchFaceApp" id="eab8f76959b347b8896d87dca50d9498" launcherIcon="@Drawables.LauncherIcon" minApiLevel="1.2.1" name="@Strings.AppName" type="watchface" version="1.2.0">
<iq:application entry="Forerunner55WatchFaceApp" id="eab8f76959b347b8896d87dca50d9498" launcherIcon="@Drawables.LauncherIcon" minApiLevel="1.2.1" name="@Strings.AppName" type="watchface" version="1.3.0">
<iq:products>
<iq:product id="approachs60"/>
<iq:product id="approachs62"/>
Expand Down
11 changes: 6 additions & 5 deletions monkey.jungle
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ project.manifest = manifest.xml

base.sourcePath = source

# Smaller devices use smaller time font and no data fields
round-208x208.resourcePath = $(round-208x208.resourcePath);resources-small-time;resources-no-datafields
round-218x218.resourcePath = $(round-218x218.resourcePath);resources-small-time;resources-no-datafields
# Smaller devices use smaller time font
round-208x208.resourcePath = $(round-208x208.resourcePath);resources-small-time
round-218x218.resourcePath = $(round-218x218.resourcePath);resources-small-time

round-208x208.excludeAnnotations = $(round-208x208.excludeAnnotations);buffered
round-218x218.excludeAnnotations = $(round-218x218.excludeAnnotations);buffered
# Devices bigger than 218x218 have two data fields
round-240x240.resourcePath = $(round-240x240.resourcePath);resources-datafields
round-260x260.resourcePath = $(round-260x260.resourcePath);resources-datafields
6 changes: 6 additions & 0 deletions resources-datafields/settings/properties.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<properties>

<property id="LeftDataField" type="number">0</property> <!-- 0 -->
<property id="RightDataField" type="number">0</property> <!-- 0 -->

</properties>
27 changes: 27 additions & 0 deletions resources-datafields/settings/settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<settings>

<setting propertyKey="@Properties.LeftDataField" title="@Strings.LeftDataFieldTitle">
<settingConfig type="list">
<listEntry value="0">@Strings.EmptyTitle</listEntry>
<listEntry value="1">@Strings.HRTitle</listEntry>
<listEntry value="2">@Strings.StepsTitle</listEntry>
<listEntry value="3">@Strings.FloorsTitle</listEntry>
<listEntry value="4">@Strings.CaloriesTitle</listEntry>
<listEntry value="5">@Strings.DistanceTitle</listEntry>
<listEntry value="6">@Strings.BatteryTitle</listEntry>
</settingConfig>
</setting>

<setting propertyKey="@Properties.RightDataField" title="@Strings.RightDataFieldTitle" >
<settingConfig type="list">
<listEntry value="0">@Strings.EmptyTitle</listEntry>
<listEntry value="1">@Strings.HRTitle</listEntry>
<listEntry value="2">@Strings.StepsTitle</listEntry>
<listEntry value="3">@Strings.FloorsTitle</listEntry>
<listEntry value="4">@Strings.CaloriesTitle</listEntry>
<listEntry value="5">@Strings.DistanceTitle</listEntry>
<listEntry value="6">@Strings.BatteryTitle</listEntry>
</settingConfig>
</setting>

</settings>
7 changes: 0 additions & 7 deletions resources-no-datafields/settings/properties.xml

This file was deleted.

25 changes: 0 additions & 25 deletions resources-no-datafields/settings/settings.xml

This file was deleted.

Binary file added resources/drawables/battery_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions resources/drawables/drawables.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@
<bitmap id="HeartIcon" filename="heart_icon.png" />
<bitmap id="StairsIcon" filename="stairs_icon.png" />
<bitmap id="FireIcon" filename="fire_icon.png" />
<bitmap id="BatteryIcon" filename="battery_icon.png" />
</drawables>
6 changes: 3 additions & 3 deletions resources/settings/properties.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<properties>

<property id="AppVersion" type="string">1.2.0</property>
<property id="AppVersion" type="string">1.3.0</property>

<property id="HourColor" type="number">0xFFFFFF</property> <!-- 0xFFFFFF -->
<property id="MinutesColor" type="number">0xFFFFFF</property> <!-- 0xFFFFFF -->
<property id="HourFilled" type="boolean">true</property> <!-- true -->
<property id="MinutesFilled" type="boolean">false</property> <!-- false -->
<property id="DisplaySeconds" type="boolean">true</property> <!-- true -->

<property id="LeftDataField" type="number">0</property> <!-- 0 -->
<property id="RightDataField" type="number">0</property> <!-- 0 -->
<!-- <property id="LeftDataField" type="number">0</property> --> <!-- 0 -->
<!-- <property id="RightDataField" type="number">0</property> --> <!-- 0 -->

<property id="AccentColor" type="number">0xFFFFFF</property> <!-- 0x00FF00 -->

Expand Down
4 changes: 2 additions & 2 deletions resources/settings/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<settingConfig type="boolean"/>
</setting>

<setting propertyKey="@Properties.LeftDataField" title="@Strings.LeftDataFieldTitle">
<!-- <setting propertyKey="@Properties.LeftDataField" title="@Strings.LeftDataFieldTitle">
<settingConfig type="list">
<listEntry value="0">@Strings.EmptyTitle</listEntry>
<listEntry value="1">@Strings.HRTitle</listEntry>
Expand All @@ -60,7 +60,7 @@
<listEntry value="4">@Strings.CaloriesTitle</listEntry>
<listEntry value="5">@Strings.DistanceTitle</listEntry>
</settingConfig>
</setting>
</setting> -->

<setting propertyKey="@Properties.Donation" title="@Strings.DonationTitle">
<settingConfig type="alphaNumeric" readonly="true"/>
Expand Down
1 change: 1 addition & 0 deletions resources/strings/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
<string id="FloorsTitle">Floors climbed</string>
<string id="CaloriesTitle">Calories burned</string>
<string id="DistanceTitle">Distance</string>
<string id="BatteryTitle">Battery percentage</string>

<string id="AccentColorTitle">Accent color</string>

Expand Down
33 changes: 33 additions & 0 deletions source/DataFields.mc
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ module DataFields {
// 3: Floors
// 4: Calories
// 5: Distance
// 6: Battery percentage

if (leftDataField == 1) {
drawHR(dc, true);
} else if (leftDataField == 2) {
Expand All @@ -50,6 +52,8 @@ module DataFields {
drawCalories(dc, true);
} else if (leftDataField == 5) {
drawDistance(dc, true);
} else if (leftDataField == 6) {
drawBattery(dc, true);
}

if (rightDataField == 1) {
Expand All @@ -62,6 +66,8 @@ module DataFields {
drawCalories(dc, false);
} else if (rightDataField == 5) {
drawDistance(dc, false);
} else if (rightDataField == 6) {
drawBattery(dc, false);
}

}
Expand Down Expand Up @@ -271,6 +277,33 @@ module DataFields {

}

function drawBattery(dc, left) {

// Get the data
var battery = System.getSystemStats().battery.format("%.0f");
battery = Lang.format("$1$$2$", [battery, "%"]);

// Calculate position
width = dc.getWidth();
textWidth = dc.getTextWidthInPixels(battery, dc.FONT_SYSTEM_XTINY);

iconLocX = width / 6 - ICON_WIDTH / 2;
iconLocY = width / 2 - ICON_WIDTH;

locX = width / 6 - textWidth / 2;
locY = width / 2;

if (!left) {
iconLocX += width / 6 * 4;
locX += width / 6 * 4;
}

// Draw icon and text
dc.drawBitmap(iconLocX, iconLocY, WatchUi.loadResource(Rez.Drawables.BatteryIcon));
dc.drawText(locX, locY, dc.FONT_SYSTEM_XTINY, battery, dc.TEXT_JUSTIFY_LEFT);

}

function setSettings() {

leftDataField = Application.getApp().getProperty("LeftDataField");
Expand Down

0 comments on commit c850b28

Please sign in to comment.