Skip to content

Commit

Permalink
fix: Toasts not printing their message to the console correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
WerWolv committed Mar 11, 2024
1 parent c610d80 commit a3f550c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions plugins/ui/include/toasts/toast_notification.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,22 +48,22 @@ namespace hex::ui {
}

struct ToastInfo : impl::ToastNotification<ToastInfo> {
ToastInfo(std::string message)
: ToastNotification(ImGuiExt::GetCustomColorVec4(ImGuiCustomCol_LoggerInfo), ICON_VS_INFO, "hex.ui.common.info", std::move(message)) {
explicit ToastInfo(std::string message)
: ToastNotification(ImGuiExt::GetCustomColorVec4(ImGuiCustomCol_LoggerInfo), ICON_VS_INFO, "hex.ui.common.info", message) {
log::info("{}", message);
}
};

struct ToastWarning : impl::ToastNotification<ToastWarning> {
ToastWarning(std::string message)
: ToastNotification(ImGuiExt::GetCustomColorVec4(ImGuiCustomCol_LoggerWarning), ICON_VS_WARNING, "hex.ui.common.warning", std::move(message)) {
explicit ToastWarning(std::string message)
: ToastNotification(ImGuiExt::GetCustomColorVec4(ImGuiCustomCol_LoggerWarning), ICON_VS_WARNING, "hex.ui.common.warning", message) {
log::warn("{}", message);
}
};

struct ToastError : impl::ToastNotification<ToastError> {
ToastError(std::string message)
: ToastNotification(ImGuiExt::GetCustomColorVec4(ImGuiCustomCol_LoggerError), ICON_VS_ERROR, "hex.ui.common.error", std::move(message)) {
explicit ToastError(std::string message)
: ToastNotification(ImGuiExt::GetCustomColorVec4(ImGuiCustomCol_LoggerError), ICON_VS_ERROR, "hex.ui.common.error", message) {
log::error("{}", message);
}
};
Expand Down

0 comments on commit a3f550c

Please sign in to comment.