[SOLVED] Display FOV and TILT in separate textfield with custom CSS

  • Hi,
    me again with a new fix needed *wink*

    so i want OnScreen information like FOV and TILT,
    with my code i can display FOV and TILT in the same textbox, but for design reasons, i need to separate them to position where i want onScreen,

    so basically , i 've 2 actions with 2 events and 2 textstyle

    i 've got hard time to figure out where my mistake is...

    Thanks for pointing out for the fix

    z

    Edited once, last by zadda (April 12, 2012 at 10:06 AM).

  • Hi,

    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,

    if you only want a vertical offset between the texts try using [br] for line breaks,
    alternatively you could try using the textfield plugin to show the texts constantly on two different places,

    best regards,
    Klaus

  • Quote

    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,

    a bit annoying *huh*

    Quote

    alternatively you could try using the textfield plugin to show the texts constantly on two different places


    ya, but is it html5 compatible ?

    Thanks

    z

  • ok,

    question now is how to populate my textfield with my Tilt value ?

    there event:ACTION in documentation, but i think case is different here...

    Thanks

    z

  • Thanks Sacha,

    this is exactly what i was looking for *thumbsup*


    But....
    How to apply my text CSS (font color) and add "°" at the end ?

    Thanks

    z

    Edited once, last by zadda (April 10, 2012 at 4:24 PM).

  • Hi,

    just - keep it simple

    there is no need for additional <data> elements,
    build the text you want to show with the txtadd action and set it directly to the 'html' attribute of the textfield,
    the css style can also be set directly to the 'css' attribute (but note - the latest krpano version need to be used for that)

    e.g.

    Code
    txtadd(plugin[textfield_tilt].html, '[b]Tilt :[/b] ', get(tilt), '°');
    txtadd(plugin[textfield_fov].html, '[b]Angle of view :[/b] ', get(fov), '°');

    and

    Code
    <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;" />

    btw - in your textfield plugin elements replace the - origin="topright" - with - align="topright" - 'origin' is officially not supported anymore, it was renamed to 'align'.

    best regards,
    Klaus

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!