You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

tonesh

Trainee

  • "tonesh" started this thread

Posts: 69

Location: Rome

Occupation: Photographer

  • Send private message

1

Tuesday, July 7th 2009, 12:17pm

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

Tuesday, July 7th 2009, 12:36pm

Hi,

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

Source code

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.

Source code

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

Trainee

  • "tonesh" started this thread

Posts: 69

Location: Rome

Occupation: Photographer

  • Send private message

3

Tuesday, July 7th 2009, 1:29pm

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

Toni

Similar threads