Skip to content

Commit afabac9

Browse files
committed
latest files, workflow & prettierrc from pxt-microdata-gui. They are now identical.
1 parent 083f8f4 commit afabac9

10 files changed

Lines changed: 506 additions & 393 deletions

File tree

.github/workflows/makecode.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: MakeCode Build
2+
on:
3+
push:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
with:
12+
submodules: recursive
13+
- run: npx makecode

.prettierrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"arrowParens":"avoid","semi":false,"tabWidth":4}

button.ts

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -205,10 +205,12 @@ namespace microcode {
205205
public pressable: boolean
206206

207207
public get ariaId(): string {
208-
return (
209-
this._ariaId ||
210-
(typeof this.iconId === "string" ? <string>this.iconId : "")
211-
)
208+
// return (
209+
// this._ariaId ||
210+
// (typeof this.iconId === "string" ? <string>this.iconId : "")
211+
// )
212+
213+
return this._ariaId
212214
}
213215

214216
public set ariaId(value: string) {
@@ -227,24 +229,24 @@ namespace microcode {
227229
constructor(opts: {
228230
parent?: IPlaceable
229231
style?: ButtonStyle
230-
icon: string | Bitmap
232+
icon?: string | Bitmap
231233
ariaId?: string
232-
x: number
233-
y: number
234+
x?: number
235+
y?: number
234236
onClick?: (button: Button) => void,
235237
dynamicBoundaryColorsOn?: boolean
236238
boundaryColor?: number,
237239
flipIcon?: boolean,
238240
state?: number[],
239241
}) {
240242
super(
241-
opts.x,
242-
opts.y,
243+
(opts.x != null) ? opts.x : 0,
244+
(opts.y != null) ? opts.y : 0,
243245
opts.style || ButtonStyles.Transparent,
244246
opts.parent && opts.parent.xfrm
245247
)
246248
this.iconId = opts.icon
247-
this._ariaId = opts.ariaId
249+
this._ariaId = (opts.ariaId != null) ? opts.ariaId : ""
248250
this.onClick = opts.onClick
249251
this.buildSprite(this.image_())
250252

cursor.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ namespace microcode {
4141
this.moveDest = new Vec2()
4242
this.setSize()
4343

44+
this.setAriaContent("", this.moveDest)
4445
this.cursorOutlineColour = DEFAULT_CURSOR_OUTLINE_COLOUR
4546
}
4647

cursorscene.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,9 @@ namespace microcode {
9090

9191
this.cursor = new Cursor()
9292
this.picker = new Picker(this.cursor)
93-
this.navigator = new RowNavigator()
93+
94+
if (this.navigator == null)
95+
this.navigator = new RowNavigator()
9496
this.cursor.navigator = this.navigator
9597
}
9698

@@ -142,8 +144,8 @@ namespace microcode {
142144
}
143145

144146
/* override */ draw() {
145-
this.picker.draw()
146-
this.cursor.draw()
147+
// this.picker.draw()
148+
// this.cursor.draw()
147149
}
148150
}
149151

0 commit comments

Comments
 (0)