Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FutureTech Shared
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MOVES
FutureTech Shared
Commits
dd0be219
Commit
dd0be219
authored
3 years ago
by
Heine, Eric R
Browse files
Options
Downloads
Patches
Plain Diff
Added a virtual function to do any cleanup necessary when an item is removed from a DynamicList.
parent
be83bbb6
No related branches found
No related tags found
1 merge request
!7
Merge Request for Issue/13 - dynamic list item removed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Sane Eric's UI/DynamicList.cs
+6
-1
6 additions, 1 deletion
Sane Eric's UI/DynamicList.cs
with
6 additions
and
1 deletion
Sane Eric's UI/DynamicList.cs
+
6
−
1
View file @
dd0be219
...
...
@@ -48,6 +48,7 @@ namespace Shared.SEUI {
// Remove the given item from the list (if it is in the list)
public
void
RemoveItem
(
TValueType
item
)
{
if
(
listItems
.
ContainsKey
(
item
))
{
OnItemRemoved
(
item
,
listItems
[
item
]);
Destroy
(
listItems
[
item
].
gameObject
);
listItems
.
Remove
(
item
);
}
...
...
@@ -55,6 +56,10 @@ namespace Shared.SEUI {
// --------------------------------------------------------------------------
// Implement if the list needs to do something to the DynamicListItem after it has been added to the list
protected
virtual
void
OnItemAdded
(
TValueType
item
,
TDynamicListItem
itemUI
)
{
}
protected
virtual
void
OnItemAdded
(
TValueType
item
,
TDynamicListItem
itemUI
)
{}
// --------------------------------------------------------------------------
// Implement if the list needs to do something to the DynamicListItem after it has been removed from the list
protected
virtual
void
OnItemRemoved
(
TValueType
item
,
TDynamicListItem
itemUI
)
{}
}
}
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