Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by vicknick. 06/13/24 08:51
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 1,251 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19059 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