add "return to initial thumbnail" button on button bar

  • Is there a way to add an additional button to the default skin button bar? I would like to add a button that returns the viewer to the initial scene in the project. If this can be done, is there a generic .png button file in one of the templates that is supplied by Klaus or would I have to create something. If so, where should that button file reside!

    Thanks in advance, Reggie

  • open skin/vtourskin.xml and add your button as new layer to layer defaultskin_buttons which is container.
    If you will use default style defaultskin_button than you can see that all button images are cropped out of skin/vtourskin.png

    You can make your own png and e.g. define your style where url will lead to your png.

  • In skin/vtourskin.xml I see a series of button layers that start with "skin_control_bar" Separately, when I look at the buttons.png container in the XML library, there is an "autorotate" button on that strip that does not appear skin/vtourskin.xml for my project. Could I use that "crop?" as my button? If so, what would the "onclick" command be to reset back to the initial thumbnail? Thank you for taking your time to reply.

    Reggie *confused*

  • In first post you stated that you want this new button to returns the viewer to the initial scene in the project and now to do something with the thumbs. Can't follow but you can add onclick attribute to your new button to do what ever you want.

  • Yes, I meant that I want a button to return the viewer to the initial scene in the project. Am I able to crop in that unused "autorotate" button for this purpose? If so, what is the "onclick" command that I need to use to return to the initial scene. Thank you again for your kind response!

    Reggie

  • Without the code I can't tell more than assume you are using basic startup, so something like:

    Code
    onclick="
    		if(startscene === null, copy(startscene,scene[0].name));
    		loadscene(get(startscene), null, MERGE);
    
    
    "

    or if you load some other scene at statup than adapt the code accordingly.

  • Umalo, thank you so much. Used the code below to crop a button out of the existing vtourskin.png. It works flawlessly! *w00t*

    <layer name="skin_btn_back" style="skin_base|skin_glow" crop="64|450|64|64" align="bottom" x="180" y="4" scale="0.5" onclick="if(startscene === null, copy(startscene,scene[0].lake red rock map));
    loadscene(get(startscene), null, MERGE);" />

  • Hm, can't follow what you mean. I see some errors in the log. Fix them first. Maybe they are making code go crazy ;)
    I see that thumb is correctly assigned when you click on new button (loading first scene)
    If it is easier for you send me some screen capture and markings via mail

  • Hmmm. This morning I looked again and the thumbnail does revert to the corresponding initial scene - like you say. I don't know what you mean by "errors in the log." I have noticed that Firefox will not refresh using the F5 key and I have had to manually delete recent history in order to see changes. I shut the machine off last night and when I woke up, the problem didn't exist! Thanks as always for your kind response!

  • Click on tour, Press "O" button and see the log:
    WARNING: unknown action: timer.start WARNING: unknown action: autotour.reset WARNING: unknown action: autotour.pause WARNING: unknown action: autotour.reset

    You can trigger it to open via actions with: showlog(true);

    Yes, cleaning the cache is also what I do when I don't see the changes I expect to see in the code. Chrome= CTRL+SHFT+DEL than Clean browsing data -> magic shortcuts

  • Ahhh,

    Thanks again Umalo for teaching me. My customer wants me to have some of the scenes immediately "dissolve" as she terms it, into the successive scene. I went looking through the forum to see if there were any "transition" options and the only one I found was some code for an autotour "timer" posted by Sachagriffin. I wasn't able to make it work. My thinking is to establish the autotour timer at 30 seconds per scene and then reduce that to 2 or 3 seconds only for "dissolve" scenes. I forgot to remove that code. Do you know if this is a good solution if I could figure out how to do it? Alternatively, is there any way to effect a fast "dissolve" only for specific scenes w/o setting the autotour up for the entire project? Many thanks in advance for your advice!

    Reggie

  • w/o the code I can't say much more. If you want to skipp some scenes in the autotour this can be done in several ways. Don't know what autotour code you use but e.g. you can make new attribute in scene
    <scene name="scene_xy" ... ... autotourskip="true" /> and than in the code before loading next tour make check if this attribute is set to true and than skip it or make timer run shorter...

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!