diff --git a/include/visual/colors.hpp b/include/visual/colors.hpp index d9455565..c1e7260a 100644 --- a/include/visual/colors.hpp +++ b/include/visual/colors.hpp @@ -49,6 +49,8 @@ struct rgba_t constexpr rgba_t(float _r, float _g, float _b, float _a = 1.0f) : r(_r), g(_g), b(_b), a(_a){}; explicit rgba_t(const char hex[6]); + rgba_t(const glez::rgba &other) : r(other.r), g(other.g), b(other.b), a(other.a){}; + #if __clang__ operator glez::rgba() const { diff --git a/include/visual/menu/menu/object/input/Slider.hpp b/include/visual/menu/menu/object/input/Slider.hpp index ff4dca64..04f28245 100644 --- a/include/visual/menu/menu/object/input/Slider.hpp +++ b/include/visual/menu/menu/object/input/Slider.hpp @@ -84,12 +84,12 @@ public: else { // Bar - glez::draw::rect(bb.getBorderBox().left() + *SliderStyle::handle_width / 2, bb.getBorderBox().top() + (bb.getBorderBox().height - *SliderStyle::bar_width) / 2, bb.getBorderBox().width - *SliderStyle::handle_width, *SliderStyle::bar_width, option ? *SliderStyle::bar_color : *style::colors::error); + draw::Rectangle(bb.getBorderBox().left() + *SliderStyle::handle_width / 2, bb.getBorderBox().top() + (bb.getBorderBox().height - *SliderStyle::bar_width) / 2, bb.getBorderBox().width - *SliderStyle::handle_width, *SliderStyle::bar_width, option ? *SliderStyle::bar_color : *style::colors::error); // Handle body auto offset = handleOffset() * (bb.getBorderBox().width - *SliderStyle::handle_width); - glez::draw::rect(bb.getBorderBox().left() + offset, bb.getBorderBox().top(), *SliderStyle::handle_width, bb.getBorderBox().height, *SliderStyle::handle_body); + draw::Rectangle(bb.getBorderBox().left() + offset, bb.getBorderBox().top(), *SliderStyle::handle_width, bb.getBorderBox().height, *SliderStyle::handle_body); // Handle outline - glez::draw::rect_outline(bb.getBorderBox().left() + offset, bb.getBorderBox().top(), *SliderStyle::handle_width, bb.getBorderBox().height, *SliderStyle::handle_border, 1); + draw::RectangleOutlined(bb.getBorderBox().left() + offset, bb.getBorderBox().top(), *SliderStyle::handle_width, bb.getBorderBox().height, *SliderStyle::handle_border, 1); } BaseMenuObject::render(); @@ -222,4 +222,4 @@ public: settings::ArithmeticVariable *option{ nullptr }; }; -} // namespace zerokernel \ No newline at end of file +} // namespace zerokernel diff --git a/src/hacks/Aimbot.cpp b/src/hacks/Aimbot.cpp index 8d43eb6e..e8bfb7a1 100644 --- a/src/hacks/Aimbot.cpp +++ b/src/hacks/Aimbot.cpp @@ -1439,8 +1439,8 @@ static void DrawText() Vector oscreen; if (draw::WorldToScreen(calculated_data_array[i].aim_position, screen) && draw::WorldToScreen(ent->m_vecOrigin(), oscreen)) { - glez::draw::rect(screen.x - 2, screen.y - 2, 4, 4, colors::white); - glez::draw::line(oscreen.x, oscreen.y, screen.x - oscreen.x, screen.y - oscreen.y, colors::EntityF(ent), 0.5f); + draw::Rectangle(screen.x - 2, screen.y - 2, 4, 4, colors::white); + draw::Line(oscreen.x, oscreen.y, screen.x - oscreen.x, screen.y - oscreen.y, colors::EntityF(ent), 0.5f); } } } diff --git a/src/hacks/Backtrack.cpp b/src/hacks/Backtrack.cpp index 8ddc19fd..db4c5a88 100644 --- a/src/hacks/Backtrack.cpp +++ b/src/hacks/Backtrack.cpp @@ -201,9 +201,9 @@ static void Draw() size = abs(max.y - min.y); if (i == iBestTarget && j == BestTick) - glez::draw::rect(out.x, out.y, size / 2, size / 2, colors::red); + draw::Rectangle(out.x, out.y, size / 2, size / 2, colors::red); else - glez::draw::rect(out.x, out.y, size / 4, size / 4, colors::green); + draw::Rectangle(out.x, out.y, size / 4, size / 4, colors::green); } } } diff --git a/src/hacks/FollowBot.cpp b/src/hacks/FollowBot.cpp index c0de7779..4663c54f 100644 --- a/src/hacks/FollowBot.cpp +++ b/src/hacks/FollowBot.cpp @@ -577,14 +577,14 @@ static void draw() Vector wts1, wts2; if (draw::WorldToScreen(breadcrumbs[i], wts1) && draw::WorldToScreen(breadcrumbs[i + 1], wts2)) { - glez::draw::line(wts1.x, wts1.y, wts2.x - wts1.x, wts2.y - wts1.y, colors::white, 0.1f); + draw::Line(wts1.x, wts1.y, wts2.x - wts1.x, wts2.y - wts1.y, colors::white, 0.1f); } } Vector wts; if (!draw::WorldToScreen(breadcrumbs[0], wts)) return; - glez::draw::rect(wts.x - 4, wts.y - 4, 8, 8, colors::white); - glez::draw::rect_outline(wts.x - 4, wts.y - 4, 7, 7, colors::white, 1.0f); + draw::Rectangle(wts.x - 4, wts.y - 4, 8, 8, colors::white); + draw::RectangleOutlined(wts.x - 4, wts.y - 4, 7, 7, colors::white, 1.0f); } #endif diff --git a/src/hacks/LightESP.cpp b/src/hacks/LightESP.cpp index af93995f..02c79f8f 100644 --- a/src/hacks/LightESP.cpp +++ b/src/hacks/LightESP.cpp @@ -74,8 +74,8 @@ void draw() float minsize = 20.0f; if (size < minsize) size = minsize; - glez::draw::rect(out.x - fabsf(pout.x - pout2.x) / 4, out.y - fabsf(pout.y - pout2.y) / 4, fabsf(pout.x - pout2.x) / 2, fabsf(pout.y - pout2.y) / 2, hacks::shared::lightesp::LightESPColor(pEntity)); - glez::draw::rect(out.x - size / 8, out.y - size / 8, size / 4, size / 4, colors::red); + draw::Rectangle(out.x - fabsf(pout.x - pout2.x) / 4, out.y - fabsf(pout.y - pout2.y) / 4, fabsf(pout.x - pout2.x) / 2, fabsf(pout.y - pout2.y) / 2, hacks::shared::lightesp::LightESPColor(pEntity)); + draw::Rectangle(out.x - size / 8, out.y - size / 8, size / 4, size / 4, colors::red); } } } diff --git a/src/hacks/Misc.cpp b/src/hacks/Misc.cpp index 278a81b0..99921122 100644 --- a/src/hacks/Misc.cpp +++ b/src/hacks/Misc.cpp @@ -259,7 +259,7 @@ void DrawText() colors::rgba_t gaybow = colors::FromHSL(fabs(sin((g_GlobalVars->curtime / 2.0f) + (i / 1.41241f))) * 360.0f, 0.85f, 0.9f); gaybow.a = .5; // Draw next step - glez::draw::rect(0, step * (i - 1), width, (step * i) - (step * (i - 1)), gaybow); + draw::Rectangle(0, step * (i - 1), width, (step * i) - (step * (i - 1)), gaybow); } // int size_x; diff --git a/src/hacks/Radar.cpp b/src/hacks/Radar.cpp index 6caae6c8..97b704ee 100644 --- a/src/hacks/Radar.cpp +++ b/src/hacks/Radar.cpp @@ -101,7 +101,7 @@ void DrawEntity(int x, int y, CachedEntity *ent) else { tx_class[2 - idx][clazz - 1].draw(x + wtr.first, y + wtr.second, (int) icon_size, (int) icon_size, colors::white); - glez::draw::rect_outline(x + wtr.first, y + wtr.second, (int) icon_size, (int) icon_size, idx ? colors::blu_v : colors::red_v, 1.0f); + draw::RectangleOutlined(x + wtr.first, y + wtr.second, (int) icon_size, (int) icon_size, idx ? colors::blu_v : colors::red_v, 1.0f); } if (ent->m_iMaxHealth() && healthbar) @@ -110,8 +110,8 @@ void DrawEntity(int x, int y, CachedEntity *ent) clr = colors::Health(ent->m_iHealth(), ent->m_iMaxHealth()); if (healthp > 1.0f) healthp = 1.0f; - glez::draw::rect_outline(x + wtr.first, y + wtr.second + (int) icon_size, (int) icon_size, 4, colors::black, 0.5f); - glez::draw::rect(x + wtr.first + 1, y + wtr.second + (int) icon_size + 1, (*icon_size - 2.0f) * healthp, 2, clr); + draw::RectangleOutlined(x + wtr.first, y + wtr.second + (int) icon_size, (int) icon_size, 4, colors::black, 0.5f); + draw::Rectangle(x + wtr.first + 1, y + wtr.second + (int) icon_size + 1, (*icon_size - 2.0f) * healthp, 2, clr); } } else if (ent->m_Type() == ENTITY_BUILDING) @@ -176,8 +176,8 @@ void Draw() outlineclr = GUIColor(); - glez::draw::rect(x, y, radar_size, radar_size, colors::Transparent(colors::black, 0.4f)); - glez::draw::rect_outline(x, y, radar_size, radar_size, outlineclr, 0.5f); + draw::Rectangle(x, y, radar_size, radar_size, colors::Transparent(colors::black, 0.4f)); + draw::RectangleOutlined(x, y, radar_size, radar_size, outlineclr, 0.5f); if (enemies_over_teammates) enemies.clear(); @@ -207,11 +207,11 @@ void Draw() DrawEntity(x, y, LOCAL_E); const auto &wtr = WorldToRadar(g_pLocalPlayer->v_Origin.x, g_pLocalPlayer->v_Origin.y); if (!use_icons) - glez::draw::rect_outline(x + wtr.first, y + wtr.second, int(icon_size), int(icon_size), GUIColor(), 0.5f); + draw::RectangleOutlined(x + wtr.first, y + wtr.second, int(icon_size), int(icon_size), GUIColor(), 0.5f); } - glez::draw::line(x + half_size, y + half_size / 2, 0, half_size, colors::Transparent(GUIColor(), 0.4f), 0.5f); - glez::draw::line(x + half_size / 2, y + half_size, half_size, 0, colors::Transparent(GUIColor(), 0.4f), 0.5f); + draw::Line(x + half_size, y + half_size / 2, 0, half_size, colors::Transparent(GUIColor(), 0.4f), 0.5f); + draw::Line(x + half_size / 2, y + half_size, half_size, 0, colors::Transparent(GUIColor(), 0.4f), 0.5f); } InitRoutine init([]() { diff --git a/src/hacks/Walkbot.cpp b/src/hacks/Walkbot.cpp index 3c875c81..0c828573 100644 --- a/src/hacks/Walkbot.cpp +++ b/src/hacks/Walkbot.cpp @@ -1011,7 +1011,7 @@ void DrawConnection(index_t a, connection_s &b) else if ((a_.flags & b_.flags) & NF_DUCK) color = &colors::green; - glez::draw::line(wts_a.x, wts_a.y, wts_c.x - wts_a.x, wts_c.y - wts_a.y, *color, 0.5f); + draw::Line(wts_a.x, wts_a.y, wts_c.x - wts_a.x, wts_c.y - wts_a.y, *color, 0.5f); if (draw_connection_flags && b.flags != CF_GOOD) { @@ -1060,7 +1060,7 @@ void DrawNode(index_t node, bool draw_back) if (node == state::active_node) color = &colors::red; - glez::draw::rect(wts.x - node_size, wts.y - node_size, 2 * node_size, 2 * node_size, *color); + draw::Rectangle(wts.x - node_size, wts.y - node_size, 2 * node_size, 2 * node_size, *color); } if (draw_indices) diff --git a/src/navparser.cpp b/src/navparser.cpp index ba700b41..170e0189 100644 --- a/src/navparser.cpp +++ b/src/navparser.cpp @@ -637,14 +637,14 @@ static void drawcrumbs() Vector wts1, wts2; if (draw::WorldToScreen(crumbs[i], wts1) && draw::WorldToScreen(crumbs[i + 1], wts2)) { - glez::draw::line(wts1.x, wts1.y, wts2.x - wts1.x, wts2.y - wts1.y, colors::white, 0.3f); + draw::Line(wts1.x, wts1.y, wts2.x - wts1.x, wts2.y - wts1.y, colors::white, 0.3f); } } Vector wts; if (!draw::WorldToScreen(crumbs[0], wts)) return; - glez::draw::rect(wts.x - 4, wts.y - 4, 8, 8, colors::white); - glez::draw::rect_outline(wts.x - 4, wts.y - 4, 7, 7, colors::white, 1.0f); + draw::Rectangle(wts.x - 4, wts.y - 4, 8, 8, colors::white); + draw::RectangleOutlined(wts.x - 4, wts.y - 4, 7, 7, colors::white, 1.0f); } #endif diff --git a/src/prediction.cpp b/src/prediction.cpp index ca9387ab..ec4b5462 100644 --- a/src/prediction.cpp +++ b/src/prediction.cpp @@ -101,7 +101,7 @@ void Prediction_PaintTraverse() Vector screen; if (draw::WorldToScreen(predicted_players[i][j], screen)) { - glez::draw::line(screen.x, screen.y, previous_screen.x - screen.x, previous_screen.y - screen.y, color, 0.5f); + draw::Line(screen.x, screen.y, previous_screen.x - screen.x, previous_screen.y - screen.y, color, 0.5f); previous_screen = screen; } else diff --git a/src/visual/drawing.cpp b/src/visual/drawing.cpp index 30622368..4fc0487a 100644 --- a/src/visual/drawing.cpp +++ b/src/visual/drawing.cpp @@ -101,7 +101,8 @@ void Initialize() fonts::menu.reset(new glez::font(DATA_PATH "/fonts/verasans.ttf", 14)); fonts::esp.reset(new glez::font(DATA_PATH "/fonts/verasans.ttf", 14)); fonts::surface_font = g_ISurface->CreateFont(); - g_ISurface->SetFontGlyphSet(fonts::surface_font, "TF2 Build", 14, 500, 0, 0, vgui::ISurface::FONTFLAG_NONE); + g_ISurface->SetFontGlyphSet(fonts::surface_font, "Verasans", 15, 500, 0, 0, vgui::ISurface::FONTFLAG_ANTIALIAS | vgui::ISurface::FONTFLAG_ADDITIVE); + g_ISurface->AddCustomFontFile("Verasans", DATA_PATH "/fonts/verasans.ttf"); texture_white = g_ISurface->CreateNewTextureID(); unsigned char colorBuffer[4] = { 255, 255, 255, 255 }; diff --git a/src/visual/menu/menu/BaseMenuObject.cpp b/src/visual/menu/menu/BaseMenuObject.cpp index e24566fb..23c7e51c 100644 --- a/src/visual/menu/menu/BaseMenuObject.cpp +++ b/src/visual/menu/menu/BaseMenuObject.cpp @@ -9,6 +9,7 @@ #include #include #include +#include namespace zerokernel { @@ -210,12 +211,12 @@ bool BaseMenuObject::containsMouse() void BaseMenuObject::renderBackground(glez::rgba color) { - glez::draw::rect(bb.getBorderBox().x, bb.getBorderBox().y, bb.getBorderBox().width, bb.getBorderBox().height, color); + draw::Rectangle(bb.getBorderBox().x, bb.getBorderBox().y, bb.getBorderBox().width, bb.getBorderBox().height, color); } void BaseMenuObject::renderBorder(glez::rgba color) { - glez::draw::rect_outline(bb.getBorderBox().x, bb.getBorderBox().y, bb.getBorderBox().width, bb.getBorderBox().height, color, 1.0f); + draw::RectangleOutlined(bb.getBorderBox().x, bb.getBorderBox().y, bb.getBorderBox().width, bb.getBorderBox().height, color, 1.0f); } void BaseMenuObject::onParentSizeUpdate() @@ -295,7 +296,7 @@ void BaseMenuObject::renderDebugOverlay() { int t = int(this); t *= 13737373 + 487128758242; - glez::draw::rect(bb.getBorderBox().x, bb.getBorderBox().y, bb.getBorderBox().width, bb.getBorderBox().height, glez::rgba(t & 0xFF, (t >> 8) & 0xFF, (t >> 16) & 0xFF, 80)); + draw::Rectangle(bb.getBorderBox().x, bb.getBorderBox().y, bb.getBorderBox().width, bb.getBorderBox().height, glez::rgba(t & 0xFF, (t >> 8) & 0xFF, (t >> 16) & 0xFF, 80)); } // Container classes should call renderDebugOverlay() on children } @@ -310,4 +311,4 @@ bool BaseMenuObject::onLeftMouseClick() emit(msg, false); return false; } -} // namespace zerokernel \ No newline at end of file +} // namespace zerokernel diff --git a/src/visual/menu/menu/objects/TabButton.cpp b/src/visual/menu/menu/objects/TabButton.cpp index 11753720..5c3d6d72 100644 --- a/src/visual/menu/menu/objects/TabButton.cpp +++ b/src/visual/menu/menu/objects/TabButton.cpp @@ -37,14 +37,14 @@ void TabButton::render() { renderBackground(*color_selected); // TODO magic numbers? - glez::draw::line(bb.getBorderBox().x + 6, bb.getBorderBox().bottom() - 3, bb.getBorderBox().width - 12, 0, *color_selected_underline, 1); + draw::Line(bb.getBorderBox().x + 6, bb.getBorderBox().bottom() - 3, bb.getBorderBox().width - 12, 0, *color_selected_underline, 1); } else if (isHovered()) { - glez::draw::line(bb.getBorderBox().x + 6, bb.getBorderBox().bottom() - 3, bb.getBorderBox().width - 12, 0, *color_hover_underline, 1); + draw::Line(bb.getBorderBox().x + 6, bb.getBorderBox().bottom() - 3, bb.getBorderBox().width - 12, 0, *color_hover_underline, 1); } - glez::draw::line(bb.getBorderBox().right(), bb.getBorderBox().top(), 0, bb.getBorderBox().height, *color_separator, 1); + draw::Line(bb.getBorderBox().right(), bb.getBorderBox().top(), 0, bb.getBorderBox().height, *color_separator, 1); text.setColorText(selected ? &*color_text_selected : &*color_text); text.render(); diff --git a/src/visual/menu/menu/objects/container/Box.cpp b/src/visual/menu/menu/objects/container/Box.cpp index 7ed06698..56072040 100644 --- a/src/visual/menu/menu/objects/container/Box.cpp +++ b/src/visual/menu/menu/objects/container/Box.cpp @@ -26,16 +26,16 @@ void zerokernel::Box::render() int tht = bb.getBorderBox().top() + ht; // Top left - glez::draw::line(lhl, tht, hl, 0, *color_border, 1); + draw::Line(lhl, tht, hl, 0, *color_border, 1); // Top right int title_width = title.getBoundingBox().getFullBox().width; - glez::draw::line(bb.getBorderBox().left() + bb.padding.left + title_width, tht, bb.getBorderBox().width - bb.padding.left - title_width - hr, 0, *color_border, 1); + draw::Line(bb.getBorderBox().left() + bb.padding.left + title_width, tht, bb.getBorderBox().width - bb.padding.left - title_width - hr, 0, *color_border, 1); // Left - glez::draw::line(lhl, tht, 0, bb.getBorderBox().height - ht - hb, *color_border, 1); + draw::Line(lhl, tht, 0, bb.getBorderBox().height - ht - hb, *color_border, 1); // Bottom - glez::draw::line(lhl, bb.getBorderBox().bottom() - hb, bb.getBorderBox().width - hl - hr, 0, *color_border, 1); + draw::Line(lhl, bb.getBorderBox().bottom() - hb, bb.getBorderBox().width - hl - hr, 0, *color_border, 1); // Right - glez::draw::line(bb.getBorderBox().right() - hr, tht, 0, bb.getBorderBox().height - ht - hb, *color_border, 1); + draw::Line(bb.getBorderBox().right() - hr, tht, 0, bb.getBorderBox().height - ht - hb, *color_border, 1); } else { @@ -44,7 +44,7 @@ void zerokernel::Box::render() int ht = bb.padding.top / 2; int hb = bb.padding.bottom / 2; - glez::draw::rect_outline(bb.getBorderBox().left() + hl, bb.getBorderBox().top() + ht, bb.getBorderBox().width - hl - hr, bb.getBorderBox().height - ht - hb, *color_border, 1); + draw::RectangleOutlined(bb.getBorderBox().left() + hl, bb.getBorderBox().top() + ht, bb.getBorderBox().width - hl - hr, bb.getBorderBox().height - ht - hb, *color_border, 1); } // Render the title diff --git a/src/visual/menu/menu/objects/container/ModalColorSelect.cpp b/src/visual/menu/menu/objects/container/ModalColorSelect.cpp index 0c66822f..bb3fad1c 100644 --- a/src/visual/menu/menu/objects/container/ModalColorSelect.cpp +++ b/src/visual/menu/menu/objects/container/ModalColorSelect.cpp @@ -15,8 +15,8 @@ void ModalColorSelect::render() if (preview_enabled) { - glez::draw::rect(preview_x + bb.getContentBox().x, preview_y + bb.getContentBox().y, preview_size, preview_size, *option); - glez::draw::rect_outline(preview_x + bb.getContentBox().x, preview_y + bb.getContentBox().y, preview_size, preview_size, *color_border, 1); + draw::Rectangle(preview_x + bb.getContentBox().x, preview_y + bb.getContentBox().y, preview_size, preview_size, *option); + draw::RectangleOutlined(preview_x + bb.getContentBox().x, preview_y + bb.getContentBox().y, preview_size, preview_size, *color_border, 1); } } diff --git a/src/visual/menu/menu/objects/container/TabSelection.cpp b/src/visual/menu/menu/objects/container/TabSelection.cpp index 08dcf477..aaf299fd 100644 --- a/src/visual/menu/menu/objects/container/TabSelection.cpp +++ b/src/visual/menu/menu/objects/container/TabSelection.cpp @@ -14,7 +14,7 @@ namespace zerokernel void TabSelection::render() { Container::render(); - glez::draw::line(bb.getBorderBox().left(), bb.getBorderBox().bottom() - 1, bb.getBorderBox().width, 0, *color_border, 1); + draw::Line(bb.getBorderBox().left(), bb.getBorderBox().bottom() - 1, bb.getBorderBox().width, 0, *color_border, 1); } void TabSelection::add(const std::string &option) diff --git a/src/visual/menu/menu/objects/container/Table.cpp b/src/visual/menu/menu/objects/container/Table.cpp index 77371174..a50ea12f 100644 --- a/src/visual/menu/menu/objects/container/Table.cpp +++ b/src/visual/menu/menu/objects/container/Table.cpp @@ -18,13 +18,13 @@ void zerokernel::Table::render() int acc{ 1 }; for (size_t i = 0; i < columns.size() - 1; ++i) { - glez::draw::line(bb.getBorderBox().left() + columns[i].width + acc, bb.getBorderBox().top(), 0, bb.getBorderBox().height, *color_border, 1); + draw::Line(bb.getBorderBox().left() + columns[i].width + acc, bb.getBorderBox().top(), 0, bb.getBorderBox().height, *color_border, 1); acc += columns[i].width + 1; } // Horizontal separators for (size_t i = 1; i < objects.size(); ++i) { - glez::draw::line(bb.getBorderBox().left(), objects[i]->getBoundingBox().getBorderBox().top() - 1, bb.getBorderBox().width, 0, *color_border, 1); + draw::Line(bb.getBorderBox().left(), objects[i]->getBoundingBox().getBorderBox().top() - 1, bb.getBorderBox().width, 0, *color_border, 1); } } diff --git a/src/visual/menu/menu/objects/input/Checkbox.cpp b/src/visual/menu/menu/objects/input/Checkbox.cpp index 3f7492fa..ce27ad68 100644 --- a/src/visual/menu/menu/objects/input/Checkbox.cpp +++ b/src/visual/menu/menu/objects/input/Checkbox.cpp @@ -38,9 +38,9 @@ void zerokernel::Checkbox::render() renderBorder(*color_border); auto cb = bb.getContentBox(); if (**option) - glez::draw::rect(cb.x, cb.y, cb.width, cb.height, *color_checked); + draw::Rectangle(cb.x, cb.y, cb.width, cb.height, *color_checked); else if (isHovered()) - glez::draw::rect(cb.x, cb.y, cb.width, cb.height, *color_hover); + draw::Rectangle(cb.x, cb.y, cb.width, cb.height, *color_hover); } else { diff --git a/src/visual/menu/menu/objects/input/ColorSelector.cpp b/src/visual/menu/menu/objects/input/ColorSelector.cpp index 9cc647f4..7b7a1bc6 100644 --- a/src/visual/menu/menu/objects/input/ColorSelector.cpp +++ b/src/visual/menu/menu/objects/input/ColorSelector.cpp @@ -33,7 +33,7 @@ void ColorSelector::render() if (variable) { auto pb = bb.getContentBox(); - glez::draw::rect(pb.left(), pb.top(), pb.width, pb.height, **variable); + draw::Rectangle(pb.left(), pb.top(), pb.width, pb.height, **variable); } } diff --git a/src/visual/menu/menu/special/TreeListBaseEntry.cpp b/src/visual/menu/menu/special/TreeListBaseEntry.cpp index 69276679..44d5e52e 100644 --- a/src/visual/menu/menu/special/TreeListBaseEntry.cpp +++ b/src/visual/menu/menu/special/TreeListBaseEntry.cpp @@ -26,11 +26,11 @@ void zerokernel::TreeListBaseEntry::render() for (int i = 0; i <= int(depth) - 1; ++i) { - glez::draw::line(bb.getBorderBox().left() + 2 + i * 5, bb.getBorderBox().top() - 1, 0, bb.getBorderBox().height + 3, *lines, 1); + draw::Line(bb.getBorderBox().left() + 2 + i * 5, bb.getBorderBox().top() - 1, 0, bb.getBorderBox().height + 3, *lines, 1); } if (depth) { - glez::draw::line(bb.getBorderBox().left() + getRenderOffset() - 8, bb.getBorderBox().top() + bb.getBorderBox().height / 2, 4, 0, *lines, 1); + draw::Line(bb.getBorderBox().left() + getRenderOffset() - 8, bb.getBorderBox().top() + bb.getBorderBox().height / 2, 4, 0, *lines, 1); } BaseMenuObject::render(); diff --git a/src/visual/menu/menu/wm/WindowCloseButton.cpp b/src/visual/menu/menu/wm/WindowCloseButton.cpp index ea91eb5a..7d532cb3 100644 --- a/src/visual/menu/menu/wm/WindowCloseButton.cpp +++ b/src/visual/menu/menu/wm/WindowCloseButton.cpp @@ -16,7 +16,7 @@ void zerokernel::WindowCloseButton::render() { auto cb = bb.getBorderBox(); if (isHovered()) - glez::draw::rect(cb.left(), cb.top(), cb.width, cb.height - 1, *background_hover); + draw::Rectangle(cb.left(), cb.top(), cb.width, cb.height - 1, *background_hover); // glez::draw::line(cb.left(), cb.top(), 0, cb.height, *color_border, 1); renderBorder(*color_border); glez::draw::rect_textured(cb.x + 1, cb.y, cb.width, cb.height, glez::color::white, cross, 0, 0, cb.width, cb.height, 0);