You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm calling this in present btw.
The text moves accordingly but nothing else also I will post a fix if I find one.
Setting up like this:
`
void line(int x, int y, int x2, int y2, zgui::color c) noexcept
{
g_render.Line(x, y, x2, y2, { c.r, c.g, c.b, c.a });
}
void rect(int x, int y, int x2, int y2, zgui::color c) noexcept
{ /* draw outlined rectangle using your renderer /
g_render.Rect(x, y, x2, y2, { c.r, c.g, c.b, c.a });
}
void filled_rect(int x, int y, int x2, int y2, zgui::color c) noexcept
{ / draw filled rectangle using your renderer /
g_render.RectFilled(x, y, x2, y2, { c.r, c.g, c.b, c.a });
}
void text(int x, int y, zgui::color color, int font, bool center, const char text) noexcept
{ /* draw text using your renderer /
g_render.String(x, y, center ? FONT_CENTERED_X | FONT_DROPSHADOW : FONT_DROPSHADOW, { color.r, color.g, color.b, color.a }, g_fonts.fonts[font], text);
}
void get_text_size(unsigned long font, const char text, int& wide, int& tall) noexcept
{ /* calculate text size here /
auto p = get_text_dimensions(g_fonts.fonts[font], true, text); wide = p.x; tall = p.y;
}
float get_frametime() noexcept
{ / return frametime */
return g_globals->absoluteframetime;
}
`
void zgui_menu::render()
{
zgui::poll_input("Counter-Strike: Global Offensive");
static bool example = false;
static int example_int = 10;
if (zgui::begin_window("zgui example window", { 500, 350 }, FONT_ESP, zgui::zgui_window_flags_none))
{
zgui::checkbox("sample checkbox #example", example);
// value before hash is visible ^
zgui::slider_int("#sample_slider", 0, 40, example_int);
// ^ value after hash is hidden"
//
// Hashing is demystified in zgui.hh
// Search for [hashing controls names] to get more details.
zgui::end_window();
}
}
`
The text was updated successfully, but these errors were encountered:
Menu doesn't resize on move or the menu elements.
I'm calling this in present btw.
The text moves accordingly but nothing else also I will post a fix if I find one.
Setting up like this:
`
void line(int x, int y, int x2, int y2, zgui::color c) noexcept
{
g_render.Line(x, y, x2, y2, { c.r, c.g, c.b, c.a });
}
void rect(int x, int y, int x2, int y2, zgui::color c) noexcept
{ /* draw outlined rectangle using your renderer /
g_render.Rect(x, y, x2, y2, { c.r, c.g, c.b, c.a });
}
void filled_rect(int x, int y, int x2, int y2, zgui::color c) noexcept
{ / draw filled rectangle using your renderer /
g_render.RectFilled(x, y, x2, y2, { c.r, c.g, c.b, c.a });
}
void text(int x, int y, zgui::color color, int font, bool center, const char text) noexcept
{ /* draw text using your renderer /
g_render.String(x, y, center ? FONT_CENTERED_X | FONT_DROPSHADOW : FONT_DROPSHADOW, { color.r, color.g, color.b, color.a }, g_fonts.fonts[font], text);
}
void get_text_size(unsigned long font, const char text, int& wide, int& tall) noexcept
{ /* calculate text size here /
auto p = get_text_dimensions(g_fonts.fonts[font], true, text); wide = p.x; tall = p.y;
}
float get_frametime() noexcept
{ / return frametime */
return g_globals->absoluteframetime;
}
zgui::functions.draw_line = line;
zgui::functions.draw_rect = rect;
zgui::functions.draw_filled_rect = filled_rect;
zgui::functions.draw_text = text;
zgui::functions.get_text_size = get_text_size;
zgui::functions.get_frametime = get_frametime;
`
Rendering:
`
void zgui_menu::render()
{
zgui::poll_input("Counter-Strike: Global Offensive");
}
`
The text was updated successfully, but these errors were encountered: