Color the notification icon by message category #17573
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
In RetroArch showing of notification messages is done via a call to
runloop_msg_queue_push
which gets passed a category (info, warning, error or success). Currently the message popup will look exactly the same regardless of that category. Also when a libretro core usesRETRO_ENVIRONMENT_SET_MESSAGE_EXT
withRETRO_MESSAGE_TYPE_NOTIFICATION
it can specify a level (info, warn, error) which is then translated by RetroArch to that same internal message category.This commit adds a simple color selection of the icon based on the category so that errors and warnings stand out better.
It uses yellow for warnings and red for errors, and keeps the current blue for everything else (info and success messages). Additionally, it flips the 'i' info icon upside down for warnings and errors so it becomes a '!' exclamation mark icon.
Many RetroArch systems like shaders, netplay or cheevos use these types of notifications. Some correctly specify an appropriate message category but I've noticed a lot of calls to
runloop_msg_queue_push
use the genericMESSAGE_QUEUE_CATEGORY_INFO
instead ofMESSAGE_QUEUE_CATEGORY_ERROR
(orMESSAGE_QUEUE_CATEGORY_WARNING
) for things that clearly are errors. Might be a good idea to search through the code base forMESSAGE_QUEUE_CATEGORY_INFO
and assign a more appropriate category for things that clearly should be warning or error.Related Issues
Related Pull Requests
Reviewers