Fix distinguishing BUTTON by submenu

When the same BUTTON appears in different submenus, with different parameters, pressing it always picked the one that appeared first in the notecard.

Fix that by making the search start at the current menu.

Per bug report by AceyXx.
This commit is contained in:
Sei Lisa 2018-01-22 11:35:43 +01:00 committed by Sei-Lisa
parent e4064605a1
commit a65d7cdc82

View file

@ -265,7 +265,8 @@ default
animation_menu(0);
return;
}
index = llListFindList(MENU_LIST, ["B:" + msg]);
index = llListFindList(llList2List(MENU_LIST, current_menu, 99999), ["B:" + msg]);
if (index != -1) index += current_menu;
if (index != -1)
{
list button_data = llParseStringKeepNulls(llList2String(DATA_LIST, index), [SEP], []);