Skip to content

Commit

Permalink
Remove im_text
Browse files Browse the repository at this point in the history
  • Loading branch information
karnkaul committed Nov 29, 2024
1 parent b3f1711 commit 29e9a99
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 19 deletions.
1 change: 0 additions & 1 deletion gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,5 @@ target_sources(${exe_name} PRIVATE
src/config.hpp
src/counter.cpp
src/counter.hpp
src/im_text.hpp
src/main.cpp
)
9 changes: 5 additions & 4 deletions gui/src/counter.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <counter.hpp>
#include <im_text.hpp>

#include <klib/fixed_string.hpp>

#include <imgui.h>

Expand Down Expand Up @@ -36,7 +37,7 @@ void Counter::update() {
void Counter::update_progress() {
if (!show_progress) { return; }
auto const progress = m_counter->get_progress();
im_text("Status: {}", to_str(progress.state));
ImGui::TextUnformatted(klib::FixedString{"Status: {}", to_str(progress.state)}.c_str());
m_progress_overlay.clear();
std::format_to(std::back_inserter(m_progress_overlay), "[{}/{}]", progress.counted, progress.total);
ImGui::SetNextItemWidth(-1.0f);
Expand All @@ -52,11 +53,11 @@ void Counter::update_rows() {
auto const update_row = [](DisplayRow const& row) {
ImGui::TableNextRow();
ImGui::TableSetColumnIndex(0);
im_text("{}", row.name);
ImGui::TextUnformatted(klib::FixedString{"{}", row.name}.c_str());
for (std::size_t i = 0; i < LineCount::COUNT_; ++i) {
auto const& metric = row.metrics[i]; // NOLINT(cppcoreguidelines-pro-bounds-constant-array-index)
ImGui::TableSetColumnIndex(int(i) + 1);
im_text("{}", metric);
ImGui::TextUnformatted(klib::FixedString{"{}", metric}.c_str());
}
};

Expand Down
14 changes: 0 additions & 14 deletions gui/src/im_text.hpp

This file was deleted.

0 comments on commit 29e9a99

Please sign in to comment.