10 class SCR_MapLightConfig
12 [
Attribute(
"", UIWidgets.Object,
"2D map light modes")]
13 ref array<ref SCR_MapLightMode> m_aMapLightModes;
22 [
Attribute(
"1 1 1 1", UIWidgets.ColorPicker,
desc:
"Light overlay color")]
25 [
Attribute(
"1", UIWidgets.Slider,
desc:
"Light overlay opacity",
"0 1 0.05")]
26 float m_fOverlayOpacity;
28 [
Attribute(
"1", UIWidgets.Slider,
desc:
"Light cone opacity",
"0 1 0.05")]
29 float m_fLightConeOpacity;
31 [
Attribute(
"{FFCDEB9793720A1C}UI/Textures/Sights/binocular_vignette2_ca.edds", UIWidgets.ResourceNamePicker,
desc:
"Zones config",
params:
"edds")]
32 ResourceName m_sConeTexture;
80 IEntity flashlight = gadgetManager.GetGadgetByType(EGadgetType.FLASHLIGHT);
120 ImageWidget.Cast(
m_wConeImg).LoadImageTexture(0, mode.m_sConeTexture);
140 float time =
m_TimeMgr.GetTimeOfTheDay();
151 float sizeX, sizeY, cursorX, cursorY;
154 cursorX = cursorInfo.x;
155 cursorY = cursorInfo.y;
160 WorkspaceWidget workspace =
GetGame().GetWorkspace();
161 cursorX = cursorX - workspace.DPIUnscale(sizeX)/2;
162 cursorY = cursorY - workspace.DPIUnscale(sizeY)/2;
165 ImageWidget.Cast(
m_wFillTop).SetSize(0, cursorY);
171 protected void Init(Widget widget)
186 m_TimeMgr = world.GetTimeAndWeatherManager();
196 Resource container = BaseContainerTools.LoadContainer(
"{D442DD4867C97496}Configs/Map/MapLightModes.conf");
198 m_LightCfg = SCR_MapLightConfig.Cast( BaseContainerTools.CreateInstanceFromContainer( container.GetResource().ToBaseContainer() ) );
209 super.OnMapOpen(config);
227 super.OnMapClose(config);