From 9c72a8210d89b81caa31efa2ab506512979fcc79 Mon Sep 17 00:00:00 2001 From: Rob Pilling Date: Thu, 25 May 2023 23:21:19 +0100 Subject: [PATCH] layout.d.ts: add rotation / l.r --- typescript/types/layout.d.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/typescript/types/layout.d.ts b/typescript/types/layout.d.ts index 3867efe46..10166f3e4 100644 --- a/typescript/types/layout.d.ts +++ b/typescript/types/layout.d.ts @@ -88,6 +88,13 @@ declare module Layout { type Align = -1 | 0 | 1; + const enum Rotation { + None = 0, + Deg90 = 1, + Deg180 = 2, + Deg270 = 3, + } + type HierarchyParts = { type: "v", @@ -108,16 +115,19 @@ declare module Layout { type: "btn", src: Image, cb: () => void, + r?: Rotation, } | { type: "btn", cb: () => void, label: string, font?: FontNameWithScaleFactor, scale?: number, + r?: Rotation, } ) | { type: "img", src: Image | (() => Image), + r?: Rotation, } | { type: "custom", render: (h: Hierarchy) => void,