From 157967eb3e67abbab3cbca88fcf474b9a5bb8e77 Mon Sep 17 00:00:00 2001 From: quaK <38787176+Joelrau@users.noreply.github.com> Date: Tue, 24 May 2022 03:39:38 +0300 Subject: [PATCH] formatting --- src/client/component/game_console.cpp | 46 +++++++++++++-------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/src/client/component/game_console.cpp b/src/client/component/game_console.cpp index 6657c70..7feb0b4 100644 --- a/src/client/component/game_console.cpp +++ b/src/client/component/game_console.cpp @@ -73,18 +73,18 @@ namespace game_console void print_internal(const std::string& data) { con.output.access([&](output_queue& output) + { + if (con.visible_line_count > 0 + && con.display_line_offset == (output.size() - con.visible_line_count)) { - if (con.visible_line_count > 0 - && con.display_line_offset == (output.size() - con.visible_line_count)) - { - con.display_line_offset++; - } - output.push_back(data); - if (output.size() > 512) - { - output.pop_front(); - } - }); + con.display_line_offset++; + } + output.push_back(data); + if (output.size() > 512) + { + output.pop_front(); + } + }); } void toggle_console() @@ -391,21 +391,21 @@ namespace game_console void draw_output_window() { con.output.access([](output_queue& output) - { - draw_box(con.screen_min[0], con.screen_min[1] + 32.0f, con.screen_max[0] - con.screen_min[0], - (con.screen_max[1] - con.screen_min[1]) - 32.0f, dvars::con_outputWindowColor->current.vector); + { + draw_box(con.screen_min[0], con.screen_min[1] + 32.0f, con.screen_max[0] - con.screen_min[0], + (con.screen_max[1] - con.screen_min[1]) - 32.0f, dvars::con_outputWindowColor->current.vector); - const auto x = con.screen_min[0] + 6.0f; - const auto y = (con.screen_min[1] + 32.0f) + 6.0f; - const auto width = (con.screen_max[0] - con.screen_min[0]) - 12.0f; - const auto height = ((con.screen_max[1] - con.screen_min[1]) - 32.0f) - 12.0f; + const auto x = con.screen_min[0] + 6.0f; + const auto y = (con.screen_min[1] + 32.0f) + 6.0f; + const auto width = (con.screen_max[0] - con.screen_min[0]) - 12.0f; + const auto height = ((con.screen_max[1] - con.screen_min[1]) - 32.0f) - 12.0f; - game::R_AddCmdDrawText("H1-Mod 1.15", 0x7FFFFFFF, console_font, x, - ((height - 16.0f) + y) + console_font->pixelHeight, 1.0f, 1.0f, 0.0f, color_title, 0); + game::R_AddCmdDrawText("IW7-Mod ", 0x7FFFFFFF, console_font, x, + ((height - 16.0f) + y) + console_font->pixelHeight, 1.0f, 1.0f, 0.0f, color_title, 0); - draw_output_scrollbar(x, y, width, height, output); - draw_output_text(x, y, output); - }); + draw_output_scrollbar(x, y, width, height, output); + draw_output_text(x, y, output); + }); } void draw_console()