Need to redesign the finalize in lel so max_w/h works #16

Open
opened 2025-07-23 16:34:38 +00:00 by zedshaw · 2 comments
zedshaw commented 2025-07-23 16:34:38 +00:00 (Migrated from lcthw.dev)

Right now the logic for my cell size calculations is really odd and I think max_w/h should be fixed at the cell_width/height and then something else is used to calculate the cell.w/h.

Right now the logic for my cell size calculations is really odd and I think max_w/h should be fixed at the cell_width/height and then something else is used to calculate the cell.w/h.
zedshaw commented 2025-07-23 16:45:40 +00:00 (Migrated from lcthw.dev)

Currently because the max_w/h is used to calculate the w/h it's not possible to center things and also give them a size. For example, if I use =(30,30) to make a Rectangle that 30x30 then that also sets the size of the cell to (30,30) but keeps it at the 0,0 point. What needs to happen is if the cell is =(30,30) it sets the size to 30x30, but moves the mid_point to the center of the whole cell without the (30,30) calculation. Right now the logic is too weird to make this work.

Currently because the max_w/h is used to calculate the w/h it's not possible to center things _and_ also give them a size. For example, if I use =(30,30) to make a Rectangle that 30x30 then that also sets the size of the cell to (30,30) but keeps it at the 0,0 point. What needs to happen is if the cell is =(30,30) it sets the size to 30x30, but moves the mid_point to the center of the _whole cell_ without the (30,30) calculation. Right now the logic is too weird to make this work.
zedshaw commented 2025-07-23 16:51:36 +00:00 (Migrated from lcthw.dev)

Another explanation is you can't set a size and also center. Try a Sprite--which is fixed size--then do =(30,30) to see.

Another explanation is you can't set a size and also center. Try a Sprite--which is fixed size--then do =(30,30) to see.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
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: games/lel-guecs#16
No description provided.