clang-tidy (amb el fuck de que no feien bona parella el clang de macos i el tidy de llvm)
This commit is contained in:
@@ -291,13 +291,13 @@ void ServiceMenu::initializeOptions() {
|
||||
Lang::getText("[SERVICE_MENU] CONTROLLER1"),
|
||||
SettingsGroup::CONTROLS,
|
||||
Input::get()->getControllerNames(),
|
||||
[]() {
|
||||
[]() -> std::string {
|
||||
return Options::gamepad_manager.getGamepad(Player::Id::PLAYER1).name;
|
||||
},
|
||||
[](const std::string& val) {
|
||||
[](const std::string& val) -> void {
|
||||
Options::gamepad_manager.assignGamepadToPlayer(Player::Id::PLAYER1, Input::get()->getGamepadByName(val), val);
|
||||
},
|
||||
[this]() {
|
||||
[this]() -> void {
|
||||
// Acción: configurar botones del mando del jugador 1
|
||||
auto* gamepad = &Options::gamepad_manager.getGamepad(Player::Id::PLAYER1);
|
||||
if ((gamepad != nullptr) && gamepad->instance) {
|
||||
@@ -309,13 +309,13 @@ void ServiceMenu::initializeOptions() {
|
||||
Lang::getText("[SERVICE_MENU] CONTROLLER2"),
|
||||
SettingsGroup::CONTROLS,
|
||||
Input::get()->getControllerNames(),
|
||||
[]() {
|
||||
[]() -> std::string {
|
||||
return Options::gamepad_manager.getGamepad(Player::Id::PLAYER2).name;
|
||||
},
|
||||
[](const std::string& val) {
|
||||
[](const std::string& val) -> void {
|
||||
Options::gamepad_manager.assignGamepadToPlayer(Player::Id::PLAYER2, Input::get()->getGamepadByName(val), val);
|
||||
},
|
||||
[this]() {
|
||||
[this]() -> void {
|
||||
// Acción: configurar botones del mando del jugador 2
|
||||
auto* gamepad = &Options::gamepad_manager.getGamepad(Player::Id::PLAYER2);
|
||||
if ((gamepad != nullptr) && gamepad->instance) {
|
||||
@@ -330,11 +330,11 @@ void ServiceMenu::initializeOptions() {
|
||||
std::vector<std::string>{
|
||||
Lang::getText("[SERVICE_MENU] PLAYER1"),
|
||||
Lang::getText("[SERVICE_MENU] PLAYER2")},
|
||||
[]() {
|
||||
[]() -> std::string {
|
||||
// Devolver el jugador actual asignado al teclado
|
||||
return Options::playerIdToString(Options::getPlayerWhoUsesKeyboard());
|
||||
},
|
||||
[](const std::string& val) {
|
||||
[](const std::string& val) -> void {
|
||||
// Asignar el teclado al jugador seleccionado
|
||||
Options::keyboard.assignTo(Options::stringToPlayerId(val));
|
||||
}));
|
||||
@@ -343,7 +343,7 @@ void ServiceMenu::initializeOptions() {
|
||||
options_.push_back(std::make_unique<ActionOption>(
|
||||
Lang::getText("[SERVICE_MENU] SWAP_CONTROLLERS"),
|
||||
SettingsGroup::CONTROLS,
|
||||
[this]() {
|
||||
[this]() -> void {
|
||||
Options::gamepad_manager.swapPlayers();
|
||||
adjustListValues(); // Sincroniza el valor de las opciones de lista (como MANDO1) con los datos reales
|
||||
updateOptionPairs(); // Actualiza los pares de texto <opción, valor> que se van a dibujar
|
||||
@@ -421,10 +421,10 @@ void ServiceMenu::initializeOptions() {
|
||||
Lang::getText("[SERVICE_MENU] LANG_ES"),
|
||||
Lang::getText("[SERVICE_MENU] LANG_BA"),
|
||||
Lang::getText("[SERVICE_MENU] LANG_EN")},
|
||||
[]() {
|
||||
[]() -> std::string {
|
||||
return Lang::getNameFromCode(Options::pending_changes.new_language);
|
||||
},
|
||||
[](const std::string& val) {
|
||||
[](const std::string& val) -> void {
|
||||
Options::pending_changes.new_language = Lang::getCodeFromName(val);
|
||||
Options::checkPendingChanges();
|
||||
}));
|
||||
@@ -436,10 +436,10 @@ void ServiceMenu::initializeOptions() {
|
||||
Lang::getText("[SERVICE_MENU] EASY"),
|
||||
Lang::getText("[SERVICE_MENU] NORMAL"),
|
||||
Lang::getText("[SERVICE_MENU] HARD")},
|
||||
[]() {
|
||||
[]() -> std::string {
|
||||
return Difficulty::getNameFromCode(Options::pending_changes.new_difficulty);
|
||||
},
|
||||
[](const std::string& val) {
|
||||
[](const std::string& val) -> void {
|
||||
Options::pending_changes.new_difficulty = Difficulty::getCodeFromName(val);
|
||||
Options::checkPendingChanges();
|
||||
}));
|
||||
@@ -453,7 +453,7 @@ void ServiceMenu::initializeOptions() {
|
||||
options_.push_back(std::make_unique<ActionOption>(
|
||||
Lang::getText("[SERVICE_MENU] RESET"),
|
||||
SettingsGroup::SYSTEM,
|
||||
[this]() {
|
||||
[this]() -> void {
|
||||
Section::name = Section::Name::RESET;
|
||||
toggle();
|
||||
}));
|
||||
@@ -461,7 +461,7 @@ void ServiceMenu::initializeOptions() {
|
||||
options_.push_back(std::make_unique<ActionOption>(
|
||||
Lang::getText("[SERVICE_MENU] QUIT"),
|
||||
SettingsGroup::SYSTEM,
|
||||
[]() {
|
||||
[]() -> void {
|
||||
Section::name = Section::Name::QUIT;
|
||||
Section::options = Section::Options::NONE;
|
||||
}));
|
||||
@@ -469,7 +469,7 @@ void ServiceMenu::initializeOptions() {
|
||||
options_.push_back(std::make_unique<ActionOption>(
|
||||
Lang::getText("[SERVICE_MENU] SHUTDOWN"),
|
||||
SettingsGroup::SYSTEM,
|
||||
[]() {
|
||||
[]() -> void {
|
||||
Section::name = Section::Name::QUIT;
|
||||
Section::options = Section::Options::SHUTDOWN;
|
||||
},
|
||||
@@ -581,12 +581,12 @@ auto ServiceMenu::checkInput() -> bool {
|
||||
using Action = Input::Action;
|
||||
|
||||
const std::vector<std::pair<Action, std::function<void()>>> ACTIONS = {
|
||||
{Action::UP, [this]() { setSelectorUp(); }},
|
||||
{Action::DOWN, [this]() { setSelectorDown(); }},
|
||||
{Action::RIGHT, [this]() { adjustOption(true); }},
|
||||
{Action::LEFT, [this]() { adjustOption(false); }},
|
||||
{Action::SM_SELECT, [this]() { selectOption(); }},
|
||||
{Action::SM_BACK, [this]() { moveBack(); }},
|
||||
{Action::UP, [this]() -> void { setSelectorUp(); }},
|
||||
{Action::DOWN, [this]() -> void { setSelectorDown(); }},
|
||||
{Action::RIGHT, [this]() -> void { adjustOption(true); }},
|
||||
{Action::LEFT, [this]() -> void { adjustOption(false); }},
|
||||
{Action::SM_SELECT, [this]() -> void { selectOption(); }},
|
||||
{Action::SM_BACK, [this]() -> void { moveBack(); }},
|
||||
};
|
||||
|
||||
// Teclado
|
||||
|
||||
Reference in New Issue
Block a user