startLoadingScreen: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Some wiki formatting) |
Lou Montana (talk | contribs) m (Remove syntaxhighlight spoiler hack) |
||
Line 25: | Line 25: | ||
Resource can be defined in [[Description.ext]]; it must NOT be defined as {{hl|RscTitles}}! | Resource can be defined in [[Description.ext]]; it must NOT be defined as {{hl|RscTitles}}! | ||
<spoiler text="See config example"> | <spoiler text="See config example"> | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
Line 44: | Line 43: | ||
linespacing = 1; | linespacing = 1; | ||
}; | }; | ||
class RscPicture | class RscPicture | ||
{ | { | ||
Line 57: | Line 57: | ||
text = ""; | text = ""; | ||
}; | }; | ||
class RscLoadingText : RscText | class RscLoadingText : RscText | ||
{ | { | ||
Line 67: | Line 68: | ||
colorText[] = { 0.543, 0.5742, 0.4102, 1.0 }; | colorText[] = { 0.543, 0.5742, 0.4102, 1.0 }; | ||
}; | }; | ||
class RscProgress | class RscProgress | ||
{ | { | ||
Line 77: | Line 79: | ||
colorBar[] = { 1, 1, 1, 1 }; | colorBar[] = { 1, 1, 1, 1 }; | ||
}; | }; | ||
class RscProgressNotFreeze | class RscProgressNotFreeze | ||
{ | { | ||
Line 88: | Line 91: | ||
texture = "#(argb,8,8,3)color(0,0,0,0)"; | texture = "#(argb,8,8,3)color(0,0,0,0)"; | ||
}; | }; | ||
// end of basic defines | // end of basic defines | ||
Line 109: | Line 113: | ||
colorBackground[] = { 0, 0, 1, 1 }; | colorBackground[] = { 0, 0, 1, 1 }; | ||
}; | }; | ||
class nicePic : RscPicture | class nicePic : RscPicture | ||
{ | { | ||
Line 119: | Line 124: | ||
}; | }; | ||
}; | }; | ||
class controls | class controls | ||
{ | { | ||
Line 125: | Line 131: | ||
text = "$STR_LOADING"; // "Loading" text in the middle of the screen | text = "$STR_LOADING"; // "Loading" text in the middle of the screen | ||
}; | }; | ||
class CA_Progress : RscProgress // progress bar, has to have idc 104 | class CA_Progress : RscProgress // progress bar, has to have idc 104 | ||
{ | { | ||
Line 132: | Line 139: | ||
texture = "\ca\ui\data\loadscreen_progressbar_ca.paa"; | texture = "\ca\ui\data\loadscreen_progressbar_ca.paa"; | ||
}; | }; | ||
class CA_Progress2 : RscProgressNotFreeze // progress bar that will go reverse | class CA_Progress2 : RscProgressNotFreeze // progress bar that will go reverse | ||
{ | { | ||
idc = 103; | idc = 103; | ||
}; | }; | ||
class Name2: RscText // the text on the top-left | class Name2: RscText // the text on the top-left | ||
{ | { |
Revision as of 13:31, 23 June 2023
Description
- Description:
- Shows loading screen with the given text, using the given resource. While loading screen is shown, simulation and scene drawing is disabled, user control is disabled, mouse cursor is hidden, scripts run at full speed (50ms per frame instead of 3ms per frame for Scheduled Scripts).
- Groups:
- System
Syntax
- Syntax:
- startLoadingScreen [text, resource]
- Parameters:
- text: String
- resource: String - (Optional)
- Return Value:
- Nothing
Examples
- Example 1:
- startLoadingScreen ["Loading My Mission, please wait..."];
- Example 2:
- startLoadingScreen ["Can't skip loading time...", "MyLoadingRsc"];
- Example 3:
- startLoadingScreen ["Loading My Mission"]; // code progressLoadingScreen 0.5; // code endLoadingScreen;
- Example 4:
- // this structure prevents error-prone or lengthy code to miss endLoadingScreen. private _maxTime = diag_tickTime + 30; // max 30s of loading startLoadingScreen ["Loading"]; private _handle = [] spawn { // code that may crash or take too long }; waitUntil { uiSleep .1; scriptDone _handle || diag_tickTime > _maxTime }; endLoadingScreen;
Additional Information
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
- Posted on Nov 21, 2015 - 18:38 (UTC)
- The default Arma 3 loading screen has no control to display text.