Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Ayumi, 7th_zorro), 1,059 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
show a panel when entity is touched, then disappear when it isnt #295307
10/24/09 10:11
10/24/09 10:11
Joined: Apr 2009
Posts: 141
dakilla Offline OP
Member
dakilla  Offline OP
Member

Joined: Apr 2009
Posts: 141
is there a way to show a panel when an entity is touched by the mouse (just use EVENT_TOUCH laugh ) and then remove the panel when the mouse is removed from the entity (this is the bit i am stuck with). Thanks


One day there will be an unfixable bug,
That day is not today.
Re: show a panel when entity is touched, then disappear when it isnt [Re: dakilla] #295309
10/24/09 10:28
10/24/09 10:28
Joined: Jul 2007
Posts: 959
nl
F
flits Offline
User
flits  Offline
User
F

Joined: Jul 2007
Posts: 959
nl
never tested it but i gues it should work

Code:
function show_panel()
{
	if(event_type == EVENT_RELEASE) 
	{
	reset(panel,SHOW);
	}
	if(event_type == EVENT_TOUCH) 
	{
	set(panel,SHOW);
	}	
}

function entity_func()
{
	my.emask |= (ENABLE_TOUCH | ENABLE_RELEASE);
	my.event = show_panel;
...




"empty"
Re: show a panel when entity is touched, then disappear when it isnt [Re: flits] #295434
10/25/09 09:57
10/25/09 09:57
Joined: Apr 2009
Posts: 141
dakilla Offline OP
Member
dakilla  Offline OP
Member

Joined: Apr 2009
Posts: 141
oh, cheers, forgot about Event release lol, thanks


One day there will be an unfixable bug,
That day is not today.

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1