other icons

This commit is contained in:
Gyuri Horák 2023-09-26 17:53:44 +02:00
parent b571f011e5
commit 505a7a6b3a
Signed by: dyuri
GPG Key ID: 4993F07B3EAE8D38
8 changed files with 25 additions and 3 deletions

5
.gitignore vendored
View File

@ -1 +1,6 @@
/bin
/gen
/mir
/internal-mir
RepaField.prg
RepaField.prg.debug.xml

View File

@ -3,3 +3,7 @@
- configurable theme color
- pace/speed based on sport
- imperial unit support
- hr gauge => hr zone distribution
- track color => color coded by elevation gain/loss (or even vertical speed)
- https://github.com/loukad/vertlover

View File

@ -1,3 +1,4 @@
<drawables>
<bitmap id="LauncherIcon" filename="launcher_icon.png" />
<bitmap id="iconHills" filename="hills.png" />
</drawables>

Binary file not shown.

After

Width:  |  Height:  |  Size: 885 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 869 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 907 B

View File

@ -38,12 +38,12 @@
<label id="cadenceLabel" x="12%" y="98" color="0x004488" justification="Graphics.TEXT_JUSTIFY_RIGHT" font="Graphics.FONT_SMALL" text="c"/>
<!-- elevation, egain -->
<bitmap id="iconHills" filename="../drawables/hills.png" x="20" y="144" />
<label id="elevation" x="13%" y="132" color="0x0088FF" justification="Graphics.TEXT_JUSTIFY_LEFT" font="Graphics.FONT_MEDIUM"/>
<label id="elevationLabel" x="12%" y="138" color="0x004488" justification="Graphics.TEXT_JUSTIFY_RIGHT" font="Graphics.FONT_SMALL" text="e"/>
<bitmap id="iconEGain" filename="../drawables/e_gain.png" x="20" y="184" />
<label id="elevationGain" x="13%" y="172" color="0x0088FF" justification="Graphics.TEXT_JUSTIFY_LEFT" font="Graphics.FONT_MEDIUM"/>
<label id="elevationGainLabel" x="12%" y="178" color="0x004488" justification="Graphics.TEXT_JUSTIFY_RIGHT" font="Graphics.FONT_SMALL" text="+"/>
<bitmap id="iconELoss" filename="../drawables/e_loss.png" x="20" y="224" />
<label id="elevationLoss" x="13%" y="212" color="0x0088FF" justification="Graphics.TEXT_JUSTIFY_LEFT" font="Graphics.FONT_MEDIUM"/>
<label id="elevationLossLabel" x="12%" y="218" color="0x004488" justification="Graphics.TEXT_JUSTIFY_RIGHT" font="Graphics.FONT_SMALL" text="-"/>
</layout>

View File

@ -264,6 +264,7 @@ class RepaFieldView extends WatchUi.DataField {
// alt/egain/edrop
var altField = View.findDrawableById("elevation") as Text;
if (altField != null) {
// draw icon
altField.setText(altitude.format("%.0f"));
}
var eGainField = View.findDrawableById("elevationGain") as Text;
@ -300,6 +301,17 @@ class RepaFieldView extends WatchUi.DataField {
// Call parent's onUpdate(dc) to redraw the layout
View.onUpdate(dc);
// var bitmap = WatchUi.loadResource(Rez.Drawables.iconHills);
// dc.drawBitmap(132, 132, bitmap);
// TODO
/*
var bm = new WatchUi.Bitmap({
:rezId => Rez.Drawables.iconHills,
:locX => 132,
:locY => 132
});
bm.draw(dc);
*/
}
}