Sie sind nicht angemeldet.

tonesh

Schüler

  • »tonesh« ist der Autor dieses Themas

Beiträge: 75

Wohnort: Rome

Beruf: Photographer

  • Nachricht senden

1

Dienstag, 7. Juli 2009, 12:17

Changing textstyle

hello,

I have a virtual tour with a lot of area hotspots, that shows at cursor position some info with a specific textstyle.
I would like to create a button that switches this textstyle, to another, that has maybe bigger fonts and different position.
Intuitively, (I'm not at all a skilled programmer) I can imagine an action that changes the name of the textstyle so to apply the new textstyle
to all hotspots.
Is it possible to do that, and how? Or is there an other way to get this?

thanks

Toni

2

Dienstag, 7. Juli 2009, 12:36

Hi,

you could either change/modify the textstyle direct,
e.g.

Quellcode

1
2
set(textstyle[stylename].fontsize, 20);
..


or use a custom variable which contains the name of the current textstyle,
and use - get(...) - in the showtext() call,
e.g.

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
<krpano onstart="set(currentstyle,style1);">

... showtext(....., get(currentstyle) );

...

.. set(currentstyle, style1);
...
.. set(currentstyle, style2);

...
<textstyle name="style1" ... />
<textstyle name="style2" ... />


best regards,
Klaus

tonesh

Schüler

  • »tonesh« ist der Autor dieses Themas

Beiträge: 75

Wohnort: Rome

Beruf: Photographer

  • Nachricht senden

3

Dienstag, 7. Juli 2009, 13:29

Thanks a lot Klaus, it was exactly what I needed ! *g* *g* *g*

Toni

Ähnliche Themen