Comments (2)
To detect when the right mouse button is clicked use subscribe on mouse down. Right click is button 1
app.SubscribeID(window.OnMouseDown, a, func(evname string, ev interface{}) {
if me, found := ev.(*window.MouseEvent); found {
if me.Button = 1 {
fmt.Println("RIght mouse clicked")
}
}
})
You can see it being used here https://github.com/g3n/g3nd/blob/master/demos/other/raycast.go#L160
If you need help with G3N you should join the discord as there is more people to help there.
from engine.
要检测何时单击鼠标右键,请在按下鼠标时使用订阅。右键单击是按钮 1
app.SubscribeID(window.OnMouseDown, a, func(evname string, ev interface{}) { if me, found := ev.(*window.MouseEvent); found { if me.Button = 1 { fmt.Println("RIght mouse clicked") } } })
你可以在这里看到它被使用https://github.com/g3n/g3nd/blob/master/demos/other/raycast.go#L160
如果你需要 G3N 的帮助,你应该加入 discord,因为那里有更多的人可以提供帮助。
This is not the problem. Panel coverage has been resolved. Thank you
from engine.
Related Issues (20)
- Is the project still under mantainance? HOT 2
- Help with drawing a hexagon HOT 1
- How to create a cubemap? HOT 3
- MacOS: fuzzy font on Retina HOT 3
- MacOS with Retina: UI clickable area is calculated incorrectly HOT 6
- How do you put this all in an html file? HOT 2
- fullscreen always uses primary monitor
- Haivng a lot of trouble customizing the window title to be anything other than "G3n Application"
- How i can made postprocessing?
- Is there a way to export the static scene to a png or jpeg? HOT 1
- Is the project dead? HOT 1
- Is there a place where I can see examples of using g3n? HOT 3
- Does g3n support gltf2.0? HOT 1
- Transparency / Rendering order HOT 2
- [BUG] Program crash after left/right click before move the cursor HOT 3
- fatal error: checkptr: pointer arithmetic computed bad pointer value on `GLS.VertexAttribPointer` HOT 1
- Test Webhook HOT 1
- Guides and Tutorials wiki page out of date. HOT 1
- GUI Builder does not appear to be working 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 engine.