Skip to content
This repository was archived by the owner on Dec 8, 2025. It is now read-only.

Conversation

@pelikhan
Copy link
Member

@pelikhan pelikhan commented Jul 21, 2023

Fix #573

@pelikhan pelikhan requested a review from mmoskal July 21, 2023 11:59
@pelikhan pelikhan merged commit f30f9c1 into main Jul 21, 2023
@pelikhan pelikhan deleted the gamepad branch July 21, 2023 14:32
Copy link
Contributor

@mmoskal mmoskal left a comment

Choose a reason for hiding this comment

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

love the combo or button - clean and simple!

}

ds.Gamepad.prototype.axes = function axes() {
let r = (this as any).__axes as ds.ClientRegister<{ x: number; y: number }>
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you can extend the ds.Gamepad interface (I know it's a class, but I think you can do interface) and add this field

Copy link
Member Author

Choose a reason for hiding this comment

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

do i have to? :)

Copy link
Contributor

Choose a reason for hiding this comment

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

nah ;)

}

emit(newValue: T) {
if (this.value !== newValue) {
Copy link
Contributor

Choose a reason for hiding this comment

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

was there a problem with this?

Copy link
Member Author

Choose a reason for hiding this comment

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

it's a bit misleading because in the case of axes ({x, y}), the equality check is not really useful.

Copy link
Contributor

Choose a reason for hiding this comment

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

sure, but this is generic - what if people use for say booleans?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants