Moving console access to python side, so Windows users won't brick their session.
This commit is contained in:
parent
cea084bddf
commit
5b259d0b38
|
@ -251,7 +251,7 @@ PyObject* McRFPy_API::_registerInputAction(PyObject *self, PyObject *args)
|
||||||
std::cout << "Unregistering\n";
|
std::cout << "Unregistering\n";
|
||||||
success = game->currentScene()->unregisterActionInjected(action_code, std::string(actionstr) + "_py");
|
success = game->currentScene()->unregisterActionInjected(action_code, std::string(actionstr) + "_py");
|
||||||
} else {
|
} else {
|
||||||
std::cout << "Registering" << actionstr << "_py to " << action_code << "\n";
|
std::cout << "Registering " << actionstr << "_py to " << action_code << "\n";
|
||||||
success = game->currentScene()->registerActionInjected(action_code, std::string(actionstr) + "_py");
|
success = game->currentScene()->registerActionInjected(action_code, std::string(actionstr) + "_py");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,8 @@ PyScene::PyScene(GameEngine* g) : Scene(g)
|
||||||
registerAction(ActionCode::MOUSEWHEEL + ActionCode::WHEEL_DEL, "wheel_up");
|
registerAction(ActionCode::MOUSEWHEEL + ActionCode::WHEEL_DEL, "wheel_up");
|
||||||
registerAction(ActionCode::MOUSEWHEEL + ActionCode::WHEEL_NEG + ActionCode::WHEEL_DEL, "wheel_down");
|
registerAction(ActionCode::MOUSEWHEEL + ActionCode::WHEEL_NEG + ActionCode::WHEEL_DEL, "wheel_down");
|
||||||
|
|
||||||
registerAction(ActionCode::KEY + sf::Keyboard::Grave, "debug_menu");
|
// console (` / ~ key) - don't hard code.
|
||||||
|
//registerAction(ActionCode::KEY + sf::Keyboard::Grave, "debug_menu");
|
||||||
}
|
}
|
||||||
|
|
||||||
void PyScene::update()
|
void PyScene::update()
|
||||||
|
|
Loading…
Reference in New Issue