UNPKG

dazscript-framework

Version:

The **DazScript Framework** is a TypeScript-based framework for writing Daz Studio scripts. It provides all the advantages of a typed language such as autocompletion, error checking, and method parameter documentation and hinting. The framework also inclu

25 lines (20 loc) 790 B
import { Observable } from '@dsf/lib/observable'; import { createWidget, WidgetBuilderBase } from './widget-builder'; import { WidgetBuilderContext } from './widgets-builder'; export class PathComboBoxBuilder extends WidgetBuilderBase<DzPathComboBox> { constructor(context: WidgetBuilderContext, checkBoxes: boolean = false) { super(createWidget(context).withArgs([checkBoxes]).build(DzPathComboBox)) } items(items: string[] | Observable<string[]>): this { if (items instanceof Array) { this.widget.setTypes(items) } else { this.widget.setTypes(items.value) items.connect((items) => { this.widget.setTypes(items) }) } return this } }