Dragging! & basic proportional box resize frm cursor distance to box pos
Still need to add resize via 'pulling' to stretch the box out from a side or 2 sides diagonally. Also some general clenaup of code
This commit is contained in:
@ -33,6 +33,19 @@ Range2 :: struct #raw_union{
|
||||
},
|
||||
}
|
||||
|
||||
range2 :: #force_inline proc "contextless" ( a, b : Vec2 ) -> Range2 {
|
||||
result := Range2 { pts = { a, b } }
|
||||
return result
|
||||
}
|
||||
|
||||
Rect :: struct {
|
||||
top_left, bottom_right : Vec2
|
||||
}
|
||||
|
||||
add_range2 :: #force_inline proc "contextless" ( a, b : Range2 ) -> Range2 {
|
||||
result := Range2 { pts = {
|
||||
a.p0 + b.p0,
|
||||
a.p1 + b.p1,
|
||||
}}
|
||||
return result
|
||||
}
|
||||
|
Reference in New Issue
Block a user