feat: implement name system for finding UI elements (#39/40/41)
- Add 'name' property to UIDrawable base class - All UI elements (Frame, Caption, Sprite, Grid, Entity) support .name - Entity delegates name to its sprite member - Add find(name, scene=None) function for exact match search - Add findAll(pattern, scene=None) with wildcard support (* matches any sequence) - Both functions search recursively through Frame children and Grid entities - Comprehensive test coverage for all functionality This provides a simple way to find UI elements by name in Python scripts, supporting both exact matches and wildcard patterns. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
97067a104e
commit
edfe3ba184
13 changed files with 557 additions and 6 deletions
11
ROADMAP.md
11
ROADMAP.md
|
|
@ -166,13 +166,12 @@ Rendering Layer:
|
|||
### Phase 4: Visibility & Performance (1-2 weeks)
|
||||
**Goal**: Only render/process what's needed
|
||||
```
|
||||
1. #10 - Full visibility system with AABB
|
||||
- bool visible() - False if outside view or hidden
|
||||
- bool hidden - internal visibility toggle
|
||||
- AABB() considers parent offsets recursively
|
||||
- Non-visible elements can't be clicked
|
||||
1. #10 - [UNSCHEDULED] Full visibility system with AABB
|
||||
- Postponed: UIDrawables can exist in multiple collections
|
||||
- Cannot reliably determine screen position due to multiple render contexts
|
||||
- Needs architectural solution for parent-child relationships
|
||||
|
||||
2. #52 - Grid culling (if not done in Phase 2)
|
||||
2. #52 - Grid culling (COMPLETED in Phase 2)
|
||||
|
||||
3. #39/40/41 - Name system for finding elements
|
||||
- name="button1" property on all UIDrawables
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue