Skip to content
Eric edited this page Jul 14, 2017 · 6 revisions

cls

Official API

Javascript

Example limited to the colors from [0-15]. If you use another number (not limit), you will see a special fill pattern.

// cls demo in javascript

var c = 0;

function TIC() {

  // use up or down to change color
  if (btnp(0) & c<15) { c++; }
  if (btnp(1) & c>0) { c--; }

  // clear with the color
  cls(c);

  // make a background for the text
  rect(0, 0, 240, 8, 0);

  // output a text with function call
  print("cls("+c+")  --Use Up or Down to change color");

}

TypeScript

Coming soon.
  • API
    • TIC
    • scanline
    • [btn]
    • [btnp]
    • [clip]
    • cls
    • [circ]
    • [circb]
    • [exit]
    • [font]
    • [line]
    • [map]
    • [memcpy]
    • [memset]
    • [mget]
    • [mouse]
    • [mset]
    • [music]
    • [peek]
    • [peek4]
    • [pix]
    • [pmem]
    • [poke]
    • [poke4]
    • [print]
    • [rect]
    • [rectb]
    • sfx
    • [spr]
    • [sync]
    • [time]
    • trace
    • tri
Clone this wiki locally