summaryrefslogtreecommitdiff
path: root/src/editor/view2d.cpp
diff options
context:
space:
mode:
authoraura <nw@moneybot.cc>2026-03-05 07:26:54 +0100
committeraura <nw@moneybot.cc>2026-03-05 07:26:54 +0100
commit4d263a68547daaa560cdb9363ffe379df7a1076f (patch)
tree0da9423dfe8dab651fd8a13d2b23ac02ab284d37 /src/editor/view2d.cpp
parent784d6e46884f47c5d7c02380a1bbf09747bbd047 (diff)
fix non-sweep traces, refactor some bsp, fix sprite crash in view2d
Diffstat (limited to 'src/editor/view2d.cpp')
-rw-r--r--src/editor/view2d.cpp24
1 files changed, 17 insertions, 7 deletions
diff --git a/src/editor/view2d.cpp b/src/editor/view2d.cpp
index b68846e..c1ef5ea 100644
--- a/src/editor/view2d.cpp
+++ b/src/editor/view2d.cpp
@@ -630,13 +630,23 @@ void gui_editor_2dview_draw_sprites( GUI_EDITOR_2DVIEW* view, I32 x, I32 y ) {
gui_draw_rect( pos.x - w/2 - 1, pos.y - h/2 - 1, w + 2, h + 2, CLR::WHITE( 0.5f ) );
}
- gl_2d_textured_frect(
- _gui.gl2d_font,
- { (F32)((I32)pos.x - w/2), (F32)((I32)pos.y - h/2) },
- { (F32)w, (F32)h },
- s->tex,
- s->clr
- );
+ else {
+ gl_2d_frect(
+ _gui.gl2d,
+ { (F32)((I32)pos.x - w/2), (F32)((I32)pos.y - h/2) },
+ { (F32)w, (F32)h },
+ s->clr
+ );
+ }
+ if( s->tex ) {
+ gl_2d_textured_frect(
+ _gui.gl2d_font,
+ { (F32)((I32)pos.x - w/2), (F32)((I32)pos.y - h/2) },
+ { (F32)w, (F32)h },
+ s->tex,
+ s->clr
+ );
+ }
} );
}