Add helper methods to convert right-to-left Rect2i and Point2i in Tree's draw_item#110055
Add helper methods to convert right-to-left Rect2i and Point2i in Tree's draw_item#110055Repiteo merged 1 commit intogodotengine:masterfrom
Rect2i and Point2i in Tree's draw_item#110055Conversation
|
Looks fine, but I wonder if it wouldn't be better to pass the Vector2/Rect2 as reference and modify it inside the function, instead of returning new one 🤔 |
It would make code even simpler imo, I can make that change |
Actually, I don't think this should be done. There are a few instances of both methods being used where the output is assigned to another variable and the input is used later, so these methods should not modify the input. |
|
Thanks! |
A small simplification. I've also removed calls to
is_layout_rtlinsidedraw_item, since there is anrtlflag in the beginning of the method.