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

Open
opened 5 days ago by zedshaw · 2 comments
zedshaw commented 5 days ago
Owner

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.
Poster
Owner

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.
Poster
Owner

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 Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: learn-code-the-hard-way/lel-guecs#16
Loading…
There is no content yet.