notificacions: paleta semàntica pastel centralitzada amb outline derivat
This commit is contained in:
@@ -16,14 +16,15 @@
|
||||
#include <memory>
|
||||
#include <string> // for basic_string, operator+, char_t...
|
||||
|
||||
#include "core/audio/audio.hpp" // for Audio::init, Audio::destroy
|
||||
#include "core/input/global_inputs.hpp" // for GlobalInputs::wantsQuit
|
||||
#include "core/input/input.h" // for Input, InputAction
|
||||
#include "core/input/mouse.hpp" // for Mouse::handleEvent, Mouse::upda...
|
||||
#include "core/locale/lang.h" // for Lang, Lang::Code
|
||||
#include "core/rendering/screen.h" // for Screen
|
||||
#include "core/rendering/texture.h" // for Texture
|
||||
#include "core/resources/asset.h" // for Asset, Asset::Type
|
||||
#include "core/audio/audio.hpp" // for Audio::init, Audio::destroy
|
||||
#include "core/input/global_inputs.hpp" // for GlobalInputs::wantsQuit
|
||||
#include "core/input/input.h" // for Input, InputAction
|
||||
#include "core/input/mouse.hpp" // for Mouse::handleEvent, Mouse::upda...
|
||||
#include "core/locale/lang.h" // for Lang, Lang::Code
|
||||
#include "core/rendering/notifications.hpp" // for Notifications::show
|
||||
#include "core/rendering/screen.h" // for Screen
|
||||
#include "core/rendering/texture.h" // for Texture
|
||||
#include "core/resources/asset.h" // for Asset, Asset::Type
|
||||
#include "core/resources/resource.h"
|
||||
#include "core/resources/resource_helper.h"
|
||||
#include "game/defaults.hpp" // for SECTION_PROG_LOGO, GAMECANVAS_H...
|
||||
@@ -642,18 +643,16 @@ auto Director::handleEvent(SDL_Event *event) -> SDL_AppResult {
|
||||
if (event->type == SDL_EVENT_GAMEPAD_ADDED) {
|
||||
std::string name;
|
||||
if (Input::get()->handleGamepadAdded(event->gdevice.which, name)) {
|
||||
Screen::get()->notify(name + " " + Lang::get()->getText(94),
|
||||
Color{0x40, 0xFF, 0x40},
|
||||
Color{0, 0, 0},
|
||||
2500);
|
||||
Notifications::show(name + " " + Lang::get()->getText(94),
|
||||
Notifications::Palette::SUCCESS,
|
||||
Notifications::LONG_MS);
|
||||
}
|
||||
} else if (event->type == SDL_EVENT_GAMEPAD_REMOVED) {
|
||||
std::string name;
|
||||
if (Input::get()->handleGamepadRemoved(event->gdevice.which, name)) {
|
||||
Screen::get()->notify(name + " " + Lang::get()->getText(95),
|
||||
Color{0xFF, 0x50, 0x50},
|
||||
Color{0, 0, 0},
|
||||
2500);
|
||||
Notifications::show(name + " " + Lang::get()->getText(95),
|
||||
Notifications::Palette::DANGER,
|
||||
Notifications::LONG_MS);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user