aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authoronefang2019-07-02 01:44:02 +1000
committeronefang2019-07-02 01:44:02 +1000
commit7cd1685d68c6ab1aaf544e868a0e8af6dfe92bfd (patch)
treee54b7df4cde83d55951b00a292b1823832de8eff
parentRemove menu listener when disabling menu. (diff)
download1ring-7cd1685d68c6ab1aaf544e868a0e8af6dfe92bfd.zip
1ring-7cd1685d68c6ab1aaf544e868a0e8af6dfe92bfd.tar.gz
1ring-7cd1685d68c6ab1aaf544e868a0e8af6dfe92bfd.tar.bz2
1ring-7cd1685d68c6ab1aaf544e868a0e8af6dfe92bfd.tar.xz
Show valid menu items in the scrolly text, coz some might be too long to show in the buttons.
-rw-r--r--1chatter.lsl21
1 files changed, 20 insertions, 1 deletions
diff --git a/1chatter.lsl b/1chatter.lsl
index 90b5cdb..9e38390 100644
--- a/1chatter.lsl
+++ b/1chatter.lsl
@@ -719,6 +719,20 @@ lastMenu(key id, string r)
719 if ("" != r) removeMenu(r); 719 if ("" != r) removeMenu(r);
720} 720}
721 721
722dumpMenuUsers(list menus)
723{
724 integer l = llGetListLength(menus);
725 integer i;
726 for (i = 0; i < l; i += uSTRIDE)
727 {
728 s(
729 llList2String(menus, i + uKEY) + "~" +
730 llList2String(menus, i + uTIME) + "~" +
731 llList2String(menus, i + uCURRENT)
732 );
733 }
734}
735
722dumpMenus(list menus) 736dumpMenus(list menus)
723{ 737{
724 integer l = llGetListLength(menus); 738 integer l = llGetListLength(menus);
@@ -764,7 +778,7 @@ showMenu(key id)
764 string version = getSetting(fr + "VERSION"); 778 string version = getSetting(fr + "VERSION");
765 list entries = llParseStringKeepNulls(llList2String(Menus, m + mENTRIES), ["|"], []); 779 list entries = llParseStringKeepNulls(llList2String(Menus, m + mENTRIES), ["|"], []);
766 list cmds = llParseStringKeepNulls(llList2String(Menus, m + mCMDS), ["|"], []); 780 list cmds = llParseStringKeepNulls(llList2String(Menus, m + mCMDS), ["|"], []);
767 string title = llList2String(Menus, m + mTITLE); 781 string title = llList2String(Menus, m + mTITLE) + "\n\n--------\n";
768 782
769 if (access(id, menu + " menu", fr, llList2Integer(Menus, m + mAUTH), TRUE)) 783 if (access(id, menu + " menu", fr, llList2Integer(Menus, m + mAUTH), TRUE))
770 { 784 {
@@ -776,6 +790,7 @@ showMenu(key id)
776 for (; n < l; ++n) 790 for (; n < l; ++n)
777 { 791 {
778 string button = llGetSubString(llList2String(entries, n), 0, 23); 792 string button = llGetSubString(llList2String(entries, n), 0, 23);
793 title += button + "\n";
779 entries = llListReplaceList(entries, [button], n, n); 794 entries = llListReplaceList(entries, [button], n, n);
780 } 795 }
781 n = l; 796 n = l;
@@ -802,8 +817,10 @@ showMenu(key id)
802 t = upsideDown(last + button); 817 t = upsideDown(last + button);
803 else if (!access(id, t, fr, llList2Integer(Menus, o + mAUTH), FALSE)) 818 else if (!access(id, t, fr, llList2Integer(Menus, o + mAUTH), FALSE))
804 t = enclosed(button + last); 819 t = enclosed(button + last);
820 else title += t + "\n";
805 entries = llListReplaceList(entries, [t], n, n); 821 entries = llListReplaceList(entries, [t], n, n);
806 } 822 }
823 else title += t + "\n";
807 } 824 }
808 else if (("☐" == first) || ("▣" == first) || ("○" == first) || ("◉" == first)) 825 else if (("☐" == first) || ("▣" == first) || ("○" == first) || ("◉" == first))
809 { 826 {
@@ -815,6 +832,7 @@ showMenu(key id)
815 t = upsideDown(button + " " + llGetSubString(t, 0, 0)); 832 t = upsideDown(button + " " + llGetSubString(t, 0, 0));
816 else if (!access(id, t, fr, llList2Integer(Settings, o + sAUTH), FALSE)) 833 else if (!access(id, t, fr, llList2Integer(Settings, o + sAUTH), FALSE))
817 t = enclosed(t); 834 t = enclosed(t);
835 else title += t + "\n";
818 entries = llListReplaceList(entries, [t], n, n); 836 entries = llListReplaceList(entries, [t], n, n);
819 } 837 }
820 else 838 else
@@ -836,6 +854,7 @@ showMenu(key id)
836 t = upsideDown(t); 854 t = upsideDown(t);
837 else if (!access(id, c, frr, llList2Integer(Commands, o + cAUTH), FALSE)) 855 else if (!access(id, c, frr, llList2Integer(Commands, o + cAUTH), FALSE))
838 t = enclosed(t); 856 t = enclosed(t);
857 else title += t + "\n";
839 entries = llListReplaceList(entries, [t], n, n); 858 entries = llListReplaceList(entries, [t], n, n);
840 } 859 }
841 } 860 }