Jump to content
Sign in to follow this  
loki

ctrlVisible bleeding on top of each other.

Recommended Posts

[sOLVED]

howdy..

i have some code that is in a up / down button in a dialog:

disableSerialization;

//clear sText fields
((uiNamespace getVariable "myDisplay") displayCtrl 72305) ctrlSetStructuredText parseText format [""];

_ParentDisplay = findDisplay 720;

//F1
//SITOM PANELS
if ((!ctrlVisible 72317) && (!ctrlVisible 72319)) then {};

if ((ctrlVisible 72317) && (!ctrlVisible 72319)) then
{
	execVM "ECHELON\eGUI\scripts\F1\F1PageDown_1.sqf";
}
else
{
	execVM "ECHELON\eGUI\scripts\F1\F1PageDown_2.sqf";

};

//F6
//DEBUG PANELS
if ((!ctrlVisible 72640) && (!ctrlVisible 72601)) then {};
if ((ctrlVisible 72601) && (!ctrlVisible 72640)) then 
{
	execVM "ECHELON\eGUI\scripts\F6\F6PageDown_1.sqf";
}
else
{
	execVM "ECHELON\eGUI\scripts\F6\F6PageDown_2.sqf";

};

works fine.. but the screens bleed through.. i.e. it always shows F1's page down content when i press the down button.. even when im on F6 and push the down button.

any ideas why they are bleeding over each other? or why ctrlShow isn't working the way i am using it? and how to fix it?

hope that makes sense.. i will explain more if needed.

thanks

Edited by Loki
[SOLVED].. see my next post if interested in fix

Share this post


Link to post
Share on other sites

assuming that you're calling the ctrlShow from inside each of those execVMs with solid logic, remains to check if you're using the correct syntax, ctrlShow has 2 acceptable formats:

one refers to the control by IDC (number)

ctrlShow [idc, show]

the other by the Control itself (control object)

controlName ctrlShow show

Share this post


Link to post
Share on other sites

thanks for the reply. everything is defined correct.. but you were correct...it was the syntax of my call.. [sOLVED]

//F6
//DEBUG PANELS
[b][size=3][size=4]if ((ctrlVisible 72640) || (ctrlVisible 72601)) then {[/size][/size][/b]
if ((ctrlVisible 72601) && (!ctrlVisible 72640)) then 
{
	execVM "ECHELON\eGUI\scripts\F6\F6PageDown_1.sqf";
}
else
{
	execVM "ECHELON\eGUI\scripts\F6\F6PageDown_2.sqf";

};
[b][size=4]};[/size][/b]

this allows only 1 up and down button to have sub layers without getting to crazy in over bloated scripts.

most likely not the best way.. but i have close to 120 controls already in echelon and cant be turning on / off controls 1 at a time. maybe an FSM.... hmmm

:)

Share this post


Link to post
Share on other sites

Only recently i began to understand how realy painfull it is to deal with dialogs, even with the help of the in-game gui editor.

When the ammount of controls grow it gets exponential scripting them not to mention when you need a mere change.

Share this post


Link to post
Share on other sites
Only recently i began to understand how realy painfull it is to deal with dialogs, even with the help of the in-game gui editor.

When the ammount of controls grow it gets exponential scripting them not to mention when you need a mere change.

same here.. but i did make an idc cheatsheet and have taken care with the idc #'s.. so its not too bad.

example:

//idc's of dialog controls

///*eGUI Base*///

//eGUI_background

72000

///*eGUI Frame*///

//eGUI_frame

,72100

//up-down page buttons

//eGUI_aTextPageUpOff

,72101

//eGUI_aTextPageUpOn

,72102

//eGUI_aTextPageDownOff

,72103

//eGUI_aTextPageDownOn

,72104

//eGUI_imgBackground_1

,72109

//eGUI_imgEchelonOn

,72110

//eGUI_imgEchelonOff

,72111

//img Power on-off

//eGUI_imgEchelonPowerOff

,72112

//eGUI_imgEchelonPowerOn

,72113

//eGUI_imgEchelonPowerStart

,72114

/snip

Share this post


Link to post
Share on other sites

The gui editor does allow to generate those for you (Ctrl+S >> Config macros) if one is careful to keep the name of the classes in the gui editor in sync with script and hpp/ext file, and it saves you a ton, but for example to reorder those i had to do it manually, apparently Ctrl-L only reorders the output in the config, the numbering remain in order of creation.

Also wasn't able to figure a way to import from config (it complains about missing IDD, when there is one), can only import from gui editor format, and then only if copying the exact part of its uncommented export, so many traps... i find myself having to use the editor only to set up control positions after the first initial setup.

Share this post


Link to post
Share on other sites
The gui editor does allow to generate those for you (Ctrl+S >> Config macros) if one is careful to keep the name of the classes in the gui editor in sync with script and hpp/ext file, and it saves you a ton, but for example to reorder those i had to do it manually, apparently Ctrl-L only reorders the output in the config, the numbering remain in order of creation.

Also wasn't able to figure a way to import from config (it complains about missing IDD, when there is one), can only import from gui editor format, and then only if copying the exact part of its uncommented export, so many traps... i find myself having to use the editor only to set up control positions after the first initial setup.

never tried the macros.. but i will now :)

i agree with you about name sync is a must. never tried the import other than the ctrl+s editor format. though i havent said it in a thread yet.. i am so very happy with the built in gui editor vs.. old long hand like i did with the lost key. maybe a thread can be started asking for more info on the gui editor.. and maybe some new classes.. like map and activeText.. so on.

fell free to pm me if you have skype and / or ts and can we chat sometime.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×