test.xml 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <krpano>
  2. <link type="text/css" rel="stylesheet" id="dark-mode-custom-link"/>
  3. <link type="text/css" rel="stylesheet" id="dark-mode-general-link"/>
  4. <style lang="en" type="text/css" id="dark-mode-custom-style"/>
  5. <style lang="en" type="text/css" id="dark-mode-native-style"/>
  6. <style lang="en" type="text/css" id="dark-mode-native-sheet"/>
  7. <!-- use a grid preview pano as background -->
  8. <preview type="grid(cube,16,16,512,0xCCCCCC,0xF6F6F6,0x999999);"/>
  9. <!-- view settings -->
  10. <view hlookat="0" vlookat="0" fovtype="VFOV" fov="100" fovmin="60" fovmax="150"/>
  11. <!-- a style for a simple textfield element -->
  12. <style name="text" url="%SWFPATH%/plugins/textfield.swf" background="false" css="color:#FFFFFF;" enabled="false"/>
  13. <!-- the action for dragging the layer elements - call it once in the ondown event -->
  14. <action name="draglayer"> copy(drag_currentx, x); copy(drag_currenty, y); copy(drag_stagex, mouse.stagex); copy(drag_stagey, mouse.stagey); indexoftxt(align_contains_right, get(align), 'right'); indexoftxt(align_contains_bottom, get(align), 'bottom'); calc(drag_align_x, align_contains_right GE 0 ? -1 : +1); calc(drag_align_y, align_contains_bottom GE 0 ? -1 : +1); asyncloop(pressed, calc(x, drag_currentx + (mouse.stagex - drag_stagex)*drag_align_x); calc(y, drag_currenty + (mouse.stagey - drag_stagey)*drag_align_y); ); </action>
  15. <!-- a special action for dragging a layer only vertically within its parent layer -->
  16. <action name="draglayer_vertically_within_parent"> copy(drag_currenty, y); copy(drag_stagey, mouse.stagey); calc(y_min, layer[get(parent)].pixelheight - pixelheight); if(y_min LT 0, asyncloop(pressed, calc(y, drag_currenty + (mouse.stagey - drag_stagey)); clamp(y, get(y_min), 0); ); ); </action>
  17. <!-- the example layers -->
  18. <layer name="box1" type="container" align="lefttop" x="50" y="50" width="250" height="250" bgcolor="0x000000" bgalpha="0.5" bgcapture="true" maskchildren="true" ondown="draglayer();">
  19. <layer name="txt1" style="text" html="drag me" align="lefttop"/>
  20. <layer name="box2" type="container" align="center" x="0" y="0" width="100" height="100" bgcolor="0x44AADD" bgalpha="1.0" bgcapture="true" ondown="draglayer();">
  21. <layer name="txt2" style="text" html="drag me" align="center"/>
  22. </layer>
  23. <layer name="txt3" style="text" html="maskchildren=true" align="leftbottom"/>
  24. </layer>
  25. <layer name="box3" type="container" align="rightbottom" x="50" y="150" width="300" height="200" bgcolor="0x0033FF" bgalpha="0.5" bgcapture="true" maskchildren="false" ondown="draglayer();">
  26. <layer name="txt4" style="text" html="drag me" align="lefttop"/>
  27. <layer name="box4" type="container" align="center" x="0" y="0" width="100" height="100" bgcolor="0x33FF33" bgalpha="0.7" bgcapture="true" ondown="draglayer();">
  28. <layer name="txt5" style="text" html="drag me" align="center"/>
  29. </layer>
  30. <layer name="txt6" style="text" html="maskchildren=false" align="leftbottom"/>
  31. </layer>
  32. <layer name="textbox" type="container" align="center" x="0" y="0" width="300" height="300" bgcolor="0x333333" bgalpha="0.7" bgcapture="true" ondown="draglayer();">
  33. <layer name="title" style="text" align="top" y="5" width="100%" css="text-align:center; color:#FFFFFF; font-family:Arial; font-weight:bold; font-size:14px;" html="Textbox"/>
  34. <layer name="textarea" type="container" align="lefttop" x="10" y="30" width="280" height="260" bgcolor="0xFFFFFF" bgalpha="1.0" maskchildren="true">
  35. <layer name="text" style="text" enabled="true" align="lefttop" x="0" y="0" width="100%" autoheight="true" css="text-align:left; color:#000000; font-family:Arial; font-size:15px;" html="data:testtext" ondown="draglayer_vertically_within_parent();"/>
  36. </layer>
  37. </layer>
  38. <data name="testtext"> The [b]krpano Viewer[/b] is a small and very flexible high-performance viewer for all kind of panoramic images and interactive virtual tours. The viewer is available as Flash and HTML5 application. The viewer is designed for the usage inside the Browser on Desktop (Windows, Mac, Linux) and on Mobiles/Tablets (iPhone, iPad, Android, ...).[br/] [br/] In addition to the [b]krpano Viewer[/b] there are the [b]krpano Tools[/b] - this are small tools and droplets which are helping to automatically prepare the panoramic images for viewing and making them ready-to-use. Making a pano or a tour is possible just by drag-and-drop.[br/] [br/] Convince yourself by viewing the examples and / or by downloading the krpano Viewer and krpano Tools for free and try using them with your own panoramic images.[br/] </data>
  39. </krpano>