From f92e7abe56854bc8c76f959b39297665cb517ae7 Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Fri, 21 Feb 2025 19:54:41 -0600 Subject: [PATCH] Only redraw textbar when text changes --- src/game/boe.graphics.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/game/boe.graphics.cpp b/src/game/boe.graphics.cpp index bb0a5f42..221ca324 100644 --- a/src/game/boe.graphics.cpp +++ b/src/game/boe.graphics.cpp @@ -669,7 +669,12 @@ void draw_text_bar() { } void draw_text_bar(std::pair text) { - put_text_bar(text.first, text.second); + static std::pair store_text = std::make_pair("", ""); + if(text.first != store_text.first || text.second != store_text.second){ + store_text = text; + put_text_bar(text.first, text.second); + refresh_text_bar(); + } } void put_text_bar(std::string str, std::string right_str) {