how to insert text title in thumbs Without mouse onhover?

  • how to insert text title in thumbs Without mouse onhover?
    How can the title be constantly on thumbs image?

    this is my code its work only with mouse onhover
    <!-- thumbnail actions begin (remove the 'buildthumbs()' call in the onstart event to remove the thumbs) -->

    <action name="buildthumbs">
    if(%1 != NEXT, set(i,0));
    if(i LT scene.count,
    copy(thumb, scene[get(i)].thumburl);
    txtadd(thumbname,'thumb_',get(i));
    addplugin(get(thumbname));
    set(plugin[get(thumbname)].url, get(thumb));
    set(plugin[get(thumbname)].keep, true);
    set(plugin[get(thumbname)].align, righttop);
    set(plugin[get(thumbname)].width, 80);
    set(plugin[get(thumbname)].height, 50);
    set(plugin[get(thumbname)].x, 10);
    set(plugin[get(thumbname)].y, 10);
    mul(plugin[get(thumbname)].x, i,5);
    mul(plugin[get(thumbname)].y, i,5);
    add(plugin[get(thumbname)].x, 5);
    add(plugin[get(thumbname)].y, 5);
    copy(plugin[get(thumbname)].xsmall, plugin[get(thumbname)].x);
    copy(plugin[get(thumbname)].ysmall, plugin[get(thumbname)].y);
    add(plugin[get(thumbname)].zorder, 100, i);
    set(plugin[get(thumbname)].effect,glow(0xFFFFFF,1.0,2,10000));
    set(plugin[get(thumbname)].jsborder,'1px solid #FFFFFF');
    copy(plugin[get(thumbname)].thumbpos, i);
    set(plugin[get(thumbname)].linkedscene, get(scene[get(i)].name) );
    set(plugin[get(thumbname)].onclick, openthumbs() );
    set(plugin[get(thumbname)].title, get(scene[get(i)].title) );
    inc(i);
    buildthumbs(NEXT);
    );

    </action>

    <action name="openthumb">
    if(%2 != NEXT,
    set(pos,0);
    copy(curpos, plugin[%1].thumbpos);
    set(xdst, 0);
    set(ydst, 0);
    );

    if(pos LT curpos,
    inc(pos);
    inc(ydst,130);
    sub(ymax, stageheight, 150);
    if(ydst GT ymax, inc(xdst,200);set(ydst,0); );
    openthumb(%1,NEXT);
    ,
    add(xdst,10);
    add(ydst,10);
    tween(plugin[%1].x, get(xdst) );
    tween(plugin[%1].y, get(ydst) );
    tween(plugin[%1].width, 190);
    tween(plugin[%1].height, 120);
    set(plugin[get(thumbname)].onhover,showtext(get(title), smallimg););

    );
    </action>

    <action name="closethumb">
    tween(plugin[%1].x, get(plugin[%1].xsmall));
    tween(plugin[%1].y, get(plugin[%1].ysmall));
    tween(plugin[%1].width, 80);
    tween(plugin[%1].height, 50);
    set(plugin[get(thumbname)].onhover,(null););

    </action>

    <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)); );
    inc(i);
    set(plugin[get(thumbname)].onhover,showtext(get(title), smallimg););
    openthumbs(NEXT);

    );
    </action>

    <action name="closethumbs">
    if(%1 != NEXT, set(i,0));
    if(i LT scene.count,
    txtadd(thumbname,'thumb_',get(i));
    closethumb(get(thumbname));
    set(plugin[get(thumbname)].onclick, openthumbs() );
    inc(i);
    set(plugin[get(thumbname)].onhover,(null););
    closethumbs(NEXT);

    );
    </action>
    <!-- thumbnail actions end -->


    help please
    Thank you

    Edited 2 times, last by yaaki (January 15, 2016 at 1:52 AM).

  • Why you don't learn from Klaus master code !!! You have in vtourskin.xml already code for that. Explore acion skin_addthumbs and part:

    Code
    if(skin_settings.thumbs_text,
    					txtadd(thumbtext, 'skin_thumbtext_', get(i));
    					addlayer(get(thumbtext));
    					layer[get(thumbtext)].loadstyle(skin_thumbtext_style);
    					set(layer[get(thumbtext)].keep, true);
    					set(layer[get(thumbtext)].parent, get(thumbname));
    					set(layer[get(thumbtext)].html, get(scene[get(i)].title));
    				  );


    Short answer: Create additional textfield layer on top of your thumbs.
    regards
    Umalo

Participate now!

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