Jump to content
Sign in to follow this  
Atom_Monky

find current open Display

Recommended Posts

Hi, can someone tell me how do i geht the current open display ?

I want to progressSetPosition to a progressbar but in a fuction. I have multiple dialogs but they all have the same progesspbar control (idd=121212). so if i call the progress function i want that the progessbar updates no matter which dialog is shown. 
Currently i can update the progess only with the dialog "name"=WeaponsDialog; 

 

Function:
 

AV_progress=

{

    [...]

    for "_i" from 0 to _delay do {

       sleep 1;

      ((uiNamespace getVariable "WeaponsDialog") displayCtrl 121212) progressSetPosition (_i / _delay);

    };

    [...]

};

 

So i want to replace (uiNamespace getVariable "WeaponsDialog")with something dynamic.

Thanks ;D

 

Share this post


Link to post
Share on other sites

okay then I would have to check if one of the dialogs idd is listed there and ich could do a switch case on each dialog... quite complex

what would happen if i do 
 

AV_progress=

{

    [...]

    for "_i" from 0 to _delay do {

       sleep 1;

      ((uiNamespace getVariable "WeaponsDialog") displayCtrl 121212) progressSetPosition (_i / _delay);

      ((uiNamespace getVariable "myDialog") displayCtrl 121212) progressSetPosition (_i / _delay);

      ((uiNamespace getVariable "otherDialog") displayCtrl 121212) progressSetPosition (_i / _delay);

      ((uiNamespace getVariable "dialogsDialog") displayCtrl 121212) progressSetPosition (_i / _delay);

       ((uiNamespace getVariable "xxDialog") displayCtrl 121212) progressSetPosition (_i / _delay);

    };

    [...]

};

and if only one of the dialogues is open..
it thorws no script error but is it burdening the system ?

 

Share this post


Link to post
Share on other sites

Why not just check if in displays? Surely you know the IDD and if not, you can retrieve it...

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  

×