#1
|
|||
|
|||
CIU V2 Designer Preview
Last edited by Gupta; 01-12-2020 at 04:52. |
The Following 20 Users Say Thank You to Gupta For This Useful Post: | ||
78372 (21-02-2020), ADMIRAL (21-02-2020), andreiutzu21 (21-02-2020), Behnam2018 (26-02-2020), Cesar82 (20-02-2020), Grumpy (20-02-2020), GTX590 (20-02-2020), Harsh ojha (20-02-2020), houcine80 (21-02-2020), KaktoR (20-02-2020), mausschieber (20-02-2020), omdj (06-04-2020), orlydb (21-05-2021), pakrat2k2 (21-02-2020), Prettyboy099 (28-04-2020), Python-Boy (01-01-2021), Razor12911 (14-04-2020), sajmon83 (20-04-2020), Th3Raven (21-02-2020), Titeuf (22-02-2020) |
Sponsored Links |
#2
|
||||
|
||||
Bold checkbox doesn't work on buttons.
Will test more on weekend. Thanks for this early preview PS: I vote for sticky, as this could be useful
__________________
Haters gonna hate
Last edited by KaktoR; 20-02-2020 at 12:48. |
The Following 3 Users Say Thank You to KaktoR For This Useful Post: | ||
#3
|
||||
|
||||
Your vote was all it needed to become a Sticky
__________________
Can't find a Game Conversion? Check the 'Conversion INDEX'
|
The Following 2 Users Say Thank You to Grumpy For This Useful Post: | ||
Behnam2018 (26-02-2020), KaktoR (20-02-2020) |
#4
|
||||
|
||||
CIU V2/V3 Designer - Suggestion
@Gupta
Your job is getting great. This is all that conversion creators need. I have some ideas for you if you want any suggestions. - In the Equalizer tab of the designer if you want you can change "Line Position" to "Anchor" because this will be changed to the next versions in setup.ini. - The alignment positions will also be used in 2 axes, for some components like LangBox and Equalizers in setup.ini. Position=<x>,<y> as Position=center,bottom (the values left and Top will be decremented if the value is right/bottom). It was not included, but soon it will be included in the script. INFO: In box mode, the FlagByLine and FlagBoxAlignment keys can be used with different values and alignments for each line, separating the values with a comma. If you use right alignment you may need to use the FlagBoxWidth key. Example for 10 languages in 3 lines: Code:
FlagByLine=5,2,3 FlagBoxAlignment=left,right,center FlagBoxWidth=100 If your project is going to take a long time to complete it might be better to work with version 3.0.0.1 beta 3. There will be several changes in the next versions. Any questions you have about any CIU operation can ask me for PM. In beta version 4 of 3.0.0.1, all flags in the CIU source code folder will be removed. The flags will be created at run time allowing you to configure various effects. I will send you the source code for version 3.0.0.1 by PM for you to understand better and prepare for version 3.0.0.1 (if you wish). Thank you for working on a DESIGNER tool for CIU. PS: Gupta I sent you a PM. Last edited by Cesar82; 20-02-2020 at 18:51. |
#5
|
|||
|
|||
current GetFlayByLine function is pretty hard to understand, reading the description can't we do it in this way;
and please whoever is developing current CIU please try to use meaningful variable names. L1 LN S1 doesn't make any sense Code:
function GetFlagByLine: TArrayOfInteger; var FlagDist, CurrFlagCount: String; I, LangCount, LangUsed, LastLineCount: Integer; begin LangCount := LangNumber; LangUsed := 0; LastLineCount := 0; SetArrayLength(Result, 0); FlagDist := GetValStr('LangBox', 'FlagByLine', '0') + ','; while (Length(FlagDist) > 0) and (LangUsed < LangCount) do begin CurrFlagCount := Trim(Copy(FlagDist, 0, Pos(',', FlagDist) - 1)); FlagDist := Copy(FlagDist, Pos(',', FlagDist) + 1, Length(FlagDist)); SetArrayLength(Result, GetArrayLength(Result) + 1); I := GetArrayLength(Result) - 1; Result[I] := StrToInt(CurrFlagCount); if Result[I] > LangCount - LangUsed then Result[I] := LangCount - LangUsed; LangUsed := LangUsed + Result[I]; LastLineCount := Result[I]; end; if LangUsed <> LangCount then begin if LastLineCount = 0 then begin SetArrayLength(Result, GetArrayLength(Result) + 1); Result[GetArrayLength(Result) - 1] := LangCount - LangUsed; end else begin while LangUsed <> LangCount do begin SetArrayLength(Result, GetArrayLength(Result) + 1); I := GetArrayLength(Result) - 1; Result[I] := LangCount - LangUsed; if Result[I] > LastLineCount then Result[I] := LastLineCount; LangUsed := LangUsed + Result[I]; end; end; end; end; Last edited by Gupta; 21-02-2020 at 00:01. |
#6
|
|||
|
|||
Quote:
|
#7
|
||||
|
||||
Quote:
At the time KaktoR didn't know much about programming and I helped him to solve some problems in the script and then he gave me the opportunity to continue editing the script. KaktoR tests and takes care of the compressors and shares the versions I send to him. I use variables S1, L1, etc so that the code is smaller and better visualization of most of the code in the Inno Setup interface. But each variable has its meaning in relation to what it does. S1, S2, S3 = Temporary Strings. FL = Flags per line. FC = Flags count. LN = Language Number. In this GetFlagByLine function, if the number of parameters in FlagsByLine= key (setup.ini) does not cover all flags, the next lines will have the same amount as the previous one. The same is true in the GetFlagBoxAlign function. Example containing 17 flags. FlagsByLine=3,2,5 Results: line 1 with 3 flags line 2 with 2 flags line 3 with 5 flags line 4 with 5 flags line 5 with 2 flags (3 + 2 + 5 + 5 + 2 = 17) Look the test with my code in the attached file. It avoids several errors due to lack of information that can happen if the user does not configure Setup.ini correctly. It also only makes it possible to activate the BOX mode and no other keys are needed to create a square with the flags. In my code it is also possible to insert empty lines between the lines with flags, as for example for 16 languages in 4 lines of flags and 3 empty lines. FlagsByLine=4,0,4,0,4,0,4 Last edited by Cesar82; 21-02-2020 at 10:26. |
#8
|
||||
|
||||
Quote:
But for manual editing of Setup.ini the Equalizer key Position= will no longer refer to the position of the Equalizer line (future versions of CIU). The Position= key will be the alignment of the equalizer to the background (Similar to LangBox). The current key Position= with the line position functionality will be called Anchor= (in future versions). This key position will have one or two parameters separated by commas for full compatibility with previous versions of CIU. It will be possible to use 9 combinations X, Y as: Code:
Position= Left,Top Position= Left,Center Position= Left,Bottom Position= Center,Top Position= Center,Center Position= Center,Bottom Position= Right,Top Position= Right,Center Position= Right,Bottom Last edited by Cesar82; 21-02-2020 at 08:53. |
#9
|
|||
|
|||
Quote:
I still didn't get why you used sqrt and other function Will come back to you on tomorrow |
#10
|
|||
|
|||
Quote:
I'm thinking of adding anchor based support for button at least so to say anchor this button to left of the another button , tis is my biggest complain with razor's designer that i've to manually align everything |
#11
|
||||
|
||||
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). |
#12
|
|||
|
|||
Sorry, my whole point was that you should write such that you don't need to explain.
|
#13
|
||||
|
||||
@Gupta. Yes I understood.
But I like to repurpose variables when they are no longer being used within the same function. If I declare the variable with a specific name to what it is working on, using it in another part of the code would be bad, then I use S, S1, S2, etc. In this GetFlagsByLine function I could have used variables with more informative names, but I wanted to reduce the text. If you want I can remove my previous posts from this topic, as it is not useful for most readers. Thank you for reporting my misuse of variable names. I will try to use less confusing variables going forward. |
#14
|
|||
|
|||
Here is another one
Can anyone compile different editable components of "TextStage" per page. I wanted to do an option to see the live preview of text stage. Last edited by Gupta; 29-02-2020 at 09:34. Reason: Fixed path in archive |
The Following 4 Users Say Thank You to Gupta For This Useful Post: | ||
#15
|
||||
|
||||
Quote:
__________________
It would be nice if you appreciate my work with the thanks Button |
The Following User Says Thank You to mausschieber For This Useful Post: | ||
Gupta (29-02-2020) |
Thread Tools | |
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 |