Combine commonly created scroll list menus into single menus identified by menu_num instead of their menu_file
sScrollListMenus is an array such that it will hold more menus in the future, such as groups. fmenu_file still exists and will still exhibit its old behavior if used.
This commit is contained in:
@@ -57,6 +57,8 @@
|
||||
|
||||
static LLRegisterWidget<LLScrollListCtrl> r("scroll_list");
|
||||
|
||||
LLMenuGL* sScrollListMenus[1] = {}; // List menus that recur, such as general avatars or groups menus
|
||||
|
||||
// local structures & classes.
|
||||
struct SortScrollListItem
|
||||
{
|
||||
@@ -2552,7 +2554,15 @@ void LLScrollListCtrl::setScrollListParameters(LLXMLNodePtr node)
|
||||
node->getAttribute_bool("mouse_wheel_opaque", mMouseWheelOpaque);
|
||||
}
|
||||
|
||||
if (node->hasAttribute("menu_file"))
|
||||
if (node->hasAttribute("menu_num"))
|
||||
{
|
||||
// Some scroll lists use common menus identified by number
|
||||
// 0 is menu_avs_list.xml, 1 will be for groups, 2 could be for lists of objects
|
||||
S32 menu_num;
|
||||
node->getAttributeS32("menu_num", menu_num);
|
||||
mPopupMenu = sScrollListMenus[menu_num];
|
||||
}
|
||||
else if (node->hasAttribute("menu_file"))
|
||||
{
|
||||
std::string menu_file;
|
||||
node->getAttributeString("menu_file", menu_file);
|
||||
|
||||
@@ -239,6 +239,7 @@ extern BOOL gDebugTextEditorTips;
|
||||
extern BOOL gShowOverlayTitle;
|
||||
extern BOOL gOcclusionCull;
|
||||
extern AIHTTPView* gHttpView;
|
||||
extern LLMenuGL* sScrollListMenus[1];
|
||||
//
|
||||
// Globals
|
||||
//
|
||||
@@ -781,6 +782,10 @@ void init_menus()
|
||||
|
||||
gMenuHolder->addChild(gLoginMenuBarView);
|
||||
|
||||
// Singu Note: Initialize common ScrollListMenus here
|
||||
sScrollListMenus[0] = LLUICtrlFactory::getInstance()->buildMenu("menu_avs_list.xml", gMenuHolder);
|
||||
//sScrollListMenus[1] = LLUICtrlFactory::getInstance()->buildMenu("menu_groups_list.xml"); // Singu TODO
|
||||
|
||||
LLView* ins = gMenuBarView->getChildView("insert_world", true, false);
|
||||
ins->setVisible(false);
|
||||
ins = gMenuBarView->getChildView("insert_agent", true, false);
|
||||
|
||||
@@ -1383,7 +1383,7 @@ Select the thumbnail to choose a different texture.
|
||||
column_padding="0" draw_border="true" draw_heading="false" enabled="true"
|
||||
follows="top|bottom" heading_font="SansSerifSmall" heading_height="14"
|
||||
height="80" left="20" mouse_opaque="true" multi_select="true"
|
||||
name="AccessList" tool_tip="([LISTED] listed, [MAX] max)" width="195" menu_file="menu_avs_list.xml"/>
|
||||
name="AccessList" tool_tip="([LISTED] listed, [MAX] max)" width="195" menu_num="0"/>
|
||||
<button bottom_delta="-20" enabled="true" follows="bottom" font="SansSerifSmall"
|
||||
halign="center" height="16" label="Add..." label_selected="Add..."
|
||||
left_delta="5" mouse_opaque="true" name="add_allowed" scale_image="true"
|
||||
@@ -1403,7 +1403,7 @@ Select the thumbnail to choose a different texture.
|
||||
follows="top|bottom" heading_font="SansSerifSmall"
|
||||
heading_height="14" height="80" left_delta="0" mouse_opaque="true"
|
||||
multi_select="true" name="BannedList"
|
||||
tool_tip="([LISTED] listed, [MAX] max)" width="195" menu_file="menu_avs_list.xml"/>
|
||||
tool_tip="([LISTED] listed, [MAX] max)" width="195" menu_num="0"/>
|
||||
<button bottom_delta="-20" enabled="true" follows="bottom" font="SansSerifSmall"
|
||||
halign="center" height="16" label="Add..." label_selected="Add..."
|
||||
left_delta="5" mouse_opaque="true" name="add_banned" scale_image="true"
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<layout_panel mouse_opaque="false" auto_resize="true" user_resize="false" name="active_speakers_panel" height="232">
|
||||
<scroll_list bottom="25" top="232" left="0" right="-1"
|
||||
draw_stripes="false" follows="all" can_resize="true" column_padding="0" draw_heading="true"
|
||||
multi_select="false" name="speakers_list" search_column="1" sort_column="2" menu_file="menu_avs_list.xml">
|
||||
multi_select="false" name="speakers_list" search_column="1" sort_column="2" menu_num="0">
|
||||
<column name="icon_speaking_status" sort="speaking_status" width="20" />
|
||||
<column dynamicwidth="true" label="Name" name="speaker_name" />
|
||||
<column label="" name="speaking_status" width="0" />
|
||||
|
||||
@@ -612,7 +612,7 @@ To buy direct, visit the land and click on the place name in the title bar.
|
||||
label="Search" label_selected="Search" left="121" mouse_opaque="true"
|
||||
name="Search" width="95" />
|
||||
<scroll_list background_visible="true" bottom="-510" column_padding="0" draw_border="true"
|
||||
draw_heading="true" menu_file="menu_avs_list.xml"
|
||||
draw_heading="true" menu_num="0"
|
||||
|
||||
follows="left|top|right|bottom" height="450" left="4" mouse_opaque="true"
|
||||
multi_select="false" name="results" search_column="2" width="326">
|
||||
|
||||
@@ -548,7 +548,7 @@ To buy direct, visit the land and click on the place name in the title bar.
|
||||
label="Search" label_selected="Search" left="121" mouse_opaque="true"
|
||||
name="Search" width="95" />
|
||||
<scroll_list background_visible="true" bottom="-510" column_padding="0" draw_border="true"
|
||||
draw_heading="true" menu_file="menu_avs_list.xml"
|
||||
draw_heading="true" menu_num="0"
|
||||
|
||||
follows="left|top|right|bottom" height="450" left="4" mouse_opaque="true"
|
||||
multi_select="false" name="results" search_column="2" width="326">
|
||||
|
||||
@@ -671,7 +671,7 @@ To buy direct, visit the land and click on the place name in the title bar.
|
||||
label="Search" label_selected="Search" left="121" mouse_opaque="true"
|
||||
name="Search" width="95" />
|
||||
<scroll_list background_visible="true" bottom="-510" column_padding="0" draw_border="true"
|
||||
draw_heading="true" menu_file="menu_avs_list.xml"
|
||||
draw_heading="true" menu_num="0"
|
||||
|
||||
follows="left|top|right|bottom" height="450" left="4" mouse_opaque="true"
|
||||
multi_select="false" name="results" search_column="2" width="326">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<panel border="true" name="friends">
|
||||
<string name="Multiple">Multiple friends...</string>
|
||||
<scroll_list bottom="10" can_resize="true" column_padding="0" draw_heading="true" follows="left|top|bottom|right" left="10" multi_select="true"
|
||||
name="friend_list" right="-100" search_column="1" tool_tip="Hold shift or control while clicking to select multiple friends" top="-40" menu_file="menu_avs_list.xml">
|
||||
name="friend_list" right="-100" search_column="1" tool_tip="Hold shift or control while clicking to select multiple friends" top="-40" menu_num="0">
|
||||
<column image="ff_online_status_button.tga" name="icon_online_status" tool_tip="Online status" width="20"/>
|
||||
<column dynamicwidth="true" label="Name" name="friend_name" tool_tip="Name"/>
|
||||
<column image="ff_visible_online_button.tga" name="icon_visible_online" tool_tip="Friend can see when you're online" width="20"/>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<panel border="true" name="friends">
|
||||
<string name="Multiple">Multiple friends...</string>
|
||||
<scroll_list bottom="70" can_resize="true" column_padding="0" draw_heading="true" follows="left|top|bottom|right" left="5" multi_select="true"
|
||||
name="friend_list" right="-5" search_column="1" tool_tip="Hold shift or control while clicking to select multiple friends" top="-40" menu_file="menu_avs_list.xml">
|
||||
name="friend_list" right="-5" search_column="1" tool_tip="Hold shift or control while clicking to select multiple friends" top="-40" menu_num="0">
|
||||
<column image="ff_online_status_button.tga" name="icon_online_status" tool_tip="Online status" width="20"/>
|
||||
<column dynamicwidth="true" label="Name" name="friend_name" tool_tip="Name"/>
|
||||
<column image="ff_visible_online_button.tga" name="icon_visible_online" tool_tip="Friend can see when you're online" width="20"/>
|
||||
|
||||
@@ -76,7 +76,7 @@ Hover your mouse over the options for more help.
|
||||
<name_list allow_calling_card_drop="false" background_visible="true" bottom_delta="-88"
|
||||
column_padding="0" draw_border="true" draw_heading="true" multi_select="true"
|
||||
follows="left|top" heading_font="SansSerifSmall" heading_height="14"
|
||||
height="80" left="7" mouse_opaque="true" menu_file="menu_avs_list.xml"
|
||||
height="80" left="7" mouse_opaque="true" menu_num="0"
|
||||
name="visible_members" width="404">
|
||||
<column label="Member Name" name="name" relwidth="0.45" />
|
||||
<column label="Title" name="title" relwidth="0.30" />
|
||||
|
||||
@@ -72,7 +72,7 @@ execute the Ability.
|
||||
label="Search" left_delta="105" name="search_button" width="60" />
|
||||
<name_list allow_calling_card_drop="false" background_visible="true" bottom_delta="-121"
|
||||
column_padding="0" draw_border="true" draw_heading="true"
|
||||
heading_font="SansSerifSmall" menu_file="menu_avs_list.xml"
|
||||
heading_font="SansSerifSmall" menu_num="0"
|
||||
heading_height="14" height="120" left="4" multi_select="true"
|
||||
name="member_list" width="396">
|
||||
<column label="Member Name" name="name" width="136" />
|
||||
@@ -222,7 +222,7 @@ things in this group. There's a broad variety of Abilities.
|
||||
</text>
|
||||
<name_list bottom_delta="-105" draw_border="true" draw_stripes="false" enabled="false"
|
||||
height="105" left="0" multi_select="true" name="role_assigned_members"
|
||||
width="145" menu_file="menu_avs_list.xml"/>
|
||||
width="145" menu_num="0"/>
|
||||
<check_box bottom_delta="-20" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Members are visible" left="0"
|
||||
mouse_opaque="true" name="role_visible_in_list" radio_style="false"
|
||||
@@ -263,6 +263,6 @@ things in this group. There's a broad variety of Abilities.
|
||||
<name_list background_opaque="true" background_visible="true" bg_alpha_color="blue"
|
||||
bg_opaque_color="grey" bottom_delta="0" draw_border="true"
|
||||
height="125" left="150" multi_select="true" name="action_members"
|
||||
width="254" menu_file="menu_avs_list.xml"/>
|
||||
width="254" menu_num="0"/>
|
||||
</panel>
|
||||
</panel>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</combo_box>
|
||||
</layout_panel>
|
||||
<layout_panel auto_resize="true" bottom="0" can_resize="false" height="120" min_height="100" name="moderate_chat_panel" top_delta="0" user_resize="false" visible="true" width="140">
|
||||
<scroll_list bottom="78" can_resize="false" column_padding="0" draw_heading="true" draw_stripes="false" follows="left|top|bottom|right" left="0" multi_select="false" name="speakers_list" right="140" search_column="1" sort_column="2" top="113" menu_file="menu_avs_list.xml">
|
||||
<scroll_list bottom="78" can_resize="false" column_padding="0" draw_heading="true" draw_stripes="false" follows="left|top|bottom|right" left="0" multi_select="false" name="speakers_list" right="140" search_column="1" sort_column="2" top="113" menu_num="0">
|
||||
<column name="icon_speaking_status" sort="speaking_status" width="20"/>
|
||||
<column dynamicwidth="true" label="Name" name="speaker_name"/>
|
||||
<column label="" name="speaking_status" width="0"/>
|
||||
|
||||
Reference in New Issue
Block a user