mirror of
https://github.com/dyuri/garmin-repafield.git
synced 2025-12-16 19:24:01 +00:00
other icons
This commit is contained in:
parent
b571f011e5
commit
505a7a6b3a
5
.gitignore
vendored
5
.gitignore
vendored
@ -1 +1,6 @@
|
||||
/bin
|
||||
/gen
|
||||
/mir
|
||||
/internal-mir
|
||||
RepaField.prg
|
||||
RepaField.prg.debug.xml
|
||||
|
||||
4
TODO.md
4
TODO.md
@ -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
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
<drawables>
|
||||
<bitmap id="LauncherIcon" filename="launcher_icon.png" />
|
||||
<bitmap id="iconHills" filename="hills.png" />
|
||||
</drawables>
|
||||
|
||||
BIN
resources/drawables/e_gain.png
Normal file
BIN
resources/drawables/e_gain.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 885 B |
BIN
resources/drawables/e_loss.png
Normal file
BIN
resources/drawables/e_loss.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 869 B |
BIN
resources/drawables/hills.png
Normal file
BIN
resources/drawables/hills.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 907 B |
@ -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>
|
||||
|
||||
|
||||
@ -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);
|
||||
*/
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user