Skip to main content
gamedev.net
🔒 Locked

Drag & Drop

Started by shafiee01 2 replies 950+ views
Original Post
shafiee01
shafiee01
Hi
Anyone know how to implement "drag&drop an item to a GLFW window" in linux?
is it possible?
Thanks a lot.
TTK-Bandit
TTK-Bandit
I'm not very much into this, but I'd say that drag & drop is window manager specific, so you'd have to work with say KDE or Gnome to get it working.
GLFW isn't designed to do that much user interface stuff, and you'd probably have to rewrite it a lot to make it work.
It'd probably be a lot easier if you used QT instead.
SimonForsman
SimonForsman
If its for a game GUI you pretty much have to do it from scratch, dragging is just a matter of tracking the mouse position and buttons and moving an object in an appropriate way.

If you want to detect if the user drags and drops an object from outside the GLFW window on top of the GLFW window you'll have to use OS specific functions. (GTK+, xdnd or motif for example) (Both QT and GTK+ use xdnd and/or motif on X11(Linux) systems)
[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!
shafiee01
shafiee01
Thanks guys!
I am going to use QT!
i think its the easiest way!
i used glfw beacause of it's simple Timers&Threads !

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.