Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
81051206
Commit
81051206
authored
14 years ago
by
Tofu Linden
Browse files
Options
Downloads
Plain Diff
merge storm-249
parents
704cdf2b
16a973fe
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
indra/newview/llsidepanelinventory.cpp
+43
-3
43 additions, 3 deletions
indra/newview/llsidepanelinventory.cpp
indra/newview/llsidepanelinventory.h
+2
-0
2 additions, 0 deletions
indra/newview/llsidepanelinventory.h
with
45 additions
and
3 deletions
indra/newview/llsidepanelinventory.cpp
+
43
−
3
View file @
81051206
...
@@ -182,8 +182,26 @@ void LLSidepanelInventory::performActionOnSelection(const std::string &action)
...
@@ -182,8 +182,26 @@ void LLSidepanelInventory::performActionOnSelection(const std::string &action)
void
LLSidepanelInventory
::
onWearButtonClicked
()
void
LLSidepanelInventory
::
onWearButtonClicked
()
{
{
performActionOnSelection
(
"wear"
);
LLPanelMainInventory
*
panel_main_inventory
=
mInventoryPanel
->
findChild
<
LLPanelMainInventory
>
(
"panel_main_inventory"
);
performActionOnSelection
(
"attach"
);
if
(
!
panel_main_inventory
)
{
llassert
(
panel_main_inventory
!=
NULL
);
return
;
}
// Get selected items set.
const
std
::
set
<
LLUUID
>
selected_uuids_set
=
panel_main_inventory
->
getActivePanel
()
->
getRootFolder
()
->
getSelectionList
();
if
(
selected_uuids_set
.
empty
())
return
;
// nothing selected
// Convert the set to a vector.
uuid_vec_t
selected_uuids_vec
;
for
(
std
::
set
<
LLUUID
>::
const_iterator
it
=
selected_uuids_set
.
begin
();
it
!=
selected_uuids_set
.
end
();
++
it
)
{
selected_uuids_vec
.
push_back
(
*
it
);
}
// Wear all selected items.
wear_multiple
(
selected_uuids_vec
,
true
);
}
}
void
LLSidepanelInventory
::
onPlayButtonClicked
()
void
LLSidepanelInventory
::
onPlayButtonClicked
()
...
@@ -286,7 +304,7 @@ void LLSidepanelInventory::updateVerbs()
...
@@ -286,7 +304,7 @@ void LLSidepanelInventory::updateVerbs()
case
LLInventoryType
::
IT_OBJECT
:
case
LLInventoryType
::
IT_OBJECT
:
case
LLInventoryType
::
IT_ATTACHMENT
:
case
LLInventoryType
::
IT_ATTACHMENT
:
mWearBtn
->
setVisible
(
TRUE
);
mWearBtn
->
setVisible
(
TRUE
);
mWearBtn
->
setEnabled
(
get_can_item_be_worn
(
item
->
getLinkedUUID
()
));
mWearBtn
->
setEnabled
(
canWearSelected
(
));
mShopBtn
->
setVisible
(
FALSE
);
mShopBtn
->
setVisible
(
FALSE
);
break
;
break
;
case
LLInventoryType
::
IT_SOUND
:
case
LLInventoryType
::
IT_SOUND
:
...
@@ -325,6 +343,28 @@ bool LLSidepanelInventory::canShare()
...
@@ -325,6 +343,28 @@ bool LLSidepanelInventory::canShare()
return
bridge
?
bridge
->
canShare
()
:
false
;
return
bridge
?
bridge
->
canShare
()
:
false
;
}
}
bool
LLSidepanelInventory
::
canWearSelected
()
{
LLPanelMainInventory
*
panel_main_inventory
=
mInventoryPanel
->
findChild
<
LLPanelMainInventory
>
(
"panel_main_inventory"
);
if
(
!
panel_main_inventory
)
{
llassert
(
panel_main_inventory
!=
NULL
);
return
false
;
}
std
::
set
<
LLUUID
>
selected_uuids
=
panel_main_inventory
->
getActivePanel
()
->
getRootFolder
()
->
getSelectionList
();
for
(
std
::
set
<
LLUUID
>::
const_iterator
it
=
selected_uuids
.
begin
();
it
!=
selected_uuids
.
end
();
++
it
)
{
if
(
!
get_can_item_be_worn
(
*
it
))
return
false
;
}
return
true
;
}
LLInventoryItem
*
LLSidepanelInventory
::
getSelectedItem
()
LLInventoryItem
*
LLSidepanelInventory
::
getSelectedItem
()
{
{
LLPanelMainInventory
*
panel_main_inventory
=
mInventoryPanel
->
findChild
<
LLPanelMainInventory
>
(
"panel_main_inventory"
);
LLPanelMainInventory
*
panel_main_inventory
=
mInventoryPanel
->
findChild
<
LLPanelMainInventory
>
(
"panel_main_inventory"
);
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llsidepanelinventory.h
+
2
−
0
View file @
81051206
...
@@ -65,6 +65,8 @@ class LLSidepanelInventory : public LLPanel
...
@@ -65,6 +65,8 @@ class LLSidepanelInventory : public LLPanel
void
performActionOnSelection
(
const
std
::
string
&
action
);
void
performActionOnSelection
(
const
std
::
string
&
action
);
void
updateVerbs
();
void
updateVerbs
();
bool
canWearSelected
();
// check whether selected items can be worn
//
//
// UI Elements
// UI Elements
//
//
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment