overlay: toast notifications (#704)
## Link to GitHub Issue or related Pull Request, if one exists n/a ## Description of change Adds toast notifications to the overlay. Toast notifications are transient windows (shown for about 4 seconds). These are drawn on top of the game even when the overlay is inactive (i.e., when no window is open), and does not cause any input sink behavior. Add toasts for some common user-driven actions that could use a notification, such as: * screenshot * card insert * PIN macro * API client connect/disconnect * virtual printer * screen resize toggle / scene switch Add an option to change where the toasts are displayed, or to turn it off entirely. Add SDK function for it, and add it to the samples. ## Testing Tested DDR (shown at bottom right, as is for most games) and RB (shown top right by default).
This commit is contained in:
@@ -26,6 +26,14 @@ bool fileutils::file_exists(const std::filesystem::path &file_path) {
|
||||
return file_exists(file_path.c_str());
|
||||
}
|
||||
|
||||
std::string fileutils::basename(std::string_view path) {
|
||||
const auto slash = path.find_last_of("\\/");
|
||||
if (slash == std::string_view::npos) {
|
||||
return std::string(path);
|
||||
}
|
||||
return std::string(path.substr(slash + 1));
|
||||
}
|
||||
|
||||
bool fileutils::verify_header_pe(const std::filesystem::path &file_path) {
|
||||
if (!file_exists(file_path)) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user