MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / ProgressBar

Class ProgressBar

examples/commodetto/progress/main.js:54–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54class ProgressBar extends Progress {
55 constructor(dictionary) {
56 super(dictionary);
57 this.frameColor = dictionary.frameColor;
58 this.fillColor = dictionary.fillColor;
59 }
60 update(/* percent */) {
61 let backgroundColor = this.backgroundColor;
62 let frameColor = this.frameColor;
63 render.fillRectangle(backgroundColor, this.x + 1, this.y + 1, this.width - 1, this.height - 1);
64 render.fillRectangle(frameColor, this.x, this.y, this.width, 1);
65 render.fillRectangle(frameColor, this.x, this.y, 1, this.height);
66 render.fillRectangle(frameColor, this.x, this.y + this.height - 1, this.width - 1, 1);
67 render.fillRectangle(frameColor, this.x + this.width - 1, this.y, 1, this.height);
68 }
69}
70
71class HorizontalProgressBar extends ProgressBar {
72 constructor(dictionary) {

Callers 1

ControlsPane.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected