From 4d263a68547daaa560cdb9363ffe379df7a1076f Mon Sep 17 00:00:00 2001 From: aura Date: Thu, 5 Mar 2026 07:26:54 +0100 Subject: fix non-sweep traces, refactor some bsp, fix sprite crash in view2d --- src/editor/view2d.cpp | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'src/editor/view2d.cpp') 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 + ); + } } ); } -- cgit v1.2.3