notifiactions: new icons + deleting old warnings&errors
This commit is contained in:
parent
acb5a9bc8d
commit
2455df4017
10 changed files with 329 additions and 24 deletions
|
@ -108,17 +108,19 @@ namespace ImGui
|
|||
const char ColorMarkerEnd = 0x3; // ETX
|
||||
|
||||
// Special ASCII characters are used here as an ikons markers
|
||||
const char PrintIconMarker = 0x4;
|
||||
const char PrinterIconMarker = 0x5;
|
||||
const char PrinterSlaIconMarker = 0x6;
|
||||
const char FilamentIconMarker = 0x7;
|
||||
const char MaterialIconMarker = 0x8;
|
||||
const char CloseIconMarker = 0xB;
|
||||
const char CloseIconHoverMarker = 0xC;
|
||||
const char TimerDotMarker = 0xE;
|
||||
const char TimerDotEmptyMarker = 0xF;
|
||||
const char WarningMarker = 0x10;
|
||||
const char ErrorMarker = 0x11;
|
||||
const char PrintIconMarker = 0x4;
|
||||
const char PrinterIconMarker = 0x5;
|
||||
const char PrinterSlaIconMarker = 0x6;
|
||||
const char FilamentIconMarker = 0x7;
|
||||
const char MaterialIconMarker = 0x8;
|
||||
const char CloseIconMarker = 0xB;
|
||||
const char CloseIconHoverMarker = 0xC;
|
||||
// const char TimerDotMarker = 0xE;
|
||||
// const char TimerDotEmptyMarker = 0xF;
|
||||
const char MinimalizeMarker = 0xE;
|
||||
const char MinimalizeHoverMarker = 0xF;
|
||||
const char WarningMarker = 0x10;
|
||||
const char ErrorMarker = 0x11;
|
||||
// void MyFunction(const char* name, const MyMatrix44& v);
|
||||
|
||||
}
|
||||
|
|
|
@ -37,17 +37,19 @@ namespace GUI {
|
|||
|
||||
|
||||
static const std::map<const char, std::string> font_icons = {
|
||||
{ImGui::PrintIconMarker , "cog" },
|
||||
{ImGui::PrinterIconMarker , "printer" },
|
||||
{ImGui::PrinterSlaIconMarker, "sla_printer" },
|
||||
{ImGui::FilamentIconMarker , "spool" },
|
||||
{ImGui::MaterialIconMarker , "resin" },
|
||||
{ImGui::CloseIconMarker , "cross" },
|
||||
{ImGui::CloseIconHoverMarker, "cross_focus_large" },
|
||||
{ImGui::TimerDotMarker , "timer_dot" },
|
||||
{ImGui::TimerDotEmptyMarker , "timer_dot_empty" },
|
||||
{ImGui::WarningMarker , "flag_green" },
|
||||
{ImGui::ErrorMarker , "flag_red" }
|
||||
{ImGui::PrintIconMarker , "cog" },
|
||||
{ImGui::PrinterIconMarker , "printer" },
|
||||
{ImGui::PrinterSlaIconMarker , "sla_printer" },
|
||||
{ImGui::FilamentIconMarker , "spool" },
|
||||
{ImGui::MaterialIconMarker , "resin" },
|
||||
{ImGui::CloseIconMarker , "notification_close" },
|
||||
{ImGui::CloseIconHoverMarker , "notification_close_hover" },
|
||||
//{ImGui::TimerDotMarker , "timer_dot" },
|
||||
//{ImGui::TimerDotEmptyMarker , "timer_dot_empty" },
|
||||
{ImGui::MinimalizeMarker , "notification_minimalize" },
|
||||
{ImGui::MinimalizeHoverMarker , "notification_minimalize_hover" },
|
||||
{ImGui::WarningMarker , "notification_warning" },
|
||||
{ImGui::ErrorMarker , "notification_error" }
|
||||
};
|
||||
|
||||
const ImVec4 ImGuiWrapper::COL_GREY_DARK = { 0.333f, 0.333f, 0.333f, 1.0f };
|
||||
|
|
|
@ -492,12 +492,12 @@ void NotificationManager::PopNotification::render_minimize_button(ImGuiWrapper&
|
|||
|
||||
//button - if part if treggered
|
||||
std::string button_text;
|
||||
button_text = ImGui::CloseIconMarker;
|
||||
button_text = ImGui::MinimalizeMarker;
|
||||
if (ImGui::IsMouseHoveringRect(ImVec2(win_pos_x - m_window_width / 10.f, win_pos_y + m_window_height - 2 * m_line_height + 1),
|
||||
ImVec2(win_pos_x, win_pos_y + m_window_height),
|
||||
true))
|
||||
{
|
||||
button_text = ImGui::CloseIconHoverMarker;
|
||||
button_text = ImGui::MinimalizeHoverMarker;
|
||||
}
|
||||
ImVec2 button_pic_size = ImGui::CalcTextSize(button_text.c_str());
|
||||
ImVec2 button_size(button_pic_size.x * 1.25f, button_pic_size.y * 1.25f);
|
||||
|
|
|
@ -3481,6 +3481,10 @@ void Plater::priv::add_warning(const Slic3r::PrintStateBase::Warning& warning, s
|
|||
}
|
||||
void Plater::priv::actualizate_warnings(const Model& model, size_t print_oid)
|
||||
{
|
||||
if (model.objects.size() == 0) {
|
||||
clear_warnings();
|
||||
return;
|
||||
}
|
||||
std::vector<size_t> living_oids;
|
||||
living_oids.push_back(model.id().id);
|
||||
living_oids.push_back(print_oid);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue