Visibility: skip render or click inputs #10

Closed
opened 2024-03-09 18:27:39 +00:00 by john · 2 comments
Owner

notes say:
14 feat: UIDrawable sf::rect_something AABB(), bool visible(), and bool hidden for toggling visibility or skipping rendering

  • bool visible() - returns False if out of bounds of the current view, or always True if the UIDrawable is hidden.
  • bool hidden - internal member on the parent class to track visibility
  • virtual sf::some_kind_of_rect AABB(), a new required method on derived classes to get the screen coordinates of a thing.

Upgraded to "Major Feature" because I suspect it needs some references (".parent" or the like) to recursively climb back up to the root and get add up offsets.

non-visible Drawables can't be clicked or rendered.

notes say: 14 feat: UIDrawable sf::rect_something AABB(), bool visible(), and bool hidden for toggling visibility or skipping rendering * `bool visible()` - returns False if out of bounds of the current view, or always True if the UIDrawable is hidden. * `bool hidden` - internal member on the parent class to track visibility * `virtual sf::some_kind_of_rect AABB()`, a new required method on derived classes to get the screen coordinates of a thing. Upgraded to "Major Feature" because I suspect it needs some references (".parent" or the like) to recursively climb back up to the root and get add up offsets. non-visible Drawables can't be clicked or rendered.
john added the
Major Feature
label 2024-03-09 18:27:39 +00:00
john added this to the Alpha Release Targets milestone 2024-03-13 14:45:12 +00:00
john added the
priority:tier2-foundation
system:ui-hierarchy
labels 2025-10-26 00:49:35 +00:00
Author
Owner

Status: Fully implemented

  • visible property exists on UIDrawable (src/UIDrawable.h:81)
  • Template getters/setters in src/UIBase.h:109-123
  • opacity property also implemented (UIBase.h:125-150)
  • All UIDrawable types (Frame, Caption, Sprite, Grid, etc.) inherit these via UIDRAWABLE_GETSETTERS macro
  • Documentation is complete
Status: Fully implemented - visible property exists on UIDrawable (src/UIDrawable.h:81) - Template getters/setters in src/UIBase.h:109-123 - opacity property also implemented (UIBase.h:125-150) - All UIDrawable types (Frame, Caption, Sprite, Grid, etc.) inherit these via UIDRAWABLE_GETSETTERS macro - Documentation is complete
john closed this issue 2025-11-26 10:11:12 +00:00
Author
Owner

Already Implemented

This feature was implemented as part of the Phase 1 UIDrawable improvements.

Current Implementation

  • visible property on all UIDrawable subclasses (UIDrawable.h:81)
  • opacity property for gradual visibility (UIDrawable.h:82)
  • Template getters/setters in UIBase.h:109-163
  • All types inherit via UIDRAWABLE_GETSETTERS macro
frame.visible = False  # Skip rendering and click handling
frame.opacity = 0.5    # Semi-transparent

Non-visible Drawables are not rendered and cannot be clicked, as specified.

## Already Implemented This feature was implemented as part of the Phase 1 UIDrawable improvements. ### Current Implementation - `visible` property on all UIDrawable subclasses (`UIDrawable.h:81`) - `opacity` property for gradual visibility (`UIDrawable.h:82`) - Template getters/setters in `UIBase.h:109-163` - All types inherit via `UIDRAWABLE_GETSETTERS` macro ```python frame.visible = False # Skip rendering and click handling frame.opacity = 0.5 # Semi-transparent ``` Non-visible Drawables are not rendered and cannot be clicked, as specified.
Sign in to join this conversation.
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: john/McRogueFace#10
No description provided.