Jump to content
Sign in to follow this  
Cap Oral

Progress initiation ?

Recommended Posts

 

 

Hello everyone I recently made a progress bar for the initiation of a menu but I would like to make sure that the progress bar is displayed only at the initiation and that later this stage of loading happens.

 

My Progress 

 

#include "..\..\script_macros.hpp"


if (!alive player || dialog) exitWith {};
[] spawn {
with uiNamespace do
    {    waitUntil {!isNull findDisplay 46};
        disableSerialization;
        ok = createDialog "Xenoa_Ouverture";
        Xenoa_Progression = findDisplay 46 ctrlCreate ["RscProgress",-1];
        Xenoa_Progression ctrlSetPosition [safezoneX+0.452*safezoneW,safezoneY+0.725011110*safezoneH,0.10*safezoneW,0.01*safezoneH];
        Xenoa_Progression ctrlSetTextColor [1,1,1,1];
        Xenoa_Progression progressSetPosition 0.5;
        Xenoa_Progression ctrlCommit 0;
    };
    
    disableSerialization;
    _ctrl = uiNamespace getVariable "Xenoa_Progression";
    private _n = 0;
    while {_n < 1} do
    {    _n = _n + 0.01;
        _ctrl progressSetPosition _n;
        sleep 0.001;
    };
    
    ctrlDelete _ctrl;
    uiNamespace setVariable ["Xenoa_Progression",nil];
    closeDialog 0;  
    createDialog "Xenoa_Accueil";
};

[] call life_fnc_Accueil;

 

I thought to go through a system of "true" "false" finally I know not too much that said you ?

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  

×