Layer Entities - click

Posted By: jenGs

Layer Entities - click - 04/15/13 17:05

hmrg, I am using gamestudio since A4 and never used this screen entity things.
Now I need them and can't get them to react to the mouse.

I am creating this entities with
ENTITY *ent = ent_createlayer("file", 0, 1)
then I assigned an event
ent.emask |= ENABLE_TOUCH
and of course the I set the
ent.event = myEvent;
function.

No matter how big the mouse_range var is, the things will not react to the mouse.
Can they react? If yes, how do I do that?

Greeting,
Patrick
Posted By: DLively

Re: Layer Entities - click - 04/15/13 18:12

through functions and actions

I still use wdl, but since you come from wdl you should have no problem converting this code:

function click_event(){

if (event_type == event_click){beep();}// and further code proceeds

}

action click_act{

my.enable_click = on;
my.event = click_event;

while(1){wait(1);}

}

Hope this helps
Posted By: jenGs

Re: Layer Entities - click - 04/15/13 18:21

The problem is, that I allready do that. Only in Lite-C.
the function ent_createlayer only returns the entity, you can't
assign an action directly.
I create the screen entities procedural, so I can't prdefine them.
I come more and more to the conclusion, that it is not possible, to let them react to the mouse.
Posted By: Uhrwerk

Re: Layer Entities - click - 04/15/13 18:44

VIEW entities do not receive mouse events. See the table in the manual about entities: http://www.conitec.net/beta/aentities-intro.htm
Posted By: jenGs

Re: Layer Entities - click - 04/15/13 20:50

Ah ok, thank you laugh
© 2024 lite-C Forums