zxvnme / zgui

zxvnme's graphical user interface
MIT License
399 stars 53 forks source link

align groupboxes one after the other #48

Closed robertjoaca1 closed 5 years ago

robertjoaca1 commented 5 years ago

so im tryna make 2 groupboxes, one on the left and one on the right. i tried using sameline after the end of the first groupbox and its not working. is there a special thingy that i can use? ` zgui::begin_groupbox("chams", zgui::vec2{ 235,311 });

zgui::checkbox("enemy chams", variables.visuals.chams.bool_enemy);

zgui::slider_int("enemy red", 0, 255, variables.visuals.chams.color_enemy[0]);

zgui::slider_int("enemy green", 0, 255, variables.visuals.chams.color_enemy[1]);

zgui::slider_int("enemy blue", 0, 255, variables.visuals.chams.color_enemy[2]);

zgui::slider_int("enemy alpha", 0, 255, variables.visuals.chams.color_enemy[3]);

zgui::end_groupbox();

zgui::same_line();

zgui::begin_groupbox("fakelag", zgui::vec2{ 235,311 });

zgui::checkbox("fakelag", variables.misc.bool_fakelag);

zgui::slider_int("fakelag value", 0, 14, variables.misc.int_fakelag);

zgui::end_groupbox(); ` https://imgur.com/a/Aq2w1xt

patrykkolodziej commented 5 years ago

Use nextcolumn, example: https://github.com/patrykkolodziej/Explit/blob/8e790438ccdbbd3bd6f890f0961fb9ff178d83dd/Explit/Explit/sdk/menu/menu.cpp#L83

zxvnme commented 5 years ago

@robertjoaca1 Use next_column() for positioning groupboxes.

zxvnme commented 5 years ago

Closing since no response from op.