Hotspot Tooltips for VR mode?

  • It is actually very easy! Lets start with Klaus's Tooltips example.


    So it works by altering the text (html) of the tooltip layer. Layers can not be displayed in VR so we just need to make a version that uses a hotspot instead of a layer!

    Here is a version I modified. In my case I wanted the tooltip to display under the hotspot, so I removed the asyncloop from the style and made it copy the ath and atv of the target item.

    Code
    <style name="tooltip"	 		onover.addevent="copy(hotspot[tooltip].html, tooltip); 		copy(hotspot[tooltip].atv, atv);  		copy(hotspot[tooltip].ath, ath); 		set(hotspot[tooltip].visible, true);	 		tween(hotspot[tooltip].alpha, 1.0, 0.5); " 	onout.addevent="tween(hotspot[tooltip].alpha, 0.0, 0.25, default, set(hotspot[tooltip].visible,false), copy(hotspot[tooltip].ath , ath); 		copy(hotspot[tooltip].avt, atv); );"	       />
     <hotspot name="tooltip" keep="true"	       type="text"	       distorted="false"	       visible="false" alpha="0"	       enabled="false" 	ath="40" atv="-50"  	oy="60"               ox=""	 	zorder='95'  	html=""  	padding="5 25 5 25"  	bg="true"        bgalpha="0.8"        bgcolor="get:skin_settings.design_bgcolor"        bgroundedge="10"  	onautosized="false"        oversampling="2"        mipmapping="2" 	css="font-family:Helvetica; font-size:13px; color:#ffffff; margin:5px;"           />

    Hmmm, I am not sure why that formatting is so ugly! *huh*


    To use this code, just add the tooltip style to your hotspot ( style="currentstyle|tooltip") and add a new tooltip attribute to the hotspot ( tooltip="Your tool tip text" )

    I hope that helps!

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!