diff --git a/HowToDAGScheduling/Compiler.cpp b/HowToDAGScheduling/Compiler.cpp index 43f176f..695e0da 100644 --- a/HowToDAGScheduling/Compiler.cpp +++ b/HowToDAGScheduling/Compiler.cpp @@ -4,25 +4,26 @@ Compiler::Compiler() { _console_field = Rect(LAYOUT::MERGIN * Point(2, 1) + LAYOUT::DAG_SPACE_SIZE * Point(1, 0), LAYOUT::CONSOLE_SPACE_SIZE); + _font = Font(16); } void Compiler::compile(DAG& dag, SchedGrid& grid) { - ClearPrint(); CompileLog grid_log = grid.compile(dag); CompileLog dag_log = dag.compile(grid); if (grid_log._success != true || dag_log._success != true) { - Print << U"Compile Failer"; + _message.append(U"Compile Failer\n"); if (grid_log._success != true) - Print << grid_log._message; + _message.append(grid_log._message); if (dag_log._success != true) - Print << dag_log._message; + _message.append(dag_log._message); } else - Print << U"Compile Success"; + _message.append(U"Compile Success"); } void Compiler::draw() { + _font(_message).draw(_console_field); } diff --git a/HowToDAGScheduling/Compiler.h b/HowToDAGScheduling/Compiler.h index 35fff08..5b6e475 100644 --- a/HowToDAGScheduling/Compiler.h +++ b/HowToDAGScheduling/Compiler.h @@ -7,12 +7,13 @@ class Compiler { private: Rect _console_field; + Font _font; + String _message; public: Compiler(); void compile(DAG& dag, SchedGrid& grid); - void draw_field() { _console_field.draw(LAYOUT::FIELD_COLOR); }; void draw(); };