Text editor: add scroll bar, add mouse selection, cursor move adjustment, load text file

This commit is contained in:
Krzosa Karol
2024-06-06 16:11:32 +02:00
parent 73ebb34787
commit 50a1ca02b1
5 changed files with 99 additions and 62 deletions

View File

@@ -24,6 +24,16 @@ GetRectSize :: proc(rect: Rect2P): Vector2 {
return result;
}
GetRectY :: proc(rect: Rect2P): f32 {
result := GetRectSize(rect);
return result.y;
}
GetRectX :: proc(rect: Rect2P): f32 {
result := GetRectSize(rect);
return result.x;
}
CutLeft :: proc(r: *Rect2P, value: f32): Rect2P {
minx := r.min.x;
r.min.x = F32_Min(r.max.x, r.min.x + value);