How can hide some thumbs from thumbs bar?

  • Solution from Klaus:

    Must change in tour.xml:

    <scene ... skipthumb="true"> ... </scene>

    And in vtourskin.xml:


    <action name="skin_addthumbs">
    copy(thumbwidth, skin_settings.thumbs_width);
    copy(thumbheight, skin_settings.thumbs_height);
    copy(thumbpadding, skin_settings.thumbs_padding);
    copy(thumbcrop, skin_settings.thumbs_crop);

    if(device.mobile,
    mul(thumbwidth,2);
    mul(thumbheight,2);
    mul(thumbpadding,2);
    );

    add(thumbxoffset, thumbwidth, thumbpadding);
    mul(thumbxcenter, thumbxoffset, 0.5);

    set(thumbcnt,0);

    for(set(i,0), i LT scene.count, inc(i),
    if(scene[get(i)].skipthumb != true,
    txtadd(thumbname,'skin_thumb_',get(thumbcnt));
    addlayer(get(thumbname));
    copy(layer[get(thumbname)].url, scene[get(i)].thumburl);
    set(layer[get(thumbname)].keep, true);
    set(layer[get(thumbname)].parent, 'skin_thumbs');
    set(layer[get(thumbname)].align, lefttop);
    copy(layer[get(thumbname)].crop, thumbcrop);
    copy(layer[get(thumbname)].width, thumbwidth);
    copy(layer[get(thumbname)].height, thumbheight);
    mul(thumbx, thumbcnt, thumbxoffset);
    add(thumbx, thumbpadding);
    copy(layer[get(thumbname)].x, thumbx);
    copy(layer[get(thumbname)].y, thumbpadding);
    add(scene[get(i)].thumbx, thumbx, thumbxcenter);
    copy(scene[get(i)].thumby, thumbpadding);
    set(layer[get(thumbname)].linkedscene, get(scene[get(i)].name) );
    set(layer[get(thumbname)].onclick, skin_showthumbs(false); copy(layer[skin_thumbborder].parent, name); loadscene(get(linkedscene), null, MERGE, BLEND(0.5)); );
    if(skin_settings.tooltips_thumbs,
    set(layer[get(thumbname)].onhover, showtext(get(scene[get(linkedscene)].title),SKIN_TOOLTIPS); );
    );
    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));
    );
    inc(thumbcnt);
    );
    );


    mul(thumbbarwidth, thumbxoffset, thumbcnt);
    add(thumbbarwidth, thumbpadding);
    add(thumbbarheight, thumbpadding, thumbheight);
    add(thumbbarheight, thumbpadding);

    if (skin_settings.thumbs_scrollindicator,
    copy(layer[skin_thumbs_scrollindicator].y, thumbbarheight);
    add(thumbbarheight, layer[skin_thumbs_scrollindicator].height);
    );

    copy(layer[skin_thumbs].height, thumbbarheight);
    copy(layer[skin_thumbs].width, thumbbarwidth);

    mul(halfheight, thumbbarheight, 0.5);
    copy(layer[skin_thumbs_scrollleft].y, halfheight);
    copy(layer[skin_thumbs_scrollright].y, halfheight);

    </action>

  • my test with your code is ok...

    it works.. but the 1st thumb / after id hide the real 1st thumb.. cant be click... unless i use the fwd & bwd button...

    i think better skip scene than skip thumb... :)

  • Add attribute e.g. view="day" to scene with two states "day" or "night"
    When switching views you have to remove already existing thumbs from memory and recreate new set with scenes/thumbs matching current view.
    Use editor to explore that thumbs you have in memory to have clear situation.

  • Thank you for your response.

    Could you be more specific, I'm not a great programmer and I am a beginner in Krpano...
    Can you please modify my code, it's for me and my work very important. I believe that this would help the other users.

    *smile* Thank Umalao

Participate now!

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