Skip to content

Commit 137a8e8

Browse files
committed
Documentation
1 parent 0d08925 commit 137a8e8

File tree

12 files changed

+1218
-1001
lines changed

12 files changed

+1218
-1001
lines changed

button.ts

Lines changed: 353 additions & 292 deletions
Large diffs are not rendered by default.

component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
namespace user_interface_base {
2-
32
export interface IComponent {
43
update: () => void
54
draw: () => void

coreAssets.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,27 @@
11
namespace user_interface_base {
22
let extraImage: Bitmap = null
33

4+
/**
5+
* This is used by the webapp. Ignore otherwise.
6+
*/
47
//% shim=TD_NOOP
58
function extraSamples(name: string) {
69

710
}
811

12+
13+
/**
14+
* This contains a number of assets that are shared by all Microbit apps.
15+
* Simply invoke icons.get("compass") to get a bitmap.
16+
* If your program does not use an icon it will be tree-shaken from your program.
17+
* So binary size should be minimised.
18+
*
19+
* The argument nullIfMissing is false by default meaning the icondb.MISSING icon is returned.
20+
*
21+
* If you are adding your own assets we recommend making your own get function in your own namespace,
22+
* that checks for your bitmap names, and invokes this function if it cannot find them.
23+
* See MicroData/assets.ts as an example.
24+
*/
925
export class icons {
1026
public static get(name: string, nullIfMissing = false): Bitmap {
1127
// editor icons

0 commit comments

Comments
 (0)