Fixed elements per row to 8

This commit is contained in:
Arturo Gonzalez 2017-09-28 09:56:15 +02:00
parent 165087d670
commit 0b3f252436
1 changed files with 5 additions and 5 deletions

View File

@ -4855,11 +4855,11 @@ sub cli_create_visual_console() {
my $number_of_elements = scalar(@$elements_in_array); my $number_of_elements = scalar(@$elements_in_array);
my $x_divider = 4; my $x_divider = 8;
my $y_divider = 1; my $y_divider = 1;
for (my $i = 1; $i <= 1000; $i++) { for (my $i = 1; $i <= 1000; $i++) {
if (($i * 4) < $number_of_elements) { if (($i * 8) < $number_of_elements) {
$y_divider++; $y_divider++;
} }
else { else {
@ -4870,8 +4870,8 @@ sub cli_create_visual_console() {
my $elem_width = ($pos2X - $pos1X) / $x_divider; my $elem_width = ($pos2X - $pos1X) / $x_divider;
my $elem_height = ($pos2Y - $pos1Y) / $y_divider; my $elem_height = ($pos2Y - $pos1Y) / $y_divider;
if ($number_of_elements <= 4) { if ($number_of_elements <= 8) {
$elem_height = ($pos2Y - $pos1Y) / 3; $elem_height = ($pos2Y - $pos1Y) / 4;
} }
my $elem_count = 1; my $elem_count = 1;
@ -4908,7 +4908,7 @@ sub cli_create_visual_console() {
$elem_count++; $elem_count++;
if ($pos_aux_count == 3) { if ($pos_aux_count == 7) {
$pos_helper_x = $pos1X; $pos_helper_x = $pos1X;
$pos_helper_y += $elem_height; $pos_helper_y += $elem_height;
$pos_aux_count = 0; $pos_aux_count = 0;