|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
<textstyle name="FOVTEXT" origin="bottom" edge="bottom" yoffset="-135" textalign="center" background="false" border="false" fontsize="12" textcolor="0x666666" bold="false"
effect="glow(0xFFFFFF,0.0,0,0);glow(0x000000,0,0,0);dropshadow(0,0,0x000000,0,0.0);" showtime="2.0" fadetime="1.0" />
<textstyle name="TILTTEXT" origin="bottom" edge="bottom" yoffset="-165" textalign="center" background="false" border="false" fontsize="12" textcolor="0x666666" bold="false"
effect="glow(0xFFFFFF,0.0,0,0);glow(0x000000,0,0,0);dropshadow(0,0,0x000000,0,0.0);" showtime="2.0" fadetime="1.0" />
<action name="show_fov_text">
copy(fov,view.fov);
roundval(fov,2);
<!-- copy(tilt,view.vlookat); -->
<!-- roundval(tilt,2); -->
txtadd(msg,'ANGLE OF VIEW = ',get(fov),'°');
<!-- txtadd(msg,'ANGLE OF VIEW = ',get(fov),'° TILT = ',get(tilt),'°'); -->
showtext(get(msg),FOVTEXT);
</action>
<action name="show_tilt_text">
copy(tilt,view.vlookat);
roundval(tilt,2);
txtadd(msg,'TILT = ',get(tilt),'°');
showtext(get(msg),TILTTEXT);
</action>
<events name="fovdisplay" keep="true" onviewchanged="show_fov_text();" />
<events name="tiltdisplay" keep="true" onviewchanged="show_tilt_text();" />
|
This post has been edited 1 times, last edit by "zadda" (Apr 12th 2012, 10:06am)
Quoted
there can be only one showtext text at the same time on the screen,
that means when calling showtext again the previous showtext will be removed,
Quoted
alternatively you could try using the textfield plugin to show the texts constantly on two different places
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
<plugin name="htmltext" url="textfield.swf"
origin="topright" parent="stage"
width="100" height="30"
x="34" y="500"
html="data:htmldata1"
css="data:cssdata1"
borderwidth="0"
bordercolor="0xFFFFFF"
background="false"
backgroundcolor="0xFFFFFF"
selectable="false"
autosize="center"
/>
<data name="htmldata1">
<p align="center">
<b>Tilt : </b>
</p>
</data>
<data name="cssdata1">
p{color:#777777; font-family:Arial; font-size:12;}
a { text-decoration:underline; font-weight:bold; }
a:hover { color:#885500; }
</data>
<action name="show_tilt_text">
copy(tilt,view.vlookat);
roundval(tilt,2);
txtadd(msg,'TILT = ',get(tilt),'°');
showtext(get(msg),TILTTEXT);
</action>
|
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
<events name="fovdisplay" keep="true" onviewchanged="show_fov_text();" />
<action name="show_fov_text">
copy(fov,view.fov);
roundval(fov,2);
copy(tilt,view.vlookat);
roundval(tilt,2);
mul(tilt,-1);
set(plugin[textfield_tilt].html, get(tilt));
set(plugin[textfield_fov].html, get(fov));
</action>
<!-- Textfield displaying TILT -->
<plugin name="textfield_tilt" url="textfield.swf"
origin="topright" parent="stage" width="100" height="30" x="134" y="780"
html="data:htmldata1"
css="data:cssdata1"
borderwidth="0" bordercolor="0xFFFFFF"
background="false"
backgroundcolor="0xFFFFFF"
selectable="false"
autosize="center"
/>
<data name="htmldata1">
<p align="center">
<b>Angle of view : </b>°
</p>
</data>
<!-- Textfield displaying FOV -->
<plugin name="textfield_fov" url="textfield.swf"
origin="topright" parent="stage" width="100" height="30" x="134" y="800"
html="data:htmldata2"
css="data:cssdata1"
borderwidth="0" bordercolor="0xFFFFFF"
background="false"
backgroundcolor="0xFFFFFF"
selectable="false"
autosize="center"
/>
<data name="htmldata2">
<p align="center">
<b>Tilt : </b>°
</p>
</data>
<data name="cssdata1">
p{color:#666666; font-family:Arial; font-size:12;}
a { text-decoration:underline; font-weight:bold; }
a:hover { color:#885500; }
</data>
|
This post has been edited 1 times, last edit by "zadda" (Apr 10th 2012, 4:24pm)

|
|
Source code |
1 2 |
txtadd(plugin[textfield_tilt].html, '[b]Tilt :[/b] ', get(tilt), '°'); txtadd(plugin[textfield_fov].html, '[b]Angle of view :[/b] ', get(fov), '°'); |
|
|
Source code |
1 2 |
<plugin name="textfield_fov" ... css="color:#666666; font-family:Arial; font-size:12;" /> <plugin name="textfield_tilt" ... css="color:#666666; font-family:Arial; font-size:12;" /> |