Pink NullCore
This commit is contained in:
parent
1efd526da3
commit
0b45138372
@ -50,16 +50,15 @@ constexpr int Create(int r, int g, int b, int a) {
|
|||||||
unsigned char _g = (g) & 0xFF;
|
unsigned char _g = (g) & 0xFF;
|
||||||
unsigned char _b = (b) & 0xFF;
|
unsigned char _b = (b) & 0xFF;
|
||||||
unsigned char _a = (a) & 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) {
|
constexpr int Transparent(int base, float mod = 0.5f) {
|
||||||
unsigned char _r = (base >> 24) & 0xFF;
|
unsigned char _a = (base >> 24) & 0xFF;
|
||||||
unsigned char _g = (base >> 16) & 0xFF;
|
unsigned char _b = (base >> 16) & 0xFF;
|
||||||
unsigned char _b = (base >> 8) & 0xFF;
|
unsigned char _g = (base >> 8) & 0xFF;
|
||||||
unsigned char _a = (base) & 0xFF;
|
unsigned char _r = (base) & 0xFF;
|
||||||
_a *= mod;
|
return Create(_r, _g, _b, (int)((float)(_a) * mod));
|
||||||
return Create(_r, _g, _b, _a * mod);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int FromHSL(float h, float s, float l);
|
int FromHSL(float h, float s, float l);
|
||||||
|
@ -111,7 +111,7 @@ void CatGUI::Update() {
|
|||||||
if (!m_bShowTooltip && m_pTooltip->IsVisible()) m_pTooltip->Hide();
|
if (!m_bShowTooltip && m_pTooltip->IsVisible()) m_pTooltip->Hide();
|
||||||
root->Draw(0, 0);
|
root->Draw(0, 0);
|
||||||
draw::DrawRect(m_iMouseX - 5, m_iMouseY - 5, 10, 10, colors::Transparent(colors::white));
|
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) {
|
if (gui_draw_bounds) {
|
||||||
root->DrawBounds(0, 0);
|
root->DrawBounds(0, 0);
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
namespace menu { namespace ncc {
|
namespace menu { namespace ncc {
|
||||||
|
|
||||||
Item::Item() {
|
Item::Item() : CBaseWidget("ncc_menu_item", nullptr) {
|
||||||
SetSize(220, 16);
|
SetSize(220, 16);
|
||||||
SetMaxSize(220, 16);
|
SetMaxSize(220, 16);
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ ItemSublist::ItemSublist(std::string title, List* list) :
|
|||||||
|
|
||||||
void ItemSublist::Draw(int x, int y) {
|
void ItemSublist::Draw(int x, int y) {
|
||||||
Item::Draw(x, 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) {
|
void ItemSublist::OnKeyPress(ButtonCode_t code, bool repeated) {
|
||||||
|
@ -12,13 +12,13 @@
|
|||||||
|
|
||||||
namespace menu { namespace ncc {
|
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) {
|
void ItemTitle::Draw(int x, int y) {
|
||||||
Item::Draw(x, y);
|
Item::Draw(x, y);
|
||||||
const std::string str = format(">>> ", title, " <<<");
|
const std::string str = format(">>> ", title, " <<<");
|
||||||
const auto& size = draw::GetStringLength(font_title, str);
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
@ -19,8 +19,8 @@ unsigned long font_item = 0;
|
|||||||
void Init() {
|
void Init() {
|
||||||
font_title = g_ISurface->CreateFont();
|
font_title = g_ISurface->CreateFont();
|
||||||
font_item = 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 Bold", 14, 0, 0, 0, 0x0);
|
||||||
g_ISurface->SetFontGlyphSet(font_title, "Verdana", 10, 0, 0, 0, 0x0);
|
g_ISurface->SetFontGlyphSet(font_item, "Verdana", 12, 0, 0, 0, 0x0);
|
||||||
// TODO add stuff
|
// TODO add stuff
|
||||||
MainList().AddChild(new ItemSublist("Aim Bot", nullptr));
|
MainList().AddChild(new ItemSublist("Aim Bot", nullptr));
|
||||||
MainList().AddChild(new ItemSublist("Trigger Bot", nullptr));
|
MainList().AddChild(new ItemSublist("Trigger Bot", nullptr));
|
||||||
|
@ -17,9 +17,9 @@ namespace menu { namespace ncc {
|
|||||||
extern unsigned long font_title; // Verdana Bold 10px
|
extern unsigned long font_title; // Verdana Bold 10px
|
||||||
extern unsigned long font_item; // Verdana 10px
|
extern unsigned long font_item; // Verdana 10px
|
||||||
|
|
||||||
constexpr int color_fg = colors::Create(15, 150, 150, 255);
|
const int color_fg = colors::Create(255, 105, 180, 255);//colors::Create(15, 150, 150, 255);
|
||||||
constexpr int color_bg = colors::Transparent(color_fg, 0.07f);
|
const int color_bg = colors::Transparent(color_fg, 0.07f);
|
||||||
constexpr int color_bg_hover = colors::Transparent(color_fg, 0.30f);
|
const int color_bg_hover = colors::Transparent(color_fg, 0.32f);
|
||||||
|
|
||||||
void Init();
|
void Init();
|
||||||
List& MainList();
|
List& MainList();
|
||||||
|
@ -10,10 +10,17 @@
|
|||||||
|
|
||||||
namespace menu { namespace ncc {
|
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() {
|
void Root::Setup() {
|
||||||
AddChild(&menu::ncc::MainList());
|
AddChild(&menu::ncc::MainList());
|
||||||
|
menu::ncc::MainList().SetOffset(500, 500);
|
||||||
}
|
}
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
@ -16,6 +16,7 @@ class Root : public CBaseWindow {
|
|||||||
public:
|
public:
|
||||||
Root();
|
Root();
|
||||||
void Setup();
|
void Setup();
|
||||||
|
virtual void Draw(int x, int y) override;
|
||||||
inline virtual void MoveChildren() override {};
|
inline virtual void MoveChildren() override {};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user