mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
Fix last __dirname and __filename usages
This commit is contained in:
@@ -2,16 +2,16 @@ let widget = require("widget");
|
||||
|
||||
let demo_seconds = 30;
|
||||
|
||||
print("Loading file", __filepath);
|
||||
print("From directory", __dirpath);
|
||||
print("Loading file", __filename);
|
||||
print("From directory", __dirname);
|
||||
|
||||
// addText supports "Primary" and "Secondary" font sizes.
|
||||
widget.addText(10, 10, "Primary", "Example JS widget");
|
||||
widget.addText(10, 20, "Secondary", "Example widget from JS!");
|
||||
|
||||
// load a Xbm file from the same directory as this script.
|
||||
widget.addText(0, 30, "Secondary", __filepath);
|
||||
let logo = widget.loadImageXbm(__dirpath + "/widget-js.fxbm");
|
||||
widget.addText(0, 30, "Secondary", __filename);
|
||||
let logo = widget.loadImageXbm(__dirname + "/widget-js.fxbm");
|
||||
|
||||
// add a line (x1, y1, x2, y2)
|
||||
widget.addLine(10, 35, 120, 35);
|
||||
|
||||
Reference in New Issue
Block a user