Merge remote-tracking branch 'OFW/dev' into dev [ci skip]

This commit is contained in:
MX
2025-02-21 05:18:19 +03:00
16 changed files with 360 additions and 72 deletions

View File

@@ -9,3 +9,10 @@ export type IconData = symbol & { "__tag__": "icon" };
* @version Added in JS SDK 0.2, extra feature `"gui-widget"`
*/
export declare function getBuiltin(icon: BuiltinIcon): IconData;
/**
* Loads a .fxbm icon (XBM Flipper sprite, from flipperzero-game-engine) for use in GUI
* @param path Path to the .fxbm file
* @version Added in JS SDK 0.3, extra feature `"gui-widget-extras"`
*/
export declare function loadFxbm(path: string): IconData;

View File

@@ -42,7 +42,9 @@ type TextBoxElement = { element: "text_box", stripToDots: boolean } & Position &
type TextScrollElement = { element: "text_scroll" } & Position & Size & Text;
type ButtonElement = { element: "button", button: "left" | "center" | "right" } & Text;
type IconElement = { element: "icon", iconData: IconData } & Position;
type FrameElement = { element: "frame", radius: number } & Position & Size;
type RectElement = { element: "rect", radius: number, fill: boolean } & Position & Size; /** @version Amended in JS SDK 0.3, extra feature `"gui-widget-extras"` */
type CircleElement = { element: "circle", radius: number, fill: boolean } & Position; /** @version Added in JS SDK 0.3, extra feature `"gui-widget-extras"` */
type LineElement = { element: "line", x1: number, y1: number, x2: number, y2: number }; /** @version Added in JS SDK 0.3, extra feature `"gui-widget-extras"` */
type Element = StringMultilineElement
| StringElement
@@ -50,7 +52,9 @@ type Element = StringMultilineElement
| TextScrollElement
| ButtonElement
| IconElement
| FrameElement;
| RectElement
| CircleElement
| LineElement;
type Props = {};
type Child = Element;