Showtext plugin for dummies

  • I’d like to add in my panoramas a text at the beginning. Just a floating short disclaimer phrase (preferably independent from the movement) that appears on screen for few seconds and then you can remove by clicking on screen or looking at it with your VR glasses.

    I know that it’s possible, by reading the documentation. I really like this program, but the problem is that many times the documentation is written for those that “already know”, not for us, dummies, that don’t know html or xml languages (and even worst if you are not-english!).

    It seems that the first step is:

    <include url="%VIEWER%/plugins/showtext.xml" />

    Ok, but, where must I include this line? Must I modify the showtext.xml file? Where can I write the phrase that I want to display? I’m completely lost.

    Can someone point me in the right direction, or put here some example that I can study and understand?

    Thanks!

  • Ok, but, where must I include this line?

    Anywhere in the XML file

    Must I modify the showtext.xml file?

    No

    Where can I write the phrase that I want to display?

    Code
    <layer name="lname" ...  onhover="showtext(text, textstyle)" />

    or

    Code
    <hotspot name="hname" ...  onhover="showtext(text, textstyle)" />

    kind regards
    Piotr

  • In vrTourSoft you can use start animation/show text in tour settindgs or in scene settings
    Write your text, format it (size, color, etc), select fade in time, show time and fade out time.
    For scenes you can set how many times to show.
    The program will create all necessary code.
    Try it for free.

    Read more https://www.vrtoursoft.com/editors/tourse….html#textanime

  • Many thanks to both of you for your quick reply.

    I tried to follow your instructions, Piotr, but I can’t see any text on screen when I enter my pano.

    where must I include this line? --> You say “Anywhere in the XML file” --> and I say: which XML file, tour.xml, vtourskin.xml…?

    Where can I write the phrase that I want to display? --> You say “Source code” -->and I say: which source code? tour.xml, vtourskin.xml, the html file?

    Thanks and I apologize for my total stupidity

  • check the examples, for example this one :
    https://krpano.com/releases/1.20.…orfu-skinselect
    and the relevant xml :
    https://krpano.com/viewsource.htm…/skinselect.xml

    to just display a text, you dont need showtext.xml. showtext.xml is only needed for advanced text styles.
    https://krpano.com/plugins/showtext/#top

    information not moving with the panorama is normally done with layers (layers are defined in screen space)
    then there are hotspots, those normally move with the panoramas (hotspots are defined in panorama space)

    in the example xml you see the definitions for the buttons on the top left
    they are grouped together with an enclosing layer (you could move or hide all together like this)
    for just one layer you can also simply define it without grouping :

    Code
    <layer name="disclaimer" type="text" html="my disclaimer text"  align="lefttop" x="20" y="20" keep="true" />


    you can of course position/style/scale this in many ways
    to see all attributes for the layer element, check the layer documentation here:
    https://krpano.com/docu/xml/#layer

    i guess you want it globally (not only for one scene) then you woud put that layer
    under <krpano> ... </krpano> (like in the example) and not inside a <scene ...>...</scene>
    keep="true" is needed so that it does not disappear, when you change the scene
    (in the example the keep is in the grouping layer, and therfore affects all layers inside it)

    the documentation is by the way super great, but true the first steps need some exploring
    check the examples and in the "xml reference" and "actions/scripting" reference you get all details

    enjoy :)

Jetzt mitmachen!

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