added s.pal, s.palc and s.paint
This commit is contained in:
12
screen.js
12
screen.js
@@ -250,6 +250,18 @@ var $builtinmodule = function (name) {
|
||||
mod.sqrt = new Sk.builtin.func((n) => toPy(Math.sqrt(toJS(n))));
|
||||
mod.pause = new Sk.builtin.func(() => { pause(); return Sk.builtin.none.none$; });
|
||||
mod.resume = new Sk.builtin.func(() => { resume(); return Sk.builtin.none.none$; });
|
||||
mod.pal = new Sk.builtin.func((colors, textColor) => {
|
||||
pal(colors !== undefined ? toJS(colors) : undefined, textColor !== undefined ? toJS(textColor) : 3);
|
||||
return Sk.builtin.none.none$;
|
||||
});
|
||||
mod.palc = new Sk.builtin.func((a, b) => {
|
||||
palc(a !== undefined ? toJS(a) : undefined, b !== undefined ? toJS(b) : undefined);
|
||||
return Sk.builtin.none.none$;
|
||||
});
|
||||
mod.paint = new Sk.builtin.func((width, height, data, options) => {
|
||||
var result = paint(toJS(width), toJS(height), toJS(data), options !== undefined ? toJS(options) : undefined);
|
||||
return result ? toPy(result) : Sk.builtin.none.none$;
|
||||
});
|
||||
|
||||
return mod;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user