summaryrefslogtreecommitdiff
path: root/src/editor/view2d.cpp
diff options
context:
space:
mode:
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
+ );
+ }
} );
}