Sie sind nicht angemeldet.

1

Dienstag, 2. August 2011, 18:54

Adding a text hint to the thumbnail list?

Hi,

I was trying to add a hint to the thumbnails which are created by vtour. What I did is simply find the piece of code which seemed right and add a line:
set(plugin[get(thumbname)].onhover,showtext(get(linkedscene), buttonstyle););


Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<action name="openthumbs">
if(%1 != NEXT,
set(i,0);
set(events.onclick, set(events.onclick,null); delayedcall(0.1, closethumbs() ); );
  );

if(i LT scene.count,
txtadd(thumbname,'thumb_',get(i));
openthumb(get(thumbname));
set(plugin[get(thumbname)].onclick, set(events.onclick,null); closethumbs(); loadscene(get(linkedscene),null,MERGE,BLEND(1)); );
set(plugin[get(thumbname)].onhover,showtext(get(linkedscene), buttonstyle););
inc(i);
openthumbs(NEXT);
  );
</action>


This modification gives me the scenename. Now I want to have a proper title instead, but using "get(linkedscene.title), buttonstyle);" is not working. How can I achieve this?

Any help very much appreciated,

Michael

2

Samstag, 6. August 2011, 12:48

Hi,

when look the whole "buildthumbs" code you see the "linkedscene" is a copied attribute that contains the scene name:

Quellcode

1
set(plugin[get(thumbname)].linkedscene, get(scene[get(i)].name) );


so add a "title" attribute to the <scene> and add code something like that:

Quellcode

1
set(plugin[get(thumbname)].scenetitle, get(scene[get(i)].title) );


then the thumb plugin has a "scenetitle" attribute with the title of the <scene>,
and to show it do:

Quellcode

1
set(plugin[get(thumbname)].onhover,showtext(get(scenetitle), buttonstyle););


best regards,
Klaus

3

Freitag, 12. August 2011, 23:29

Thank you very much Klaus, I'll give it a try!!