Fix #221: Add grid_pos and grid_size properties for Grid children
UIDrawables placed in a Grid's children collection now have: - grid_pos: Position in tile coordinates (get/set) - grid_size: Size in tile coordinates (get/set) Raises RuntimeError if accessed when parent is not a Grid. UIGrid only gets grid_pos (grid_size conflicts with existing property). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
6c5992f1c1
commit
14a6520593
10 changed files with 251 additions and 0 deletions
|
|
@ -135,6 +135,9 @@ public:
|
|||
// #142 - Cell coordinate conversion (screen pos -> cell coords)
|
||||
std::optional<sf::Vector2i> screenToCell(sf::Vector2f screen_pos) const;
|
||||
|
||||
// #221 - Get effective cell size (texture size * zoom)
|
||||
sf::Vector2f getEffectiveCellSize() const;
|
||||
|
||||
// #142 - Update cell hover state (called from PyScene)
|
||||
void updateCellHover(sf::Vector2f mousepos);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue