forked from FOSS/BangleApps
documents all four possible widget areas
parent
8dc1dad867
commit
267f043dfe
|
@ -191,7 +191,7 @@ widget bar at the top of the screen they can add themselves to the global
|
|||
|
||||
```
|
||||
WIDGETS["mywidget"]={
|
||||
area:"tl", // tl (top left), tr (top right)
|
||||
area:"tl", // tl (top left), tr (top right), bl (bottom left), br (bottom right)
|
||||
sortorder:0, // (Optional) determines order of widgets in the same corner
|
||||
width: 24, // how wide is the widget? You can change this and call Bangle.drawWidgets() to re-layout
|
||||
draw:draw // called to draw the widget
|
||||
|
|
|
@ -176,8 +176,9 @@ declare type GraphicsApi = {
|
|||
declare const Graphics: GraphicsApi;
|
||||
declare const g: GraphicsApi;
|
||||
|
||||
type WidgetArea = 'tl' | 'tr' | 'bl' | 'br';
|
||||
declare type Widget = {
|
||||
area: 'tr' | 'tl';
|
||||
area: WidgetArea;
|
||||
width: number;
|
||||
draw: (this: { x: number; y: number }) => void;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue