Draggable without caption

New releases and general discussions.

Post » Wed Jul 01, 2009 8:36 am

Can I somehow make my application window draggable, when it hasn't got caption?

(I want it without caption for its appearance!)
B
2
G
3
Posts: 12
Reputation: 874

Post » Wed Jul 01, 2009 9:03 am

You can set the window position using the Window object. You should be able to come up with a solution that way, but I haven't found a good method yet (the window kind of spazzes out if I set it to MouseX, MouseY). But give it a shot, maybe you can come up with something.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Wed Jul 01, 2009 2:59 pm

Can the button (generally in system) react when it's down?

I have an idea! (In further version of Construct)
B
2
G
3
Posts: 12
Reputation: 874

Post » Thu Jul 02, 2009 7:59 am

[quote="deadeye":nm6eiggm]the window kind of spazzes out if I set it to MouseX, MouseY[/quote:nm6eiggm]
I'd imagine, since on moving the window the relative coordinates of the mouse change.
Use absolute mouse position instead

EDIT: [url:nm6eiggm]http://www.udec.cl/~jfuente_alba/dragwindow.cap[/url:nm6eiggm] yup, it works. Can't get the window edge sizes though, so it jumps a bit on grab. Guess that could be fixed too somehow.

EDIT2: removed window frame thus no jump. Any key to get rid of the flashing annoyance.
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Thu Jul 02, 2009 1:07 pm

Thank you very very much.
B
2
G
3
Posts: 12
Reputation: 874

Post » Thu Jul 02, 2009 1:31 pm

how do you get absolute coords? did you use window position and add that to the mouse coords or something along those lines.
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Thu Jul 02, 2009 3:49 pm

The Mouse & Keyboard object has expressions to get the absolute mouse position.
Scirra Founder
B
359
S
214
G
72
Posts: 22,948
Reputation: 178,532

Post » Thu Jul 02, 2009 10:12 pm

[quote="Ashley":1mqywsn6]The Mouse & Keyboard object has expressions to get the absolute mouse position.[/quote:1mqywsn6]

Ah, that's what I was missing. I suppose that's why reading the wiki is a good thing :P
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 2 guests