UNPKG

@rbxts/zircon

Version:

<div> <img src="https://i.imgur.com/YgpbX7G.png" align="left" width="128"/> <h1>ZIRCON</h1> <h3>A clean, sleek, runtime debugging console for Roblox</h3> <a href="https://npmjs.com/package/@rbxts/zircon"><img src="https://badge.fury.io

110 lines (109 loc) 2.99 kB
/// <reference types="@rbxts/types" /> /// <reference types="snapdragon" /> /// <reference types="@rbxts/compiler-types" /> /// <reference types="roact" /> import Roact from "@rbxts/roact"; import { SnapMargin } from "@rbxts/snapdragon"; import { ButtonProps } from "./Titlebar"; interface WindowProps { /** * Whether or not this window is draggable */ IsDraggable?: boolean; /** * Whether or not the titlebar is enabled */ TitlebarEnabled?: boolean; /** * The display order of this window */ DisplayOrder?: number; /** * The title text * * Only shows if `TitlebarEnabled` is true. */ TitleText?: string; /** * The position of this window */ Position?: UDim2; /** * The size of this window */ Size?: UDim2; /** * @deprecated Just nest a `ScrollView` in this component */ ContentType?: "Scrollable" | "Fixed"; /** * Whether or not snapping is enabled for this window */ SnapEnabled?: boolean; /** * If true, the snap will ignore the offset set by GuiService. */ SnapIgnoresOffset?: boolean; /** * The margin of the screen the snap adheres to */ SnapMargin?: SnapMargin; /** * The threshold margin for snapping. * * The bigger it is, the more snappy the snapping gets. * * The value for each axis is added onto the `SnapMargin`. * * So a SnapMargin of {Vertical: 50, Horizontal: 50} * * plus a SnapThresholdMargin of {Vertical: 25, Horizontal: 25} * * Will case the snap to occur at {Vertical: 75, Horizontal: 75} */ SnapThresholdMargin?: SnapMargin; TitlebarButtons?: Array<ButtonProps>; TitlebarCloseAction?: () => void; /** * @deprecated Use `SnapIgnoresOffset` */ IgnoreGuiInset?: boolean; /** * Whether or not to wrap this in a ScreenGui. * * Defaults to `true`. */ NativeWindow?: boolean; /** * The background transparency of this window */ Transparency?: number; /** * The ZIndexBehaviour of this window, only works if `NativeWindow` is true (which it is by default) */ ZIndexBehaviour?: Enum.ZIndexBehavior; /** * Event called when the window begins dragging */ DragBegan?: (pos: Vector3) => void; /** * Event called when the window finishes dragging */ DragEnded?: (pos: Vector3) => void; /** * Event called when the position is changed */ PositionChanged?: (pos: UDim2) => void; } interface WindowState { } export default class ZirconWindow extends Roact.Component<WindowProps, WindowState> { private dragRef; private windowRef; private dragController; private maid; didMount(): void; willUnmount(): void; render(): Roact.Element; } export {};