Re: MouseMove, MouseLeft
Posted: Sat Apr 26, 2025 5:05 am
This is only if mouse button is down, right?
I need it without a mouse button pressed.
I need it without a mouse button pressed.
The Cross-Platform Multimedia Application Layer
https://forums.hollywood-mal.com/
Code: Select all
@REQUIRE "RapaGUI",{link=True}
CreateBrush(1,200,200,#RED)
CreateBrush(2,200,200,#TEAL)
CreateBrush(3,200,200,#OLIVE)
CreateBrush(4,200,200,#FUCHSIA)
Function p_EventFunc(msg)
Switch(msg.attribute)
Case "MouseMove"
moai.Set("result","text","id "..msg.id.." X="..msg.x.." Y="..msg.y.." TrigVal = "..msg.TriggerValue)
Case "MouseLeft"
moai.Set("result","text","MouseLeft, id = "..msg.id.." TrigVal = "..msg.TriggerValue)
EndSwitch
EndFunction
moai.CreateApp([[
<?xml version="1.0" encoding="iso-8859-1"?>
<application id="app">
<window title="Image">
<vgroup>
<colgroup columns="2" >
<image id="image" brush="1" Notify="mouseleft;mousemove" MouseCapture="True"/>
<image id="image2" brush="2" Notify="mouseleft;mousemove" MouseCapture="True"/>
<button Notify="MouseMove" >Button1</button>
<button>Button2</button>
<image id="image3" brush="3" Notify="mouseleft;mousemove" MouseCapture="False"/>
<image id="image4" brush="4" Notify="mouseleft;mousemove" MouseCapture="False"/>
<VSpace Notify="MouseMove" height="20"/>
<VSpace Notify="MouseMove" height="20"/>
</colgroup>
<textentry id="result">text</textentry>
</vgroup>
</window>
</application>
]])
InstallEventHandler({RapaGUI = p_EventFunc})
Repeat
WaitEvent
Forever
Yes, I can reproduce that. Very strange. Does that also happen on MorphOS? (I assume you're on MorphOS because you mentioned that in the first post). I 've only tested it on Windows currently but I'd be surprised if MorphOS showed the very same behaviour because the implementation is very different on both systems (MUI vs wxWidgets).
No, as described in the docs MouseMove is only supported for the classes Image/Scrollcanvas. I think it's currently impossible to do what you want. It would require a new attribute like Area.MouseLeave or something.