1 #include "settings_pane.hpp" 2 3 #include <cppurses/painter/color.hpp> 4 #include <cppurses/widget/border.hpp> 5 6 using namespace cppurses; 7 Settings_pane()8Settings_pane::Settings_pane() { 9 this->set_name("Settings_pane"); 10 this->brush.set_background(Color::White); 11 this->brush.set_foreground(Color::Blue); 12 for (auto& descendant : this->children.get_descendants()) { 13 descendant->brush.set_background(Color::White); 14 descendant->brush.set_foreground(Color::Blue); 15 } 16 return_btn.brush.set_background(Color::Blue); 17 return_btn.brush.set_foreground(Color::White); 18 19 this->border.enable(); 20 this->border.segments.north_east = L'─'; 21 this->border.segments.north_west = L'╭'; 22 this->border.segments.south_west = L'╰'; 23 this->border.segments.south.disable(); 24 this->border.segments.east.disable(); 25 this->border.segments.south_east.disable(); 26 27 show_moves_box.set_name("show_move_box in Settings_pane"); 28 hide_log_box.set_name("hide_log_box in Settings_pane"); 29 black_ai.set_name("black_ai in Settings_pane"); 30 white_ai.set_name("white_ai in Settings_pane"); 31 ruleset.set_name("ruleset in Settings_pane"); 32 reset_btn.set_name("reset_btn in Settings_pane"); 33 return_btn.set_name("return_btn in Settings_pane"); 34 } 35