Multiple graphics windows

BlitzMax Forums/BlitzMax Programming/Multiple graphics windows

Thanks for your answer, bud sadly enough, it doesn't work out..

I removed the EnablePulledInput and the 'print mousex()' stuff and added the following:

Function Hook:Object(id:Int,data:Object,context:Object)

	Local ev:TEvent=TEvent(data)
	If Not ev Return data
	Print ev.id
	If ev.source Print "event has a source" Else Print "event didn't have a source"
	
	Return data	

End Function

AddHook EmitEventHook,Hook,Null,0

As it turns out, the events show up nicely but the events don't have a source. This is also why the 'EnablePolledInput(a)' doesn't work, see in polledinput.bmx:

Function Hook:Object( id,data:Object,context:Object )

	Local ev:TEvent=TEvent(data)
	If Not ev Return data
	
	If inputSource And inputSource<>ev.source Return data

	'more stuff
End Function


InputSource is set to 'source' object in the EnablePolledInput(source:Object) function, so in my example it'd be 'a:TGraphics', but since the EventSource is empty, the function quits.

I'm sorry if I'm not clear enough, I find these things hard to explain in Human.