Page 1 of 1

I have hard head: move stack without title bar...

Posted: Thu Aug 25, 2011 2:19 pm
by tabbiati
I have hard head: when removed title bar from stack i not have
possibility to move stack: it's possible or not?

Thanks

Re: I have hard head: move stack without title bar...

Posted: Thu Aug 25, 2011 2:32 pm
by Klaus
Buongiorno tabbiati,

si, é possibile :D

You could:
create a graphic in size of your card
check "opaque" in the inspector (colors don't matter)
set its INK (Inspector -> Blending) to "noop", so it is invisible to the user but not for the mouse!
set it to the lowest layer, so it appears behind all of your objects and add this script to that graphic

Code: Select all

local maydrag

## We store the curent mouseloc
on mouseDown
  put mouseH() & "," & mouseV() into maydrag
end mouseDown

## We ned to do the "movement" in a mousemove handler, since this willbe sent continuously!
on mouseMove
  if maydrag is not empty then

    ## Calculate the OFFSET mouse <-> sides of stack and set the loc of stack accordingly
    set the topLeft of this stack to item 1 of the screenMouseLoc - item 1 of maydrag,item 2 of the screenMouseLoc - item 2 of maydrag
  end if
end mouseMove

## EMPTY local variable
on mouseUp
  put empty into maydrag
end mouseUp

on mouserelease
  mouseup
end mouserelease
Try this an be happy :D

You can of course also create a fancy FAKE title bar with this script.


Best

Klaus

Re: I have hard head: move stack without title bar...

Posted: Thu Aug 25, 2011 4:40 pm
by tabbiati
Thank Klaus,
You are a devil ....

You've probably realized that I persist with the skinning of the stack
and now, thanks to your suggestions, I begin to understand how
I could get a custom window .....
i have a hard head!
:lol:

PM: but why You know so italian language?