Note: This is an archived post that was originally sent to the Hollywood mailing list on Sun, 16 May 2010 18:40:09 +0200
Hello,
I've set many brushes on a windows but don't know which is layer number attribued to a brush. Is it possible to add some code which displays LayerID when moving over a brush, or a text (text displayed with textout)?
Thanks a lot for advance.
Tarzin
[16 May 2010] LayerID?
[16 May 2010] LayerID?
A500 / A600 / A1200 / SAM440
WinUAE OS3.9 (AmiKit) / OS4.1FE (FlowerPot)
---
https://twitter.com/TarzinCDK
WinUAE OS3.9 (AmiKit) / OS4.1FE (FlowerPot)
---
https://twitter.com/TarzinCDK
[16 May 2010] Re: LayerID?
Note: This is an archived post that was originally sent to the Hollywood mailing list on Sun, 16 May 2010 20:05:31 -0000
Will GetLayerAtPos()---a new 4.7 function---do what you want?
Will GetLayerAtPos()---a new 4.7 function---do what you want?
[17 May 2010] Re: Re: LayerID?
Note: This is an archived post that was originally sent to the Hollywood mailing list on Mon, 17 May 2010 20:32:36 +0200
Hello rev, :
I've tried this code without success
Any idea what's wrong?
Another think: Is debugprint function working without compilation?
thanks!
Eric/Tarzin
Hello rev, :
Yes, seems to be the right functon.Will GetLayerAtPos()---a new 4.7 function---do what you want?
I've tried this code without success
Code: Select all
; Function p_displayLAYERID
;
Function p_displayLAYERID(msg)
Switch (msg.action)
Case "OnMouseMove":
numid=GetLayerAtPos (msg.x,msg.y)
DebugPrint (msg.x,msg.y,numid)
EndSwitch
EndFunction
InstallEventHandler({OnMouseMove = p_afficheLAYERID})
Repeat
WaitEvent
Forever
Another think: Is debugprint function working without compilation?
thanks!
Eric/Tarzin
A500 / A600 / A1200 / SAM440
WinUAE OS3.9 (AmiKit) / OS4.1FE (FlowerPot)
---
https://twitter.com/TarzinCDK
WinUAE OS3.9 (AmiKit) / OS4.1FE (FlowerPot)
---
https://twitter.com/TarzinCDK
[17 May 2010] Re: LayerID?
Note: This is an archived post that was originally sent to the Hollywood mailing list on Mon, 17 May 2010 19:50:44 -0000
p_afficheLAYERID does not match up with p_displayLAYERID
p_afficheLAYERID does not match up with p_displayLAYERID
[18 May 2010] Re: Re: LayerID?
Note: This is an archived post that was originally sent to the Hollywood mailing list on Tue, 18 May 2010 07:12:29 +0200
no, that's because I've translated my code from french to english but function's name is the same in both cases.
no, that's because I've translated my code from french to english but function's name is the same in both cases.
A500 / A600 / A1200 / SAM440
WinUAE OS3.9 (AmiKit) / OS4.1FE (FlowerPot)
---
https://twitter.com/TarzinCDK
WinUAE OS3.9 (AmiKit) / OS4.1FE (FlowerPot)
---
https://twitter.com/TarzinCDK
[18 May 2010] Re: LayerID?
Note: This is an archived post that was originally sent to the Hollywood mailing list on Tue, 18 May 2010 14:16:39 -0000
Well, try the following code:
When your mouse is over the red box, the ID will be 1; when over the blue box, it will be 2; and when over the green box, it will be 3.
Well, try the following code:
Code: Select all
EnableLayers()
SetFillStyle(#FILLCOLOR)
Box(5, 5, 50, 50, #RED)
Box(55, 5, 50, 50, #BLUE)
Box(110, 5, 50, 50, #GREEN)
Function p_displayLAYERID(msg)
Switch (msg.action)
Case "OnMouseMove":
numid=GetLayerAtPos (msg.x,msg.y)
DebugPrint (msg.x,msg.y,numid)
EndSwitch
EndFunction
InstallEventHandler({OnMouseMove=p_displayLAYERID})
Repeat
WaitEvent
Forever
[18 May 2010] Re: Re: LayerID?
Note: This is an archived post that was originally sent to the Hollywood mailing list on Tue, 18 May 2010 19:14:25 +0200
rev, thx!
Your code is working and I found what was wrong! I sent you a sample of my code. Real code was
This is not working but if you change the line
It works, strange no??
Eric
rev, thx!
Your code is working and I found what was wrong! I sent you a sample of my code. Real code was
Code: Select all
; Function p_displayLAYERID
Function p_displayLAYERID(msg)
Switch (msg.action)
Case "OnMouseMove":
numid=GetLayerAtPos (msg.x,msg.y)
DebugPrint (msg.x,msg.y,numid)
EndSwitch
EndFunction
InstallEventHandler({OnKeyDown = p_majEnreg},{OnMouseMove=p_displayLAYERID})
Repeat
WaitEvent
Forever
Code: Select all
InstallEventHandler({OnKeyDown = p_majEnreg},{OnMouseMove=p_displayLAYERID})
with
InstallEventHandler({OnKeyDown = p_majEnreg})
InstallEventHandler({OnMouseMove=p_displayLAYERID})
Eric
A500 / A600 / A1200 / SAM440
WinUAE OS3.9 (AmiKit) / OS4.1FE (FlowerPot)
---
https://twitter.com/TarzinCDK
WinUAE OS3.9 (AmiKit) / OS4.1FE (FlowerPot)
---
https://twitter.com/TarzinCDK
[18 May 2010] Re: Re: LayerID?
Note: This is an archived post that was originally sent to the Hollywood mailing list on Tue, 18 May 2010 19:20:16 +0200
pffff, what an idiot...
InstallEventHandler({OnKeyDown = p_majEnreg, OnMouseMove = p_displayLAYERID})
and all is working!
Eric
pffff, what an idiot...
InstallEventHandler({OnKeyDown = p_majEnreg, OnMouseMove = p_displayLAYERID})
and all is working!
Eric
A500 / A600 / A1200 / SAM440
WinUAE OS3.9 (AmiKit) / OS4.1FE (FlowerPot)
---
https://twitter.com/TarzinCDK
WinUAE OS3.9 (AmiKit) / OS4.1FE (FlowerPot)
---
https://twitter.com/TarzinCDK