diff options
author | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-12-19 16:09:37 +0100 |
---|---|---|
committer | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-12-19 16:09:37 +0100 |
commit | 1b98253b58a077618aabcf9dfe073495b8db8d4f (patch) | |
tree | 74c84fbf6715a4a47154d79e3c8df2c312eca1d4 /src/crepe/facade/SDLContext.cpp | |
parent | bdb9e02cf345015aa0beaf4f451e28335df21d59 (diff) |
removed adding extra offset
Diffstat (limited to 'src/crepe/facade/SDLContext.cpp')
-rw-r--r-- | src/crepe/facade/SDLContext.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/crepe/facade/SDLContext.cpp b/src/crepe/facade/SDLContext.cpp index 35ea57f..ca45b79 100644 --- a/src/crepe/facade/SDLContext.cpp +++ b/src/crepe/facade/SDLContext.cpp @@ -229,7 +229,7 @@ void SDLContext::draw_text(const RenderText & data) { = {tmp_font_texture, [](SDL_Texture * texture) { SDL_DestroyTexture(texture); }}; vec2 size = text.dimensions * cam_aux_data.render_scale * data.transform.scale; - vec2 screen_pos = (absoluut_pos + text.offset - cam_aux_data.cam_pos + vec2 screen_pos = (absoluut_pos - cam_aux_data.cam_pos + (cam_aux_data.zoomed_viewport) / 2) * cam_aux_data.render_scale - size / 2 + cam_aux_data.bar_size; |