Skip to content

Commit

Permalink
fix-button-select
Browse files Browse the repository at this point in the history
It turned out that the buttons were wrong for some reason. The sorting of the data in options.data has changed for some reason.
  • Loading branch information
THEb0nny committed May 3, 2024
1 parent 2ca3b41 commit e5d1ff7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fieldeditors/field_brickbuttons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ export class FieldBrickButtons extends Blockly.FieldDropdown {

constructor(text: string, options: FieldPortsOptions, validator?: Function) {
super(options.data as any);

this.columns_ = parseInt(options.columns) || 4;
this.columns_ = parseInt(options.columns) || 1;
this.width_ = parseInt(options.width) || 150;
}

Expand Down Expand Up @@ -86,7 +86,7 @@ export class FieldBrickButtons extends Blockly.FieldDropdown {
d: 'M 157.78865,189.01028 108.18908,189.38233 70.654464,150.794 86.323259,135.4895 v -28.08625 h 14.101921 v 16.11144 a 12.006218,12.006218 0 0 0 11.85346,11.9788 c 11.59882,0.1841 43.13227,0 43.13227,0 a 10.18472,10.18472 0 0 0 10.38059,-10.38058 v -17.70966 h 14.39179 v 28.08632 l 15.3045,15.3045 z'
})

const buttons = [buttonEnter, buttonLeft, buttonRight, buttonTop, buttonBottom];
const buttons = [buttonEnter, buttonLeft, buttonTop, buttonBottom, buttonRight];
const options = this.getOptions();
for (let i = 0, option: any; option = options[i]; i++) {
let content = (options[i] as any)[0]; // Human-readable text or image.
Expand Down

0 comments on commit e5d1ff7

Please sign in to comment.