13 std::string bToStr(
bool b) {
return b ?
"ON" :
"OFF"; }
16 DebugOverrides::DebugOverrides()
21 const DebugOverrides& DebugOverrides::get() {
return instance(); }
23 DebugOverrides& DebugOverrides::instance() {
24 static DebugOverrides overrides;
28 void DebugOverrides::subscribe() { bl::event::Dispatcher::subscribe(&instance()); }
30 void DebugOverrides::observe(
const sf::Event& event) {
31 if (event.type == sf::Event::KeyPressed) {
32 switch (event.key.code) {
33 case sf::Keyboard::F2:
34 skipBattles = !skipBattles;
35 DebugBanner::display(
"SkipBattles: " + bToStr(skipBattles));
38 case sf::Keyboard::F3:
39 alwaysCatch = !alwaysCatch;
40 DebugBanner::display(
"AlwaysCatch: " + bToStr(alwaysCatch));
43 case sf::Keyboard::F4:
44 alwaysRun = !alwaysRun;
45 DebugBanner::display(
"AlwaysRun: " + bToStr(alwaysRun));
Core classes and functionality for both the editor and game.