Introduce rudimentary objects list menu for Area Search
Enables multiselect in areasearch
This commit is contained in:
@@ -80,13 +80,21 @@ BOOL JCFloaterAreaSearch::postBuild()
|
||||
mResultList = getChild<LLScrollListCtrl>("result_list");
|
||||
mResultList->setDoubleClickCallback(boost::bind(&JCFloaterAreaSearch::onDoubleClick,this));
|
||||
mResultList->sortByColumn("Name", TRUE);
|
||||
auto tp = getChild<LLButton>("TP");
|
||||
auto look = getChild<LLButton>("Look");
|
||||
mResultList->setCommitOnSelectionChange(true);
|
||||
mResultList->setCommitCallback([=](LLUICtrl* ctrl, const LLSD& param){
|
||||
bool enabled = mResultList->getNumSelected() == 1;
|
||||
tp->setEnabled(enabled);
|
||||
look->setEnabled(enabled);
|
||||
});
|
||||
|
||||
mCounterText = getChild<LLTextBox>("counter");
|
||||
|
||||
getChild<LLButton>("Refresh")->setClickedCallback(boost::bind(&JCFloaterAreaSearch::onRefresh,this));
|
||||
getChild<LLButton>("Stop")->setClickedCallback(boost::bind(&JCFloaterAreaSearch::onStop,this));
|
||||
getChild<LLButton>("TP")->setClickedCallback(boost::bind(&JCFloaterAreaSearch::teleportToSelected, this));
|
||||
getChild<LLButton>("Look")->setClickedCallback(boost::bind(&JCFloaterAreaSearch::lookAtSelected, this));
|
||||
tp->setClickedCallback(boost::bind(&JCFloaterAreaSearch::teleportToSelected, this));
|
||||
look->setClickedCallback(boost::bind(&JCFloaterAreaSearch::lookAtSelected, this));
|
||||
|
||||
getChild<LLFilterEditor>("Name query chunk")->setCommitCallback(boost::bind(&JCFloaterAreaSearch::onCommitLine,this,_1,_2,LIST_OBJECT_NAME));
|
||||
getChild<LLFilterEditor>("Description query chunk")->setCommitCallback(boost::bind(&JCFloaterAreaSearch::onCommitLine,this,_1,_2,LIST_OBJECT_DESC));
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<scroll_list name="result_list"
|
||||
left="10" right="-10" top="-103" bottom="32"
|
||||
follows="left|top|bottom|right" can_resize="true"
|
||||
column_padding="0" draw_heading="true" multi_select="false" search_column="1">
|
||||
column_padding="0" draw_heading="true" multi_select="true" search_column="1" menu_num="2">
|
||||
<column name="Name" label="Name" dynamicwidth="true" tool_tip="Double click on any entry to get a position beacon"/>
|
||||
<column name="Description" label="Description" dynamicwidth="true" tool_tip="Double click on any entry to get a position beacon"/>
|
||||
<column name="Owner" label="Owner" dynamicwidth="true" tool_tip="Double click on any entry to get a position beacon"/>
|
||||
|
||||
32
indra/newview/skins/default/xui/en-us/menu_objects_list.xml
Normal file
32
indra/newview/skins/default/xui/en-us/menu_objects_list.xml
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<context_menu label="Objects" name="Objects">
|
||||
<menu_item_call label="Cam To" name="Cam To">
|
||||
<on_click function="List.Object.CamTo"/>
|
||||
<on_visible function="List.EnableSingleSelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Follow" name="Follow">
|
||||
<on_click function="List.Follow"/>
|
||||
<on_visible function="List.EnableSingleSelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Move To" name="Move To">
|
||||
<on_click function="List.GoTo"/>
|
||||
<on_visible function="List.EnableSingleSelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Teleport To" name="Teleport To">
|
||||
<on_click function="List.TeleportTo"/>
|
||||
<on_visible function="List.EnableSingleSelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_separator/>
|
||||
<menu_item_call label="Copy Key" name="Copy Key">
|
||||
<on_click function="List.CopyUUIDs"/>
|
||||
<on_enable function="List.EnableAnySelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Copy Name" name="Copy Name">
|
||||
<on_click function="List.CopyNames"/>
|
||||
<on_enable function="List.EnableAnySelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Copy SLURL" name="Copy SLURL">
|
||||
<on_click function="List.CopySLURL"/>
|
||||
<on_visible function="List.EnableSingleSelected"/>
|
||||
</menu_item_call>
|
||||
</menu>
|
||||
Reference in New Issue
Block a user