diff options
author | Krow Savcik <krow@savcik.xyz> | 2024-02-16 18:32:54 +0200 |
---|---|---|
committer | Krow Savcik <krow@savcik.xyz> | 2024-02-16 18:32:54 +0200 |
commit | ae4f6cc7e9b567bcecc7fb812aa4ab5058aca379 (patch) | |
tree | 97fc380396bd4413c89d3608d45a0bdf25283a4e /src/canvas.c | |
parent | dc9a97424933e43b69996c0cbab8ecc01cfe72d0 (diff) |
improved: layer interface
New layer is added above the selected one rather than being added on top.
Diffstat (limited to 'src/canvas.c')
-rw-r--r-- | src/canvas.c | 8 |
1 files changed, 8 insertions, 0 deletions
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) { |