Hello!
I am newbie in Monkey C and want to program a data field for an Edge device. I want to create a collection of useful functions in a file "Tools.mc", which I can then add to other projects.
As first I try to put graphical elements there. Later these should be reusable elements like "Heart", "Power", Cadence", which consist of circles, lines and polygons.
Can someone help me, how such a file "Tools.mc" must look like, so that it works and can be called from mainView.mc?
This does not work:
import Toybox.System;
import Toybox.Application;
import Toybox.Lang;
import Toybox.WatchUi;
import Toybox.Graphics;
// useful functions
class GraphicTools extends Graphics.dc {
function makeCircle( _x, _y, _r) {
dc.drawCircle(_x, _y, _r);
}
}
Thank you!