UIDrawable overwriting - search and replace by name #40
Labels
No labels
Alpha Release Requirement
Bugfix
Demo Target
Documentation
Major Feature
Minor Feature
priority:tier1-active
priority:tier2-foundation
priority:tier3-future
priority:tier4-deferred
Refactoring & Cleanup
system:animation
system:documentation
system:grid
system:input
system:performance
system:procgen
system:python-binding
system:rendering
system:ui-hierarchy
Tiny Feature
workflow:blocked
workflow:needs-benchmark
workflow:needs-documentation
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
john/McRogueFace#40
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
57 feat: "only_one=True" optional arg to
__init__and.renamemethods to overwrite an existing Drawable/Entity that would have the same nameSee #39
I lack complete clarity on the proper scope of "only_one" - do we have to search from the root down every window, every scene, every nested child element? More likely, I think it should be on the scope of where you place it, for exactly that level (peers on the same Frame or Grid, basically)
Should a "only_one" bool be stored? Can UIDrawables be moved the same way entities are expected to be able to go from grid to grid?
.findon a collection #41implemented in
d11f76ac43- needs testsSuperseded by Issue #41
The original "only_one=True" concept from this issue has been addressed differently:
Instead of an
only_oneparameter on__init__, we now have a.find()method that allows searching by name. This provides a cleaner API:The
.find()method addresses the core need (finding elements by name) without the complexity of automatic overwriting semantics.See #41 for the full implementation details.