Side Menu Plugin (new plugin from today)

  • In the original-sidemenu.xml I only added the code I posted before. In my main.xml I included the showtext.xml and the sidemenu.xml
    But I noticed that it's not a problem of side menu as I put the logo-plugin in my main.xml and without loading the side menu it's the same problem. So I can't find my fault and will go on reading the forum posts *wink*

    mux

  • From other thread: https://krpano.com/forum/wbb/inde…59133#post59133

    ...What I would like to change is to get the sidemenu in other dimensions for mobile devices. Is this also possible in a way maybe to make two different <menu_settings> and defining one to only work on mobile devices or smartphones? I would like to start with a closed menu then and to cover the whole screen with the menu when opened, with larger buttons and fonts, and with always closing the menu after having pressed a button...
    or maybe I can use two different sidemenu.xml's, one for mobiles and one for desktops...?...

    This is how you can have device based settings:

    If you want bigger font for mobile devices than in action switch_menu add something like:

    If you want to start with closed menu you can add call to slide_menu_left action e.g.

    Code
    <action name="initiate_menu">
    .
    .		
    if(device.mobile,delayedcall(0,slide_menu_left();););	
    </action>

    If you want on mobile devices after click menu to close than adapt the code of the action switch_menu to something like:
    Instead of line:

    Code
    set(plugin[%menu_0].onclick,get(group[get(level)].group[get(object_0_html)].link));


    add something like:

  • Great! Thank You so much for that lots of informations! The more I get into krpano the more I notice how wonderful and easy it is ...
    Now there is only one more question left *wink*
    maybe you already looked at my example I'm working on since a couple of days:
    http://www.artesphera.de/pano/_vt/Kieler_Foerde/tour.html
    when I close the menu, there's a menu button left to click to open it again. When my daughter today was taking a look on the tour she intuitively tried to swipe the menu button to open it again. So I think it would be great to put that feature on the button. Is it possible to do this? I already read about a plugin but maybe in the meantime since 2012 there has been a change in krpano to make that easier? Because I think that the pano gallery bar which is part of the basic tour making, this gallery also works with a kind of swipe: I press on a thumb to open the pano and I swipe to move the thumbs in the bar...

    Thanks!

  • now it works and my daughter is nearly as happy as me *wink*
    There is only one problem left with sidemenu which I can't get. When the menu is closed the menubutton is two times at the same place, overlaying each other. they are not exactly of same size. I tried to make them identical with scale but a real solution would be to make the one button disappear instead of laying in background.

    Another thing: Umalo, the sidemenu is really a great plugin, I am really happy with it, thanks for your work and your support, I hope my donation is helping a little little bit to continue with your work *wink*
    What, for me, is still unsolved: I needed the sidemenu to be scrollable... or I needed the bottommenu to have more than one level...
    Especially if you're using a smartphone in landscape mode there is not much space left for the menu, e.g. in my case I have a logo and some buttons in the upper part of the menu, so there are only 4 menu items being visible.
    The bottommenu for me is not a solution as I need at least two levels or three.

    As I think that there are some more people having the same problems like me, maybe someone already made a scrollable verion out of this?
    Or umalo, maybe, you could develope a paid version or something...

  • ok, thanks, I sent You a privmail.
    I already was thinking about 3 levels but that would not be suitable for my project...hope you'll catch the error *thumbup*

  • Hi,

    I am making virtual tour with sidemenu without logo. When I remove this code for logo position, I need to move a sidemenu text more up. When I done it, I need change a position of button menu to the centre left of screen. But I do not know what I change in code. It looks like that button menu pozition is join with text pozition of sidemenu. When I am coding aling=left for button menu, a button menu is on left side of text and no on left side of screen. Can you help me? Thank you

    Martin

  • <menu_settings btn_menu_height="50" btn_menu_width="50" btn_back_upper_offset="-24" btn_back_left_offset="10" btn_back_rotate="180" btn_back_scale="1.3" btn_back_y="0" btn_back_x="0" x_scale="0.8" x_right_offset="16" line_transparency="0.4" line_height="1" line_upper_offset="11" arrow_upper_offset="11" arrow_right_offset="12" menu_0_onout_color_bcg="0x000000" menu_0_onover_color_bcg="0xab9862" menu_0_parent_y="0" menu_0_parent_x="0" menu_0_parent="menu_background" row_height="30" menu_0_text_y_step="30" menu_0_text_y_start="100" menu_0_text_x_start="0" menu_bgcolor="0xf4f4f4" menu_max_number_objects="20" menu_transparency="0.8" background_y="0" background_x="0" background_width="250"/>

    <plugin onloaded="set(width,get(menu_settings.background_width));set(bgalpha,get(menu_settings.menu_transparency));set(bgcolor,get(menu_settings.menu_bgcolor));set(x,get(menu_settings.background_x));set(y,get(menu_settings.background_y));" zorder="4" align="left" keep="true" name="menu_background" height="100%" type="container"/>

    <plugin onloaded=" set(x_x,get(menu_settings.background_width)); dec(x_x,get(menu_settings.x_right_offset)); set(x,get(x_x)); set(x_y,get(menu_settings.menu_0_text_y_start)); inc(x_y,get(menu_settings.arrow_upper_offset)); dec(x_y,get(menu_settings.row_height)); set(y,get(x_y)); set(scale,get(menu_settings.x_scale)); set(visible,true); set(plugin[submenu_x].onclick, switch_menu(0); slide_menu_left(); ); " zorder="10" align="topleft" visible="false" keep="true" url="%FIRSTXML%/gui_menu/x.png" name="submenu_x" parent="menu_background" edge="topleft"/>

    <plugin onloaded=" set(back_x,get(menu_settings.btn_back_x)); inc(back_x,get(menu_settings.btn_back_left_offset)); set(x,get(back_x)); set(back_y,get(menu_settings.menu_0_text_y_start)); dec(back_y,get(menu_settings.row_height)); dec(back_y,get(menu_settings.btn_back_upper_offset)); set(y,get(back_y)); set(scale,get(menu_settings.btn_back_scale)); set(rotate,get(menu_settings.btn_back_rotate)); set(plugin[submenu_back].onclick, switch_menu(0); ); " zorder="10" align="topleft" visible="false" keep="true" url="%FIRSTXML%/gui_menu/arrow.png" name="submenu_back" parent="menu_background" edge="topleft"/>

    <plugin onloaded=" set(height,get(menu_settings.btn_menu_height));set(back_x,get(menu_settings.btn_back_x));set(x,get(back_x));set(back_y,get(menu_settings.menu_0_text_y_start));set(y,get(back_y)); set(plugin[btn_menu].onclick, slide_menu_right(); ); " zorder="10" align="left" visible="false" keep="true" url="%FIRSTXML%/gui_menu/btn_menu.png" name="btn_menu" edge="left" width="prop"/>

  • no, sorry, was not that...

    I think the button-menu position is determined by the first position of the menu items. If You want to set it independently you can delete set(y,get(back_y)); in the btn_menu-plugin and instead set a simple y-value, like y="300" in the btn_menu-plugin.

    or, after deleting set(y...) don't give any y-value if you want the button in the middle, just change align="centerleft" and edge="bottomleft"

    Edited 2 times, last by Muxi (May 18, 2015 at 3:55 PM).

  • You are right. btn_menu as you can read from the code is depending on menu_settings.menu_0_text_y_start value.

    If you want this button to be centered find code where this plugin/layer is defined:

    Code
    <plugin name="btn_menu" url=


    There you will see the following commands in onloaded attribute:

    Code
    set(back_y,get(menu_settings.menu_0_text_y_start));set(y,get(back_y));


    Delete them as you don't want it to be set that way.

    And change first line of plugin to have aligment to center left and y=0:

    Code
    <plugin name="btn_menu" url="%FIRSTXML%/gui_menu/btn_menu.png" keep="true" align="leftcenter" edge="leftcenter" visible="false" zorder="10" y="0"

    Additionaly: Why your plugin attributes have changed usual places? (this is not error if all needed attributes are there, just asking)

Participate now!

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