|
|
Events
#339131
08/24/10 19:19
08/24/10 19:19
|
Joined: Nov 2009
Posts: 89 Germany, NRW
TrackingKeks
OP
Junior Member
|
OP
Junior Member
Joined: Nov 2009
Posts: 89
Germany, NRW
|
Hello, I have tried to use EVENT_CLICK, EVENT_RELEASE and EVENT_TOUCH with a simple cube for testing. All of them are working but they aren't working correctly. The mouse does not detect the entities every time.. But why? Any ideas? Thanks for your help Here is some code
PANEL* baumodus_idee_loeschen1_pan =
{
button=95,260,"ok1s.tga","ok2s.tga","ok1s.tga",baumodus_idee_loeschen_objekt(),NULL,NULL;
button=320,260,"abbrechen1.tga","abbrechen2.tga","abbrechen1.tga",baumodus_idee_loeschen_hide(),NULL,NULL;
layer = 13;
flags |=OVERLAY,TRANSLUCENT;
bmap = "baumodus_loeschen.tga";
}
...
function baumodus_idee_loeschen()
{
if(event_type == EVENT_CLICK)
{
test_ent=mouse_ent;
baumodus_idee_loeschen1_pan.pos_x = (screen_size.x - bmap_width(baumodus_idee_loeschen1_pan.bmap))/2;
baumodus_idee_loeschen1_pan.pos_y = (screen_size.y - bmap_height(baumodus_idee_loeschen1_pan.bmap))/2;
baumodus_idee_loeschen1_pan.flags|=SHOW;
}
if(event_type == EVENT_TOUCH)
{
mouse_map=cursor_delete_tga;
}
else if(event_type == EVENT_RELEASE)
{
mouse_map=cursor_pcx;
}
}
...
my.emask = ENABLE_CLICK|ENABLE_TOUCH|ENABLE_RELEASE;
my.event = baumodus_idee_loeschen;
...
Gamestudio: A7.82 Commercial/A8 Commercial System specs (Laptop): Windows 7 64bit DirectX v10.1 Intel Core i7-720QM CPU @ 1,60 GHz 4GB DDR2 Ram NVIDIA GeForce GT 230M (1024MB)
|
|
|
Re: Events
[Re: TrackingKeks]
#339683
08/28/10 16:59
08/28/10 16:59
|
Joined: Nov 2009
Posts: 89 Germany, NRW
TrackingKeks
OP
Junior Member
|
OP
Junior Member
Joined: Nov 2009
Posts: 89
Germany, NRW
|
Nobody can help me?
I'll try to explane the problem again: When I'm moving my mouse over an entity, the cursor should be changed but the mouse is changed and the event is called only sometimes. I've tested it with different entities and there were the same results: I had to search after a clickable position.
Hope somebody knows how to solve this problem^^
Gamestudio: A7.82 Commercial/A8 Commercial System specs (Laptop): Windows 7 64bit DirectX v10.1 Intel Core i7-720QM CPU @ 1,60 GHz 4GB DDR2 Ram NVIDIA GeForce GT 230M (1024MB)
|
|
|
Re: Events
[Re: MrGuest]
#339802
08/29/10 11:45
08/29/10 11:45
|
Joined: Nov 2009
Posts: 89 Germany, NRW
TrackingKeks
OP
Junior Member
|
OP
Junior Member
Joined: Nov 2009
Posts: 89
Germany, NRW
|
Thanks for your help! mouse_range changing has not solved the problem because it was my mistake: I had forgotten a function which generates fog about all entities near the camera. This explains the strange script behaviour too because the fog layed about all other entities.
Gamestudio: A7.82 Commercial/A8 Commercial System specs (Laptop): Windows 7 64bit DirectX v10.1 Intel Core i7-720QM CPU @ 1,60 GHz 4GB DDR2 Ram NVIDIA GeForce GT 230M (1024MB)
|
|
|
|