pxt-core
Version:
Microsoft MakeCode provides Blocks / JavaScript / Python tools and editors
36 lines (35 loc) • 1.22 kB
TypeScript
/// <reference path="../../pxtlib.d.ts" />
import { FieldCustom, FieldCustomDropdownOptions } from "./field_utils";
import { FieldDropdown } from "./field_dropdown";
export interface FieldImageDropdownOptions extends FieldCustomDropdownOptions {
columns?: string;
maxRows?: string;
width?: string;
}
export declare class FieldImageDropdown extends FieldDropdown implements FieldCustom {
isFieldCustom_: boolean;
protected width_: number;
protected columns_: number;
protected maxRows_: number;
protected backgroundColour_: string;
protected borderColour_: string;
protected savedPrimary_: string;
constructor(text: string, options: FieldImageDropdownOptions, validator?: Function);
/**
* Create a dropdown menu under the text.
* @private
*/
showEditor_(): void;
doValueUpdate_(newValue: any): void;
/**
* Callback for when a button is clicked inside the drop-down.
* Should be bound to the FieldIconMenu.
* @param {Event} e DOM event for the click/touch
* @private
*/
protected buttonClick_: (e: MouseEvent) => void;
/**
* Callback for when the drop-down is hidden.
*/
protected onHide_(): void;
}