|
|
|
#1
|
|||
|
|||
|
Quote:
I still didn't get why you used sqrt and other function Will come back to you on tomorrow |
| Sponsored Links |
|
#2
|
||||
|
||||
|
It is used to calculate and create a square Box with the flags if FlagByLine key (in setup.ini) is empty or does not exist.
Code:
if GetArrayLength(Result) = 0 then begin {If no results were obtained, it calculates the quantity to creates a square with the number of flags in the project.}
FL := Trunc(Sqrt(LN)) + (Trunc(Sqrt(LN)) mod 2);
SetArrayLength(Result, Trunc(Sqrt(LN)) + 1);
for I := 0 to GetArrayLength(Result) - 1 do begin
if FC + FL > LN then
FL := LN - FC;
Result[I] := FL;
FC := FC + FL
end;
end;
Code:
S3 := '';
for I := 1 to Length(S2) do
if StrToIntDef(S2[I], 10) < 10 then
S3 := S3 + S2[I];
Code:
if (S3 <> '') and (LN > FC)
and ((StrToIntDef(S3, 0) > 0) or (GetArrayLength(Result) > 0)) then
begin
Code:
while (LN - FC > 0) and (FL > 0) do begin
if FC + FL > LN then
FL := LN - FC;
SetArrayLength(Result, GetArrayLength(Result) + 1);
Result[GetArrayLength(Result) - 1] := FL;
FC := FC + FL
end;
It also removes an empty line of flags from the end of the box for the correct CENTER alignment. Code:
if GetArrayLength(Result) > 0 then begin
if LN - FC > 0 then
Result[GetArrayLength(Result) - 1] := FL + LN - FC;
if Result[GetArrayLength(Result) - 1] = 0 then
SetArrayLength(Result, GetArrayLength(Result) - 1);
end;
Just change the values within GetValStr and SetArrayLength(Languages, 16). |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Game Installer Designer by altef_4 | altef_4 | Conversion Tutorials | 236 | 28-05-2021 03:54 |
| PREVIEW | Transparent Installer + T_Installer Designer (FMX) | STB13 | Conversion Tutorials | 9 | 08-12-2018 15:49 |
| CIUv2 Designer Alpha 2 | jamel2013 | Conversion Tutorials | 8 | 21-02-2016 04:42 |