Bottom Menu Plugin

  • hello,

    I dwnloaded and used the plugin for my virtual tour but there's a problem with the menu icon.
    First the icon wasn't visible and then after i changed it to visible it was situated on the bottom right of my virtual tour but not in the krpano menu bar like it is showed in the example.
    Does anybody know how to get the icon in the krpano menu bar?
    i'll be very thankful because I am making this as an endproject for my fina lyear of IT.

    Thanks in advance.

  • Explore settings and menu parent attribute. If you are using krpano vtour skin than default settings is to be used. Orange button is there if you are not using vtourskin. Can you show me how meju button looks like...

    EDIT1: Additional info. If menu is correctly parented to skin_control_bar (in menu settings) and you are using vtourskin you can trigger menu up/down by any button your want, just add onclick="menu_toggle();"

    Example in package is just an way on how you can do that. See att.
    If you still have troubles send me your code (on my mail) to see where issue might come from.

    Edited once, last by Umalo (February 25, 2015 at 8:34 PM).

  • Explore settings and menu parent attribute. If you are using krpano vtour skin than default settings is to be used. Orange button is there if you are not using vtourskin. Can you show me how meju button looks like...

    EDIT1: Additional info. If menu is correctly parented to skin_control_bar (in menu settings) and you are using vtourskin you can trigger menu up/down by any button your want, just add onclick="menu_toggle();"

    Example in package is just an way on how you can do that. See att.
    If you still have troubles send me your code (on my mail) to see where issue might come from.

    thx for the help but i found the solution myself.
    I just copied the vtourskin.xml from the example and replaced it with mine and now the button is in my krpano bar, i probably oversaw the fact that you had to edit something in the vtourskin.xml or something like that.
    But thanks for the help anyway! *thumbsup*

  • Hi Umalo,

    Thanks for this useful plugin.

    I have one question, is that possible to fill the "item_text/linkedscene/execute=" automatically by coding ?

    The code i used is below.

    Code
    <group name="menu">	    set(scene_list,get(scene.name));		<group name="menu_item_1"  item_text="&#x00A0;• scene_list[0]		" 		linkedscene="scene_list[0]"  />

    I'm very new for this software, hope you can gave me some idea.

    Regards.

  • Yes. Find and adapt following code:

    Code
    for(set(menu_item_y,1), menu_item_y LE group[menu].group.count, inc(menu_item_y),
    sub(scene_number_loop,menu_item_y,1); <!-- This is new line -->
    Code
    <!-- copy(layer[%menu_0_out].linkedscene,group[menu].group[get(menu_item_2_change)].linkedscene); -->
    copy(layer[%menu_0_out].linkedscene,scene[get(scene_number_loop)].name);<!-- Coment upper line and add this new line -->
    Code
    <!-- txtadd(new_html,get(group[menu].group[get(menu_item_2_change)].item_text));	-->
    <!-- set(layer[%menu_0_item].html,get(new_html)); set(new_html,''); -->			
    <!-- copy(layer[%menu_0_item].html,group[menu].group[get(menu_item_2_change)].item_text); -->			
    copy(layer[%menu_0_item].html,scene[get(scene_number_loop)].title);<!-- Coment upper 3 lines and add this new line -->


    Take care to have same name of group elements as you have scenes, and that each scene have title you want to be on menu

  • Thanks for your answer, it's work.

    On the other hand, I also adapted the code (from kealkeal) to change the items to hotspots.
    It can load scene and look to hotspot I want to show.

    Quote

    <group name="menu_item_1" item_text="&#x00A0;• #Menu item #01 " execute="loadscene(pano9);looktohotspot(spotpoint32);" />

    Now, I try to fill "execute=laodscene();looktohotspot()" automatically, but it doesn't work.
    Can you give some hint for coding, please.

    Thank you very much.
    Regards.

  • Sorry again, I got another problem.

    I successfully listed the hotspot's name automatically, but the result only shown 5 hotspots in the first scene.

    How can I list all of them in scene_1, scene_2,... ?

    And I am curious about the relationship between hotspot and scene in coding,for example, how can I know the hotspot is belong to which scene?

    Thank you.

    Karen.

  • confused *huh* We were trying to list all scene titles in the menu as menu items. Now you are talking about hotspots? I think you want to say menu elements right? Best would be for you to contact me via mail as now I don't know how exactly your code looks like so I can't assist you like that.

    For your second question about relation of hotspots and scene:
    - hotspots are elements that can belong to specific scene (if defined inside scene tags)
    - hotspots if attribute keep="true" is set, than this hotspots will remain in memory when new scene is loaded
    This can be override by specific loadsceene parameter https://krpano.com/docu/actions/#loadscene but if you are using "default" MERGE than it behave as I listed above.

  • Not sure I understand how to customize the menu.
    I want to have menu items that are NOT linked scenes, I need menu items that perform onclick events such as, switch layer visibility, or open up a photo gallery. I am doing this now with custom buttons, but it would be nice to replace the buttons with the menu system.

    I read this forum, and you have lots of examples, but could you please give a short example of onclick="switch(layer[my_layer].visible);"

    On this sample tour, I have 6 custom buttons on the left. I would like to replace them with the menu system.
    http://www.sightagent.com/steelstacks

    Thank you!

    v

    UPDATE:
    I copied the example you gave for showlog true/false (above), and it works. Now I'll have to create new actions to switch layer visibility, launch photo gallery, etc. to replace the showlog action.
    I think my confusion came from not understanding the new line 166. I know it's substituting an action for a linkedscene, but I can't understand how it works. I will probably never understand it, cause I'm not a coder, just a newbie, and 64 years old too.
    Thanks.

    Edited once, last by VinzVideo (August 20, 2015 at 8:49 PM).

  • oh, glad people are using my plugin. Good you have progress, if I can help let me know. You must be overseeing that:
    With this update we are using custom attribute "execute" (could be any other name but I choose this to associate with something being executed like your own action of what ever you like) which is actualy container of the action you want to perform (now we can have this attribute in menu group definition) and with this onclick it actually execute what ever is stored on this menu item attribute.

  • OK, more success, and a problem!

    I got my first menu item to switch visibility on a layer...works great.
    However, the menu does not auto-close, it remains open. I need it to auto close. Actually, auto-close does not work for the showlog examples you provided either. But it does work for the items that have linkedscenes.

    What should I do now?

    v

    UPDATE:
    OK, got it. Have to add another "menu_close();" after the execute attribute.
    (Yes, I do know that "execute" is an attribute, not an action. Thanks.)

  • try adding menu close after exectute:

    Code
    execute(); menu_close();


    As onclick="if(linkedscene,loadscene(get(linkedscene),null,MERGE,BLEND(1)); wait(0); menu_close();,execute(); );"

    is actualy asking if there is linked scene than it loads it and close the menu, otherwise it starts execute attribute where you are missing close menu if you want it. If you want to close menu only on some menu items and not all than include menu_close(); in list of your execute attribute when defining menu elements.

  • This was already addressed, but I can't find the right place.....

    to change the position of the menu. Another post said it was an align tag, unfortunately, there are many many align tags.
    Can you say which one it is?

    Thanks.

Participate now!

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