Open Dreams0001 opened 3 years ago
Learn c++, quit pasting code, and don't bullshit that you don't like imgui because I know damn well you do but you can't paste it into ur project lol
Sent from GitHub for iPhone
`void menu_framework::combobox(int size, const std::string string, std::string* items, int& value) { GetCursorPos(&cursor);
if (next_y_position + 15 - (groupbox_value * 15) > 290 || (next_y_position - 45 - (groupbox_value*15)) < -1) {
groupbox_y_pos += rendered ? 0 : 15;
}
else {
int w = 180, h = 10;
int ix = variables::menu::x + 365;
int yi = variables::menu::y + next_y_group + 5;
if ((cursor.x > variables::menu::x + 195) && (cursor.x < variables::menu::x + 187 + w) && (cursor.y > variables::menu::y + next_y_group) && (cursor.y < variables::menu::y + next_y_group + h))
{
if (GetAsyncKeyState(VK_LBUTTON) & 1)
{
combobox_opened[combobox_count] = !combobox_opened[combobox_count];
}
}
//combo background
render::draw_filled_rect(variables::menu::x + 195, variables::menu::y + next_y_group, w, h, color(36, 36, 36, 255));
render::text(variables::menu::x + 195 + 90 - (render::get_text_size(render::fonts::watermark_font, items[value]).x / 2), variables::menu::y + next_y_group - 2, render::fonts::watermark_font, items[value], false, color::white());
//combo label
render::text(variables::menu::x + next_x_position + 2, variables::menu::y + next_y_group - 1, render::fonts::watermark_font, string, false, color::white());
if (combobox_opened[combobox_count]) {
if ((cursor.x > ix) && (cursor.x < ix + 6) && (cursor.y > yi) && (cursor.y < yi + min(size * 15, 5 * 15)) && (GetAsyncKeyState(VK_LBUTTON))) {
combo_value[combobox_count] = min((cursor.y - yi) / (float(min(size * 15, 5 * 15)) / float(combobox_y[combobox_count] / 15 + 1)), combobox_y[combobox_count] / 15);
}
for (int i = 0; i < size; i++) {
if (i * 15 + 15 - (combo_value[combobox_count] * 15) > 75 || i*15 - (combo_value[combobox_count] * 15) < -1) {
combobox_y[combobox_count] += combobox_rendered[combobox_count] ? 0 : 15;
}
else {
bool var = false;
if ((cursor.x > variables::menu::x + 195) && (cursor.x < variables::menu::x + 187 + w) && (cursor.y > variables::menu::y + next_y_group + ((i + 1) * 15) - (combo_value[combobox_count] * 15)) && (cursor.y < variables::menu::y + next_y_group + ((i + 1) * 15) + 12 - (combo_value[combobox_count] * 15))) {
var = true;
if (GetAsyncKeyState(VK_LBUTTON) & 1) {
value = i;
combobox_opened[combobox_count] = false;
}
}
render::draw_filled_rect(variables::menu::x + 195, variables::menu::y + next_y_group + h + (15 * i) - (combo_value[combobox_count] * 15), w, (15), color(36, 36, 36, 255));
render::text(variables::menu::x + 195 + 90 - (render::get_text_size(render::fonts::watermark_font, items[i].c_str()).x / 2), variables::menu::y + next_y_group + 12 + (15 * i) - (combo_value[combobox_count] * 15), render::fonts::watermark_font, items[i].c_str(), false, var ? color::white() : i == value ? variables::ui_color : color(128, 128, 128, 255));
}
}
combobox_rendered[combobox_count] = true;
render::draw_filled_rect(ix, yi, 6, min(size * 15, 5 * 15), color(66, 66, 66, 255));
render::draw_filled_rect(ix, yi, 6, combo_value[combobox_count] * (float(min(size * 15, 5 * 15)) / float(combobox_y[combobox_count] / 15)), color(variables::ui_color.r, variables::ui_color.g, variables::ui_color.b, 255));
}
else {
combobox_y[combobox_count] = 0;
combobox_rendered[combobox_count] = false;
}
if (combobox_opened[combobox_count])
{
next_y_group += min(size*17, 5*17);
next_y_position += min(size*17, 5*17);
}
combobox_count++;
next_y_group += 15;
}
next_y_position += 15;
}`
lmfao mad ?? nah ImGui is just trash
i literally have a zip file of u being a clown
100% lol
i literally have a zip file of u being a clown
quit cheating on amatuerz bro
so i used the code from #85 (for the framework stuff) i was wondering i would go about actually adding it to the menu i would use ImGui but i don't like it lol P.S please don't be mean thanks in advance