Options: creat namespace
This commit is contained in:
@@ -195,7 +195,7 @@ void Title::checkInput()
|
||||
if (!define_buttons_->isEnabled())
|
||||
{
|
||||
// Comprueba todos los métodos de control
|
||||
for (const auto &CONTROLLER : options.controllers)
|
||||
for (const auto &CONTROLLER : Options::controllers)
|
||||
{
|
||||
// START
|
||||
if (Input::get()->checkInput(InputAction::START, INPUT_DO_NOT_ALLOW_REPEAT, CONTROLLER.type, CONTROLLER.index) &&
|
||||
@@ -269,15 +269,15 @@ void Title::swapControllers()
|
||||
return;
|
||||
}
|
||||
|
||||
swapOptionsControllers();
|
||||
Options::swapOptionsControllers();
|
||||
showControllers();
|
||||
}
|
||||
|
||||
// Intercambia el teclado de jugador
|
||||
void Title::swapKeyboard()
|
||||
{
|
||||
swapOptionsKeyboard();
|
||||
std::string text = Lang::getText("[DEFINE_BUTTONS] PLAYER") + std::to_string(getPlayerWhoUsesKeyboard()) + ": " + Lang::getText("[DEFINE_BUTTONS] KEYBOARD");
|
||||
Options::swapOptionsKeyboard();
|
||||
std::string text = Lang::getText("[DEFINE_BUTTONS] PLAYER") + std::to_string(Options::getPlayerWhoUsesKeyboard()) + ": " + Lang::getText("[DEFINE_BUTTONS] KEYBOARD");
|
||||
Notifier::get()->show({text});
|
||||
}
|
||||
|
||||
@@ -293,16 +293,16 @@ void Title::showControllers()
|
||||
for (size_t i = 0; i < NUM_CONTROLLERS; ++i)
|
||||
{
|
||||
// Ejemplo: el jugador 1 tiene el mando 2
|
||||
player_controller_index.at(options.controllers.at(i).player_id - 1) = i;
|
||||
player_controller_index.at(Options::controllers.at(i).player_id - 1) = i;
|
||||
}
|
||||
|
||||
// Genera el texto correspondiente
|
||||
for (size_t i = 0; i < NUM_CONTROLLERS; ++i)
|
||||
{
|
||||
const size_t index = player_controller_index.at(i);
|
||||
if (options.controllers.at(index).plugged)
|
||||
if (Options::controllers.at(index).plugged)
|
||||
{
|
||||
text.at(i) = Lang::getText("[DEFINE_BUTTONS] PLAYER") + std::to_string(i + 1) + ": " + options.controllers.at(index).name;
|
||||
text.at(i) = Lang::getText("[DEFINE_BUTTONS] PLAYER") + std::to_string(i + 1) + ": " + Options::controllers.at(index).name;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user