Comments (10)
Ok I will find time to fix this soon.
from ecmascript.
Does it works in GDScript ?
from ecmascript.
will confirm but it should (I know it worked in C#)
from ecmascript.
It does, I converted it like so:
extends Node2D
class_name A
func _input(evt):
if evt.button_index == BUTTON_RIGHT and evt.is_pressed():
print('right click!')
if evt.button_index == BUTTON_LEFT && evt.pressed:
print('left click!')
from ecmascript.
You'd better report in upstream why this is commented out.
https://github.com/godotengine/godot/blob/72d12289bb5e46ad2ec840a23a247f5690afb0d3/core/os/input_event.cpp#L539
from ecmascript.
great question...
from ecmascript.
the git blame says it was done 3 years ago when removing the input event from the variant type. I can try to find the original author of that change on discord and ask them
from ecmascript.
I haven't gotten a reply by private message, I'll ask in one of the chats and eventually move to an issue on the github if no one can answer.
from ecmascript.
On IRC Fales (the godot JavaScript backend maintainer) told me that is commented out because it is bound in the super class:
fales[m]
17:38:03
mikemikeb: I think because it's exposed in the superclass "InputEvent".
https://github.com/godotengine/godot/blob/72d12289bb5e46ad2ec840a23a247f5690afb0d3/core/os/input_event.cpp#L119
from ecmascript.
Thanks for your report. This issue is fixed by bedb532
from ecmascript.
Related Issues (20)
- CommonJS Module Support HOT 4
- Steps needs to run wasm HOT 1
- [Suggestion] Documentation and getting started tutorial HOT 8
- dev is ok , when i build get error below HOT 1
- Refactor repo branches to enable good publish process HOT 9
- Close issues that refer to Godot Engine 3 but don't exist in Godot Engine 4 HOT 1
- [4.1-v0.0.17] Signal arguments makes it crash HOT 4
- Get started page 404 HOT 2
- Configuring esbuild for bundling classes issue
- Missing template / examples for pre-release HOT 2
- Can I add this to an existing godot install? HOT 1
- .d.ts file has errors HOT 6
- Condition "!is_inside_tree()" is true. HOT 2
- Master build does not build with Godot HOT 2
- Unicode parsing error: Invalid unicode codepoint (fffd), cannot represent as ASCII/Latin-1 HOT 1
- Global pollution HOT 2
- Creating an object in js lost all built-in function links
- [BUMP] GodotJS addon: CSS integration
- 4.2+ support
- Is it dead? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ecmascript.