From 66f4f11a6875eda128cf5f3b5ab99a14b4a77075 Mon Sep 17 00:00:00 2001 From: TheBrokenRail Date: Mon, 30 Sep 2024 13:13:02 -0400 Subject: [PATCH] Tweak Debug Screen --- mods/src/f3/f3.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mods/src/f3/f3.cpp b/mods/src/f3/f3.cpp index 86b970ca29..0faae4a21d 100644 --- a/mods/src/f3/f3.cpp +++ b/mods/src/f3/f3.cpp @@ -48,14 +48,17 @@ static std::vector get_debug_info(const Minecraft *minecraft) { // Render Text With Background static constexpr uint32_t debug_background_color = 0x90505050; static constexpr int debug_text_color = 0xe0e0e0; -static constexpr int debug_background_padding = 1; static void render_debug_line(Gui *gui, std::string &line, const int x, const int y) { // Draw Background const int width = gui->minecraft->font->width(line); if (width == 0) { return; } - gui->fill(x - debug_background_padding, y - debug_background_padding, x + width + debug_background_padding, y + line_height, debug_background_color); + int x1 = x - 1; + int y1 = y - 1; + int x2 = x + width; + int y2 = y + line_height; + gui->fill(x1, y1, x2, y2, debug_background_color); // Draw Text gui->minecraft->font->draw(line, float(x), float(y), debug_text_color); }