Input: afegits dos inputs per a ServiceMenu (accept i back)
Style: renombrats alguns metodes de windowZoom a windowSize
This commit is contained in:
@@ -170,6 +170,32 @@ namespace globalInputs
|
||||
ServiceMenu::get()->toggle();
|
||||
}
|
||||
|
||||
// Cambia el modo de pantalla completa
|
||||
void toggleFullscreen()
|
||||
{
|
||||
Screen::get()->toggleFullscreen();
|
||||
const std::string MODE = options.video.fullscreen ? lang::getText("[NOTIFICATIONS] 11") : lang::getText("[NOTIFICATIONS] 10");
|
||||
Notifier::get()->show({MODE});
|
||||
}
|
||||
|
||||
// Reduce el tamaño de la ventana
|
||||
void decWindowSize()
|
||||
{
|
||||
if (Screen::get()->decWindowSize())
|
||||
{
|
||||
Notifier::get()->show({lang::getText("[NOTIFICATIONS] 09") + " x" + std::to_string(options.window.size)});
|
||||
}
|
||||
}
|
||||
|
||||
// Aumenta el tamaño de la ventana
|
||||
void incWindowSize()
|
||||
{
|
||||
if (Screen::get()->incWindowSize())
|
||||
{
|
||||
Notifier::get()->show({lang::getText("[NOTIFICATIONS] 09") + " x" + std::to_string(options.window.size)});
|
||||
}
|
||||
}
|
||||
|
||||
// Comprueba el boton de servicio
|
||||
void checkServiceButton()
|
||||
{
|
||||
@@ -184,7 +210,7 @@ namespace globalInputs
|
||||
{
|
||||
for (int i = 0; i < Input::get()->getNumControllers(); ++i)
|
||||
{
|
||||
if (Input::get()->checkInput(InputAction::SERVICE, INPUT_ALLOW_REPEAT, InputDeviceToUse::CONTROLLER, i))
|
||||
if (Input::get()->checkInput(InputAction::SERVICE, INPUT_DO_NOT_ALLOW_REPEAT, InputDeviceToUse::CONTROLLER, i))
|
||||
{
|
||||
toggleServiceMenu();
|
||||
return;
|
||||
@@ -230,14 +256,14 @@ namespace globalInputs
|
||||
}
|
||||
|
||||
// Aceptar
|
||||
if (Input::get()->checkInput(InputAction::START, INPUT_DO_NOT_ALLOW_REPEAT, InputDeviceToUse::KEYBOARD))
|
||||
if (Input::get()->checkInput(InputAction::SM_SELECT, INPUT_DO_NOT_ALLOW_REPEAT, InputDeviceToUse::KEYBOARD))
|
||||
{
|
||||
ServiceMenu::get()->selectOption();
|
||||
return;
|
||||
}
|
||||
|
||||
// Atras
|
||||
if (Input::get()->checkInput(InputAction::BACK, INPUT_DO_NOT_ALLOW_REPEAT, InputDeviceToUse::KEYBOARD))
|
||||
if (Input::get()->checkInput(InputAction::SM_BACK, INPUT_DO_NOT_ALLOW_REPEAT, InputDeviceToUse::KEYBOARD))
|
||||
{
|
||||
ServiceMenu::get()->moveBack();
|
||||
return;
|
||||
@@ -249,42 +275,42 @@ namespace globalInputs
|
||||
for (int i = 0; i < Input::get()->getNumControllers(); ++i)
|
||||
{
|
||||
// Arriba
|
||||
if (Input::get()->checkInput(InputAction::UP, INPUT_ALLOW_REPEAT, InputDeviceToUse::CONTROLLER, i))
|
||||
if (Input::get()->checkInput(InputAction::UP, INPUT_DO_NOT_ALLOW_REPEAT, InputDeviceToUse::CONTROLLER, i))
|
||||
{
|
||||
ServiceMenu::get()->setSelectorUp();
|
||||
return;
|
||||
}
|
||||
|
||||
// Abajo
|
||||
if (Input::get()->checkInput(InputAction::DOWN, INPUT_ALLOW_REPEAT, InputDeviceToUse::CONTROLLER, i))
|
||||
if (Input::get()->checkInput(InputAction::DOWN, INPUT_DO_NOT_ALLOW_REPEAT, InputDeviceToUse::CONTROLLER, i))
|
||||
{
|
||||
ServiceMenu::get()->setSelectorDown();
|
||||
return;
|
||||
}
|
||||
|
||||
// Derecha
|
||||
if (Input::get()->checkInput(InputAction::RIGHT, INPUT_ALLOW_REPEAT, InputDeviceToUse::CONTROLLER, i))
|
||||
if (Input::get()->checkInput(InputAction::RIGHT, INPUT_DO_NOT_ALLOW_REPEAT, InputDeviceToUse::CONTROLLER, i))
|
||||
{
|
||||
ServiceMenu::get()->adjustOption(true);
|
||||
return;
|
||||
}
|
||||
|
||||
// Izquierda
|
||||
if (Input::get()->checkInput(InputAction::LEFT, INPUT_ALLOW_REPEAT, InputDeviceToUse::CONTROLLER, i))
|
||||
if (Input::get()->checkInput(InputAction::LEFT, INPUT_DO_NOT_ALLOW_REPEAT, InputDeviceToUse::CONTROLLER, i))
|
||||
{
|
||||
ServiceMenu::get()->adjustOption(false);
|
||||
return;
|
||||
}
|
||||
|
||||
// Aceptar
|
||||
if (Input::get()->checkInput(InputAction::FIRE_LEFT, INPUT_ALLOW_REPEAT, InputDeviceToUse::CONTROLLER, i))
|
||||
if (Input::get()->checkInput(InputAction::SM_SELECT, INPUT_DO_NOT_ALLOW_REPEAT, InputDeviceToUse::CONTROLLER, i))
|
||||
{
|
||||
ServiceMenu::get()->selectOption();
|
||||
return;
|
||||
}
|
||||
|
||||
// Atras
|
||||
if (Input::get()->checkInput(InputAction::FIRE_CENTER, INPUT_ALLOW_REPEAT, InputDeviceToUse::CONTROLLER, i))
|
||||
if (Input::get()->checkInput(InputAction::SM_BACK, INPUT_DO_NOT_ALLOW_REPEAT, InputDeviceToUse::CONTROLLER, i))
|
||||
{
|
||||
ServiceMenu::get()->moveBack();
|
||||
return;
|
||||
@@ -310,7 +336,7 @@ namespace globalInputs
|
||||
// Comprueba el teclado para decrementar el tamaño de la ventana
|
||||
if (Input::get()->checkInput(InputAction::WINDOW_DEC_SIZE, INPUT_DO_NOT_ALLOW_REPEAT, InputDeviceToUse::KEYBOARD))
|
||||
{
|
||||
if (Screen::get()->decWindowZoom())
|
||||
if (Screen::get()->decWindowSize())
|
||||
{
|
||||
Notifier::get()->show({lang::getText("[NOTIFICATIONS] 09") + " x" + std::to_string(options.window.size)});
|
||||
}
|
||||
@@ -320,7 +346,7 @@ namespace globalInputs
|
||||
// Comprueba el teclado para incrementar el tamaño de la ventana
|
||||
if (Input::get()->checkInput(InputAction::WINDOW_INC_SIZE, INPUT_DO_NOT_ALLOW_REPEAT, InputDeviceToUse::KEYBOARD))
|
||||
{
|
||||
if (Screen::get()->incWindowZoom())
|
||||
if (Screen::get()->incWindowSize())
|
||||
{
|
||||
Notifier::get()->show({lang::getText("[NOTIFICATIONS] 09") + " x" + std::to_string(options.window.size)});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user