Esempio n. 1
0
    // Shows a color picker to |player|. Returns a promise that will be resolved when they have
    // either selected a color, or dismissed the dialog. 
    static show(player) {
        const colorPicker = new ColorPicker(PrivateSymbol, player);
        ColorPickerManager.register(player, colorPicker);

        return colorPicker.showPicker().then(color => {
            ColorPickerManager.unregister(player);
            return color;
        });
    }
Esempio n. 2
0
 return colorPicker.showPicker().then(color => {
     ColorPickerManager.unregister(player);
     return color;
 });