Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_CareerProfileMenuUI.c
Go to the documentation of this file.
2{
3 protected const float SMOOTH_BORDER = 0.8;
4
5 //------------------------------------------------------------------------------------------------
6 override void OnMenuOpen()
7 {
8 super.OnMenuOpen();
9
10 SCR_InputButtonComponent comp = m_DynamicFooter.FindButton(UIConstants.BUTTON_BACK);
11 if (comp)
12 comp.m_OnActivated.Insert(Close);
13
14 bool showBlur = !GetGame().m_bIsMainMenuOpen;
15
16 Widget img = GetRootWidget().FindAnyWidget("MenuBackground");
17 if (img)
18 img.SetVisible(!showBlur);
19
20 BlurWidget blur = BlurWidget.Cast(GetRootWidget().FindAnyWidget("Blur0"));
21 if (blur)
22 {
23 blur.SetVisible(showBlur);
24 if (showBlur)
25 {
26 float w, h;
27 GetGame().GetWorkspace().GetScreenSize(w, h);
28 blur.SetSmoothBorder(0, 0, w * SMOOTH_BORDER, 0);
29 }
30 }
31 }
32}
ArmaReforgerScripted GetGame()
Definition game.c:1398
Widget GetRootWidget()
proto native void Close()
SCR_DynamicFooterComponent m_DynamicFooter