Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/components/profile/section.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,16 @@ export class SectionComponent {
return true
}

thumbstickGetActionAngle(thumbstick: CtrlThumbstick) {
const profile = this.profiles.profiles[this.profileIndex]
const actions = profile.thumbstickGetActions(thumbstick)
if (actions.up[0] .length > 0) return 0
else if (actions.right[0].length > 0) return 90
else if (actions.down[0] .length > 0) return 180
else if (actions.left[0] .length > 0) return 270
else return 0
}

buttonsCanHaveModifiers(button: CtrlButton) {
const sectionName = SectionIndex[button.sectionIndex]
const is_cardinal = (
Expand Down
2 changes: 1 addition & 1 deletion src/lib/plot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export const plotRotation = (section: SectionComponent) => {
const CenterDeadzone = thumbstick.rot_center_deadzone
const entryDeadzone = thumbstick.rot_entry_deadzone
const anticlockwise = thumbstick.rot_anticlockwise
const entryAngle = thumbstick.rot_relative_mode ? 45 : 0
const entryAngle = thumbstick.rot_relative_mode ? 45 : section.thumbstickGetActionAngle(thumbstick)
let sensAngle = 0
let sensLabel = ''
let bidirectional = false
Expand Down
Loading