mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-03 22:28:46 +00:00
Merge pull request #3366 from laytan/fix-vet-scope-bug
fix vet scope bug skipping some scopes
This commit is contained in:
Vendored
+9
-9
@@ -1316,10 +1316,10 @@ begin_window :: proc(ctx: ^Context, title: string, rect: Rect, opt := Options{})
|
||||
|
||||
/* do title text */
|
||||
if .NO_TITLE not_in opt {
|
||||
id := get_id(ctx, "!title")
|
||||
update_control(ctx, id, tr, opt)
|
||||
tid := get_id(ctx, "!title")
|
||||
update_control(ctx, tid, tr, opt)
|
||||
draw_control_text(ctx, title, tr, .TITLE_TEXT, opt)
|
||||
if id == ctx.focus_id && ctx.mouse_down_bits == {.LEFT} {
|
||||
if tid == ctx.focus_id && ctx.mouse_down_bits == {.LEFT} {
|
||||
cnt.rect.x += ctx.mouse_delta.x
|
||||
cnt.rect.y += ctx.mouse_delta.y
|
||||
}
|
||||
@@ -1329,12 +1329,12 @@ begin_window :: proc(ctx: ^Context, title: string, rect: Rect, opt := Options{})
|
||||
|
||||
/* do `close` button */
|
||||
if .NO_CLOSE not_in opt {
|
||||
id := get_id(ctx, "!close")
|
||||
cid := get_id(ctx, "!close")
|
||||
r := Rect{tr.x + tr.w - tr.h, tr.y, tr.h, tr.h}
|
||||
tr.w -= r.w
|
||||
draw_icon(ctx, .CLOSE, r, ctx.style.colors[.TITLE_TEXT])
|
||||
update_control(ctx, id, r, opt)
|
||||
if .LEFT in ctx.mouse_released_bits && id == ctx.hover_id {
|
||||
update_control(ctx, cid, r, opt)
|
||||
if .LEFT in ctx.mouse_released_bits && cid == ctx.hover_id {
|
||||
cnt.open = false
|
||||
}
|
||||
}
|
||||
@@ -1343,11 +1343,11 @@ begin_window :: proc(ctx: ^Context, title: string, rect: Rect, opt := Options{})
|
||||
/* do `resize` handle */
|
||||
if .NO_RESIZE not_in opt {
|
||||
sz := ctx.style.footer_height
|
||||
id := get_id(ctx, "!resize")
|
||||
rid := get_id(ctx, "!resize")
|
||||
r := Rect{rect.x + rect.w - sz, rect.y + rect.h - sz, sz, sz}
|
||||
draw_icon(ctx, .RESIZE, r, ctx.style.colors[.TEXT])
|
||||
update_control(ctx, id, r, opt)
|
||||
if id == ctx.focus_id && .LEFT in ctx.mouse_down_bits {
|
||||
update_control(ctx, rid, r, opt)
|
||||
if rid == ctx.focus_id && .LEFT in ctx.mouse_down_bits {
|
||||
cnt.rect.w = max(96, cnt.rect.w + ctx.mouse_delta.x)
|
||||
cnt.rect.h = max(64, cnt.rect.h + ctx.mouse_delta.y)
|
||||
}
|
||||
|
||||
Vendored
+3
-3
@@ -2009,7 +2009,7 @@ __expandStroke :: proc(
|
||||
}
|
||||
}
|
||||
|
||||
for j in start..<end {
|
||||
for _ in start..<end {
|
||||
// TODO check this
|
||||
// if ((p1.flags & (NVG_PT_BEVEL | NVG_PR_INNERBEVEL)) != 0) {
|
||||
if (.BEVEL in p1.flags) || (.INNER_BEVEL in p1.flags) {
|
||||
@@ -2172,7 +2172,7 @@ __expandFill :: proc(
|
||||
__vset(&dst, verts[dst_index + 0].x, verts[dst_index + 0].y, lu, 1)
|
||||
__vset(&dst, verts[dst_index + 1].x, verts[dst_index + 1].y, ru, 1)
|
||||
|
||||
dst_diff := dst_start_length - len(dst)
|
||||
dst_diff = dst_start_length - len(dst)
|
||||
path.stroke = verts[dst_index:dst_index + dst_diff]
|
||||
|
||||
// advance
|
||||
@@ -3361,7 +3361,7 @@ TextBoxBounds :: proc(
|
||||
rows_mod := rows[:]
|
||||
y := y
|
||||
|
||||
for nrows, input_last in TextBreakLines(ctx, &input, breakRowWidth, &rows_mod) {
|
||||
for nrows in TextBreakLines(ctx, &input, breakRowWidth, &rows_mod) {
|
||||
for row in rows[:nrows] {
|
||||
rminx, rmaxx, dx: f32
|
||||
|
||||
|
||||
Reference in New Issue
Block a user