diff --git a/src/drawing.h b/src/drawing.h index be254b94..9ee16702 100644 --- a/src/drawing.h +++ b/src/drawing.h @@ -50,16 +50,15 @@ constexpr int Create(int r, int g, int b, int a) { unsigned char _g = (g) & 0xFF; unsigned char _b = (b) & 0xFF; unsigned char _a = (a) & 0xFF; - return (int)(_r << 24) | (int)(_g << 16) | (int)(_b << 8) | (int)_a; + return (int)(_r) | (int)(_g << 8) | (int)(_b << 16) | (int)(_a << 24); } constexpr int Transparent(int base, float mod = 0.5f) { - unsigned char _r = (base >> 24) & 0xFF; - unsigned char _g = (base >> 16) & 0xFF; - unsigned char _b = (base >> 8) & 0xFF; - unsigned char _a = (base) & 0xFF; - _a *= mod; - return Create(_r, _g, _b, _a * mod); + unsigned char _a = (base >> 24) & 0xFF; + unsigned char _b = (base >> 16) & 0xFF; + unsigned char _g = (base >> 8) & 0xFF; + unsigned char _r = (base) & 0xFF; + return Create(_r, _g, _b, (int)((float)(_a) * mod)); } int FromHSL(float h, float s, float l); diff --git a/src/gui/GUI.cpp b/src/gui/GUI.cpp index 8e85b2a0..21fd3edc 100644 --- a/src/gui/GUI.cpp +++ b/src/gui/GUI.cpp @@ -111,7 +111,7 @@ void CatGUI::Update() { if (!m_bShowTooltip && m_pTooltip->IsVisible()) m_pTooltip->Hide(); root->Draw(0, 0); draw::DrawRect(m_iMouseX - 5, m_iMouseY - 5, 10, 10, colors::Transparent(colors::white)); - draw::OutlineRect(m_iMouseX - 5, m_iMouseY - 5, 10, 10, colors::pink); + draw::OutlineRect(m_iMouseX - 5, m_iMouseY - 5, 10, 10, gui_nullcore ? menu::ncc::color_fg : colors::pink); if (gui_draw_bounds) { root->DrawBounds(0, 0); } diff --git a/src/gui/ncc/Item.cpp b/src/gui/ncc/Item.cpp index 62e496bf..05245c15 100644 --- a/src/gui/ncc/Item.cpp +++ b/src/gui/ncc/Item.cpp @@ -12,7 +12,7 @@ namespace menu { namespace ncc { -Item::Item() { +Item::Item() : CBaseWidget("ncc_menu_item", nullptr) { SetSize(220, 16); SetMaxSize(220, 16); } diff --git a/src/gui/ncc/ItemSublist.cpp b/src/gui/ncc/ItemSublist.cpp index 6f846132..2fcbead6 100644 --- a/src/gui/ncc/ItemSublist.cpp +++ b/src/gui/ncc/ItemSublist.cpp @@ -18,7 +18,7 @@ ItemSublist::ItemSublist(std::string title, List* list) : void ItemSublist::Draw(int x, int y) { Item::Draw(x, y); - draw::String(font_item, x + 2, y + 2, colors::white, 2, format((IsHovered() ? "[-] " : "[+] "), title)); + draw::String(font_item, x + 2, y, colors::white, 2, format((IsHovered() ? "[-] " : "[+] "), title)); } void ItemSublist::OnKeyPress(ButtonCode_t code, bool repeated) { diff --git a/src/gui/ncc/ItemTitle.cpp b/src/gui/ncc/ItemTitle.cpp index 7d2ab83a..5acfe900 100644 --- a/src/gui/ncc/ItemTitle.cpp +++ b/src/gui/ncc/ItemTitle.cpp @@ -12,13 +12,13 @@ namespace menu { namespace ncc { -ItemTitle::ItemTitle(std::string title) : title(title) {} +ItemTitle::ItemTitle(std::string title) : Item(), title(title) {} void ItemTitle::Draw(int x, int y) { Item::Draw(x, y); const std::string str = format(">>> ", title, " <<<"); const auto& size = draw::GetStringLength(font_title, str); - draw::String(font_title, 220 - size.first / 2, y + 2, colors::white, 2, str); + draw::String(font_title, x + (110 - size.first / 2), y, colors::white, 2, str); } }} diff --git a/src/gui/ncc/Menu.cpp b/src/gui/ncc/Menu.cpp index fd5d68f8..461d9293 100644 --- a/src/gui/ncc/Menu.cpp +++ b/src/gui/ncc/Menu.cpp @@ -19,8 +19,8 @@ unsigned long font_item = 0; void Init() { font_title = g_ISurface->CreateFont(); font_item = g_ISurface->CreateFont(); - g_ISurface->SetFontGlyphSet(font_title, "Verdana Bold", 10, 0, 0, 0, 0x0); - g_ISurface->SetFontGlyphSet(font_title, "Verdana", 10, 0, 0, 0, 0x0); + g_ISurface->SetFontGlyphSet(font_title, "Verdana Bold", 14, 0, 0, 0, 0x0); + g_ISurface->SetFontGlyphSet(font_item, "Verdana", 12, 0, 0, 0, 0x0); // TODO add stuff MainList().AddChild(new ItemSublist("Aim Bot", nullptr)); MainList().AddChild(new ItemSublist("Trigger Bot", nullptr)); diff --git a/src/gui/ncc/Menu.hpp b/src/gui/ncc/Menu.hpp index 0c94b4ba..90142fb4 100644 --- a/src/gui/ncc/Menu.hpp +++ b/src/gui/ncc/Menu.hpp @@ -17,9 +17,9 @@ namespace menu { namespace ncc { extern unsigned long font_title; // Verdana Bold 10px extern unsigned long font_item; // Verdana 10px -constexpr int color_fg = colors::Create(15, 150, 150, 255); -constexpr int color_bg = colors::Transparent(color_fg, 0.07f); -constexpr int color_bg_hover = colors::Transparent(color_fg, 0.30f); +const int color_fg = colors::Create(255, 105, 180, 255);//colors::Create(15, 150, 150, 255); +const int color_bg = colors::Transparent(color_fg, 0.07f); +const int color_bg_hover = colors::Transparent(color_fg, 0.32f); void Init(); List& MainList(); diff --git a/src/gui/ncc/Root.cpp b/src/gui/ncc/Root.cpp index db9b3090..8a84f63c 100644 --- a/src/gui/ncc/Root.cpp +++ b/src/gui/ncc/Root.cpp @@ -10,10 +10,17 @@ namespace menu { namespace ncc { -Root::Root() : CBaseWindow("root_nullcore", nullptr) {} +Root::Root() : CBaseWindow("root_nullcore", nullptr) { + SetMaxSize(draw::width, draw::height); +} + +void Root::Draw(int x, int y) { + CBaseContainer::Draw(x, y); +} void Root::Setup() { AddChild(&menu::ncc::MainList()); + menu::ncc::MainList().SetOffset(500, 500); } }} diff --git a/src/gui/ncc/Root.hpp b/src/gui/ncc/Root.hpp index c2228c34..a2504a3e 100644 --- a/src/gui/ncc/Root.hpp +++ b/src/gui/ncc/Root.hpp @@ -16,6 +16,7 @@ class Root : public CBaseWindow { public: Root(); void Setup(); + virtual void Draw(int x, int y) override; inline virtual void MoveChildren() override {}; };