-
Автор темы
- #1
thats how it looks:
For any questions: dutu1337#1294
C++:
// first of all you need a boolean
bool is_opened[framework::e_maximum];
// make sure your groupboxes are dynamically initialized
/* open / close the group box */
if ( input::g_input->mouse_pointer( { this->e_pos.x, this->e_pos.y }, { this->e_size.x, 40 } ) &&
input::g_input->key_pressed( VK_LBUTTON ) ) {
framework::g_framework->e_framework.e_group_open[ e_group_num ] = !framework::g_framework->e_framework.e_group_open[ e_group_num ];
}
// using the boolean modify size in groupbox initialization
// thats how i do it
auto open_1 = e_framework.e_group_open[ 0 ]; // use open_1/add_y_1 for spacing
auto add_y_1 = e_framework.e_group_open[ 0 ] ? 185:40;
auto e_group = new groupbox::impl( "Visual group selection", "Dropped items visual settings", 0, 15, 50, 245 + resize_x / 2, e_framework.e_group_open[ 0 ] ? 185 + resize_y / 2 : 40, 0 );