Benutzerinformationen überspringen
Wohnort: Berlin
Beruf: Software-Entwickler bei VR-Easy ( HTML, JS, PHP, krpano, C++, Java )
http://krpano.com/docu/xml/#layer.align auf center, dann ist der Layer immer mittig
http://krpano.com/docu/actions/#stagewidth & http://krpano.com/docu/xml/#events.onresize
|
|
Quellcode |
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 |
<layer name="skin_control_bar" keep="true" type="container" bgcolor="0xffffff" bgalpha="0" align="bottom" width="100%" height="40" x="0" y="20" y_opened="20" y_closed="-42" zorder="3">
<layer name="skin_btn_fs" style="skin_base|skin_glow" crop="0|576|64|64" align="bottom" x="-220" y="4" scale="0.5" onclick="switch(fullscreen);" devices="fullscreensupport" />
<layer name="btn_autorot" style="skin_base|skin_glow" crop="64|128|64|64" align="bottom" x="140" y="4" scale="0.5" onclick="switch(autorotate.enabled);" />
<layer name="skin_btn_thumbs" style="skin_base|skin_glow" crop="0|128|64|64" align="bottom" x="-140" y="4" scale="0.5" ondown2="skin_showthumbs();" />
<layer name="skin_btn_lt" style="skin_base|skin_glow" crop="0|192|64|64" align="bottom" x="-100" y="4" scale="0.5" ondown2="set(hlookat_moveforce,-0.1);" onup2="set(hlookat_moveforce,0);" />
<layer name="skin_btn_rt" style="skin_base|skin_glow" crop="64|192|64|64" align="bottom" x="-60" y="4" scale="0.5" ondown2="set(hlookat_moveforce,+0.1);" onup2="set(hlookat_moveforce,0);" />
<layer name="skin_btn_up" style="skin_base|skin_glow" crop="0|256|64|64" align="bottom" x="-20" y="4" scale="0.5" ondown2="set(vlookat_moveforce,-0.1);" onup2="set(vlookat_moveforce,0);" />
<layer name="skin_btn_dn" style="skin_base|skin_glow" crop="64|256|64|64" align="bottom" x="20" y="4" scale="0.5" ondown2="set(vlookat_moveforce,+0.1);" onup2="set(vlookat_moveforce,0);" />
<layer name="skin_btn_in" style="skin_base|skin_glow" crop="0|512|64|64" align="bottom" x="60" y="4" scale="0.5" ondown2="set(fov_moveforce,-0.1);" onup2="set(fov_moveforce,0);" />
<layer name="skin_btn_ou" style="skin_base|skin_glow" crop="64|512|64|64" align="bottom" x="100" y="4" scale="0.5" ondown2="set(fov_moveforce,+0.1);" onup2="set(fov_moveforce,0);" />
<layer name="skin_btn_hide" style="skin_base|skin_glow" crop="0|448|64|64" align="bottom" x="180" y="4" scale="0.5" onclick="skin_hideskin()" />
<layer name="skin_btn_show" style="skin_base|skin_glow" crop="64|448|64|64" align="right" x="15" y="-50" scale="0.5" alpha="0" visible="false" onclick="skin_showskin()" />
<layer name="skin_btn_hotspots" style="skin_base|skin_glow" crop="0|0|64|64" align="bottom" x="-180" y="4" scale="0.5" onclick="hideallhotspots();" />
</layer>
<!-- Alternative small screen layout for mobile devices (override/extend settings) -->
<krpano devices="mobile">
<layer name="skin_control_bar" height="64" y="0" y_opened="0" y_closed="-68">
<layer name="skin_btn_thumbs" scale="1" y="0" align="bottom" x="-140" />
<layer name="skin_btn_lt" visible="false" />
<layer name="skin_btn_rt" visible="false" />
<layer name="skin_btn_up" visible="false" />
<layer name="skin_btn_dn" visible="false" />
<layer name="skin_btn_in" visible="false" />
<layer name="skin_btn_ou" visible="false" />
<layer name="skin_btn_fs" scale="1" y="0" align="bottom" x="140" />
<layer name="skin_btn_hide" scale="1" x="5" />
<layer name="skin_btn_show" scale="1" x="0" y="-58" />
<layer name="autorotate" visible="false" />
<layer name="skin_btn_hotspots" scale="1" y="0" align="bottom" x="-140" />
</layer>
|
Benutzerinformationen überspringen
Wohnort: Berlin
Beruf: Software-Entwickler bei VR-Easy ( HTML, JS, PHP, krpano, C++, Java )
die Kind-Elemente von "skin_control_bar" müssen sich an align="center" ausrichten und von da mit x="+/-" positioniert werden
|
|
Quellcode |
1 2 3 4 5 6 7 8 |
<layer name="skin_control_bar" keep="true" type="container" bgcolor="0x000000" bgalpha="0" align="bottom" width="100%" height="40" x="0" y="20" y_opened="20" y_closed="-42" zorder="3">
<layer name="skin_btn_fs" style="skin_base|skin_glow" crop="0|576|64|64" align="center" x="-200" y="-0.5" scale="0.5" onclick="switch(fullscreen);" devices="fullscreensupport" />
<layer name="skin_btn_hotspots" style="skin_base|skin_glow" crop="0|0|64|64" align="center" x="-160" y="-0.5" scale="0.5" onclick="hideallhotspots();" />
<layer name="skin_btn_thumbs" style="skin_base|skin_glow" crop="0|128|64|64" align="center" x="-120" y="-0.5" scale="0.5" ondown2="skin_showthumbs();" />
...
|
Benutzerinformationen überspringen
Wohnort: Berlin
Beruf: Software-Entwickler bei VR-Easy ( HTML, JS, PHP, krpano, C++, Java )
Eine action programmieren, die deine sichtbaren Buttons mittig sortieren.![]()
Aber na klar! Dann leg ich gleich mal los...
Benutzerinformationen überspringen
Wohnort: Berlin
Beruf: Software-Entwickler bei VR-Easy ( HTML, JS, PHP, krpano, C++, Java )
Benutzerinformationen überspringen
Wohnort: Berlin
Beruf: Software-Entwickler bei VR-Easy ( HTML, JS, PHP, krpano, C++, Java )