pxt-core
Version:
Microsoft MakeCode provides Blocks / JavaScript / Python tools and editors
30 lines (29 loc) • 1.24 kB
TypeScript
/// <reference path="../../pxtlib.d.ts" />
import * as Blockly from "blockly";
import { FieldSlider } from "../plugins/math";
import { FieldCustomOptions, FieldCustom } from "./field_utils";
export interface FieldTurnRatioOptions extends FieldCustomOptions {
}
export declare class FieldTurnRatio extends FieldSlider implements FieldCustom {
isFieldCustom_: boolean;
private params;
private path_;
private reporter_;
/**
* Class for a color wheel field.
* @param {number|string} value The initial content of the field.
* @param {Function=} opt_validator An optional function that is called
* to validate any constraints on what the user entered. Takes the new
* text as an argument and returns either the accepted text, a replacement
* text, or null to abort the change.
* @extends {Blockly.FieldNumber}
* @constructor
*/
constructor(value_: any, params: FieldTurnRatioOptions, opt_validator?: Blockly.FieldValidator);
static HALF: number;
static HANDLE_RADIUS: number;
static RADIUS: number;
createLabelDom_(labelText: string): [HTMLDivElement, HTMLSpanElement];
updateGraph_(): void;
setReadout(value: string | number): void;
}