Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve joystick support for up to 32 axes and buttons #1375

Merged
Changes from 1 commit
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
22 changes: 13 additions & 9 deletions src/components/mini-widgets/JoystickCommIndicator.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
<template>
<div>
<div v-tooltip="tooltipText" class="relative cursor-pointer" :class="indicatorClass" @click="showDialog = true">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to better get, what was breaking here? I tried reproducing but saw no bug.

Copy link
Contributor Author

@ArturoManzoli ArturoManzoli Oct 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the joystick config page was already open, showing this screen
image
And a joystick input was pressed, the whole config screen broke with a vNode error (dom injection incomplete).

The cause was the v-tooltip, when used as a prop, sometimes has bad collateral effects like this one. (Vuetify's fault).

(Running on master branch)
https://github.com/user-attachments/assets/2d4d11ce-c1b7-4e3b-939e-d1b11e0e8292

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow! I actually saw this one already, but had no idea the problem was the indicator! Nice catch!

<FontAwesomeIcon icon="fa-solid fa-gamepad" size="xl" />
<FontAwesomeIcon
v-if="!joystickConnected || !controllerStore.enableForwarding"
icon="fa-solid fa-slash"
size="xl"
class="absolute left-0"
/>
</div>
<v-tooltip :text="tooltipText" location="bottom">
<template #activator="{ props: tooltipProps }">
<div v-bind="tooltipProps" class="relative cursor-pointer" :class="indicatorClass" @click="showDialog = true">
<FontAwesomeIcon icon="fa-solid fa-gamepad" size="xl" />
<FontAwesomeIcon
v-if="!joystickConnected || !controllerStore.enableForwarding"
icon="fa-solid fa-slash"
size="xl"
class="absolute left-0"
/>
</div>
</template>
</v-tooltip>

<InteractionDialog
v-model="showDialog"
Expand Down