From ae4f6cc7e9b567bcecc7fb812aa4ab5058aca379 Mon Sep 17 00:00:00 2001 From: Krow Savcik Date: Fri, 16 Feb 2024 18:32:54 +0200 Subject: improved: layer interface New layer is added above the selected one rather than being added on top. --- src/canvas.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/canvas.c') diff --git a/src/canvas.c b/src/canvas.c index 2cc2e58..cfee1a3 100644 --- a/src/canvas.c +++ b/src/canvas.c @@ -462,6 +462,14 @@ canvas_refresh(Canvas *c) SDL_SetRenderTarget(ren, NULL); } +void +canvas_change_layer(Canvas *c, unsigned int l) +{ + if (l < c->layer_arr_cnt) + c->cur_layer = l; +} + + static void canvas_set_proj_path(Canvas *c, const char *path) { -- cgit v1.2.3