Skip to content

Commit

Permalink
Merge pull request #522 from Zondax/fix_buttons_touchable
Browse files Browse the repository at this point in the history
Fix coordinates for buttons in stax/flex
  • Loading branch information
0xPxt authored Nov 20, 2024
2 parents fcf941a + 87cd79b commit ded6533
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
14 changes: 4 additions & 10 deletions src/buttons_flex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,10 @@ export namespace flex {
direction: SwipeDirection.NoSwipe,
};

// From y:96 to y:235 (both included), the first switch is toggleable.
export const toggleOption1: IButton = {
x: 415,
y: 140,
y: 96,
delay: 0.25,
direction: SwipeDirection.NoSwipe,
};
Expand All @@ -104,16 +105,10 @@ export namespace flex {
direction: SwipeDirection.NoSwipe,
};

// From y:236 to y:375 (both included), the second switch is toggleable.
export const toggleOption2: IButton = {
x: 350,
y: 200,
delay: 0.25,
direction: SwipeDirection.NoSwipe,
};

export const toggleOption3: IButton = {
x: 350,
y: 250,
y: 236,
delay: 0.25,
direction: SwipeDirection.NoSwipe,
};
Expand Down Expand Up @@ -159,7 +154,6 @@ export namespace flex {

[ButtonKind.ToggleSettingButton1, flex.toggleOption1],
[ButtonKind.ToggleSettingButton2, flex.toggleOption2],
[ButtonKind.ToggleSettingButton3, flex.toggleOption3],

[ButtonKind.NavRightButton, flex.navRightButton],
[ButtonKind.NavLeftButton, flex.navLeftButton],
Expand Down
8 changes: 5 additions & 3 deletions src/buttons_stax.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,10 @@ export namespace stax {
direction: SwipeDirection.NoSwipe,
};

// From y:88 to y:227 (both included), the first switch is toggleable.
export const toggleOption1: IButton = {
x: 350,
y: 135,
y: 88,
delay: 0.25,
direction: SwipeDirection.NoSwipe,
};
Expand All @@ -104,16 +105,17 @@ export namespace stax {
direction: SwipeDirection.NoSwipe,
};

// From y:228 to y:367 (both included), the second switch is toggleable.
export const toggleOption2: IButton = {
x: 350,
y: 200,
y: 228,
delay: 0.25,
direction: SwipeDirection.NoSwipe,
};

export const toggleOption3: IButton = {
x: 350,
y: 250,
y: 368,
delay: 0.25,
direction: SwipeDirection.NoSwipe,
};
Expand Down

0 comments on commit ded6533

Please sign in to comment.