Sie sind nicht angemeldet.

1

Freitag, 10. April 2015, 09:50

turning off mapspots (spots)

hi, one more question to mapspots - <spot>
I want them to turn on and off by an action. I tried things like switch (plugin[skin_map].spot[xy].visible) or set(plugin[skin_map].spot[xy].alpha, 0) but nothing seems to make my spots disappear. What am I doing wrong?

thanks

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Muxi« (10. April 2015, 19:22)


2

Sonntag, 12. April 2015, 10:20

ok, now I got it all *thumbsup*

to remove all scene-mapspots:

Quellcode

1
2
3
4
5
6
7
for(set(i,0), i LT scene.count, inc(i),
			if(scene[get(i)].lat,
				txtadd(spotoff, 'spot', get(i));
				plugin[skin_map].removespot(get(spotoff));
				);
			  );
	 	


to bring them back again use the skin_addmapspots-action but adding the map-plugin-name before the addspot-action:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
for(set(i,0), i LT scene.count, inc(i),
			if(scene[get(i)].lat,
				txtadd(spotname, 'spot', get(i));
				txtadd(spotclickevent, 'skin_hidetooltips(); activatespot(',get(spotname),'); loadscene(', get(scene[get(i)].name), ',null,MERGE,BLEND(1)); skin_updatescroll(); delayedcall(0.5,skin_showmap(false));');
				copy(scene[get(i)].mapspotname, spotname);
				plugin[skin_map].addspot(get(spotname), get(scene[get(i)].lat), get(scene[get(i)].lng), get(scene[get(i)].heading), false, get(spotclickevent), null);
				if(skin_settings.tooltips_mapspots,
					set(layer[skin_map].spot[get(spotname)].tooltip, get(scene[get(i)].title) );
					txtadd(layer[skin_map].spot[get(spotname)].onover, 'set(hovering,true);',  get(style[skin_tooltips].onover) );
					txtadd(layer[skin_map].spot[get(spotname)].onout,  'set(hovering,false);', get(style[skin_tooltips].onout)  );
				  );
			  );
		  );

Ähnliche Themen