Jump to content

Recommended Posts

Ok guys becouse nobody replied here. So i assumed there is no way to make that possible so i created supper simple GUI for weather change and here  are the pictures:

https://imgur.com/gallery/n3z7Owz

 

here is the code if somebody wants to use that.

Bare in mind i created this in 30 min so it  is like SUPER simple verison.

Weathe_Dialog.hpp

#include "CustomControlClasses.h"
class Weather_Dialog
{
	idd = 12346;
	
	class ControlsBackground
	{
		class Wether_Background_1
		{
			type = 0;
			idc = -1;
			x = -0.025;
			y = 0.22222223;
			w = 1.025;
			h = 0.43611114;
			style = 80;
			text = "";
			colorBackground[] = {0.2,0.2,0.2,1};
			colorText[] = {0.2,0.2,0.2,1};
			font = "PuristaMedium";
			sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1);
			moving = false;
			shadow = 0;
			
		};
		class Weather_Backgorund_2
		{
			type = 0;
			idc = -1;
			x = -0.025;
			y = 0.22222223;
			w = 1.025;
			h = 0.09292931;
			style = 0;
			text = "";
			colorBackground[] = {0.6,0,0,1};
			colorText[] = {0.6,0,0,1};
			font = "PuristaMedium";
			sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1);
			moving = false;
			shadow = 0;
			
		};
		
	};
	class Controls
	{
		class Edit_Weather_Text
		{
			type = 0;
			idc = -1;
			x = safeZoneX + safeZoneW * 0.29375;
			y = safeZoneY + safeZoneH * 0.34666667;
			w = safeZoneW * 0.1125;
			h = safeZoneH * 0.03666667;
			style = 0;
			text = "Edit Weather";
			colorBackground[] = {0,0,0,0};
			colorText[] = {1,1,1,1};
			font = "PuristaSemiBold";
			sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 2);
			
		};
		class Edit_Weather_Text_2
		{
			type = 0;
			idc = -1;
			x = 0.025;
			y = 0.39444445;
			w = 0.21212122;
			h = 0.06666668;
			style = 0;
			text = "Weather:";
			colorBackground[] = {0,0,0,0};
			colorText[] = {1,1,1,1};
			font = "PuristaSemiBold";
			sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 2);
			
		};
		class Edit_Fog_Text
		{
			type = 0;
			idc = -1;
			x = 0.025;
			y = 0.52777781;
			w = 0.0909091;
			h = 0.11111113;
			style = 0;
			text = "Fog:";
			colorBackground[] = {0,0,0,0};
			colorText[] = {1,1,1,1};
			font = "PuristaSemiBold";
			sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.7);
			
		};
		class Sunny_Button
		{
			type = 1;
			idc = -1;
			x = 0.29242425;
			y = 0.3757576;
			w = 0.12727273;
			h = 0.10505051;
			style = 0+2;
			text = "Sunny";
			borderSize = 0;
			colorBackground[] = {0.102,0.102,0.102,1};
			colorBackgroundActive[] = {0.2,0.2,0.2,1};
			colorBackgroundDisabled[] = {0.2,0.2,0.2,1};
			colorBorder[] = {0,0,0,0};
			colorDisabled[] = {0.2,0.2,0.2,1};
			colorFocused[] = {0.2,0.2,0.2,1};
			colorShadow[] = {0,0,0,0};
			colorText[] = {0.949,0.949,0.949,1};
			font = "PuristaMedium";
			offsetPressedX = 0.01;
			offsetPressedY = 0.01;
			offsetX = 0.01;
			offsetY = 0.01;
			sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1);
			soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1.0};
			soundEnter[] = {"\A3\ui_f\data\sound\RscButton\soundEnter",0.09,1.0};
			soundEscape[] = {"\A3\ui_f\data\sound\RscButton\soundEscape",0.09,1.0};
			soundPush[] = {"\A3\ui_f\data\sound\RscButton\soundPush",0.09,1.0};
			shadow = 0;
			onButtonClick  = "[] spawn fnc_Sunny;";
			
		};
		class Cloudie_Button
		{
			type = 1;
			idc = -1;
			x = 0.44242438;
			y = 0.37500004;
			w = safeZoneW * 0.0525;
			h = safeZoneH * 0.05777778;
			style = 0+2;
			text = "Cloudy";
			borderSize = 0;
			colorBackground[] = {0.102,0.102,0.102,1};
			colorBackgroundActive[] = {0.2,0.2,0.2,1};
			colorBackgroundDisabled[] = {0.2,0.2,0.2,1};
			colorBorder[] = {0,0,0,0};
			colorDisabled[] = {0.2,0.2,0.2,1};
			colorFocused[] = {0.2,0.2,0.2,1};
			colorShadow[] = {0,0,0,0};
			colorText[] = {0.949,0.949,0.949,1};
			font = "PuristaMedium";
			offsetPressedX = 0.01;
			offsetPressedY = 0.01;
			offsetX = 0.01;
			offsetY = 0.01;
			sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1);
			soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1.0};
			soundEnter[] = {"\A3\ui_f\data\sound\RscButton\soundEnter",0.09,1.0};
			soundEscape[] = {"\A3\ui_f\data\sound\RscButton\soundEscape",0.09,1.0};
			soundPush[] = {"\A3\ui_f\data\sound\RscButton\soundPush",0.09,1.0};
			shadow = 0;
			onButtonClick  = "[] spawn fnc_Cloud;";
			
		};
		class Rain_Button
		{
			type = 1;
			idc = -1;
			x = 0.59242437;
			y = 0.37500004;
			w = 0.12651517;
			h = 0.10555558;
			style = 0+2;
			text = "Rain";
			borderSize = 0;
			colorBackground[] = {0.102,0.102,0.102,1};
			colorBackgroundActive[] = {0.2,0.2,0.2,1};
			colorBackgroundDisabled[] = {0.2,0.2,0.2,1};
			colorBorder[] = {0,0,0,0};
			colorDisabled[] = {0.2,0.2,0.2,1};
			colorFocused[] = {0.2,0.2,0.2,1};
			colorShadow[] = {0,0,0,0};
			colorText[] = {0.949,0.949,0.949,1};
			font = "PuristaMedium";
			offsetPressedX = 0.01;
			offsetPressedY = 0.01;
			offsetX = 0.01;
			offsetY = 0.01;
			sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1);
			soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1.0};
			soundEnter[] = {"\A3\ui_f\data\sound\RscButton\soundEnter",0.09,1.0};
			soundEscape[] = {"\A3\ui_f\data\sound\RscButton\soundEscape",0.09,1.0};
			soundPush[] = {"\A3\ui_f\data\sound\RscButton\soundPush",0.09,1.0};
			shadow = 0;
			onButtonClick  = "[] spawn fnc_Rain;";
			
		};
		class Storm_Button
		{
			type = 1;
			idc = -1;
			x = 0.74242439;
			y = 0.37500004;
			w = 0.12651517;
			h = 0.10555558;
			style = 0+2;
			text = "Storm";
			borderSize = 0;
			colorBackground[] = {0.102,0.102,0.102,1};
			colorBackgroundActive[] = {0.2,0.2,0.2,1};
			colorBackgroundDisabled[] = {0.2,0.2,0.2,1};
			colorBorder[] = {0,0,0,0};
			colorDisabled[] = {0.2,0.2,0.2,1};
			colorFocused[] = {0.2,0.2,0.2,1};
			colorShadow[] = {0,0,0,0};
			colorText[] = {0.949,0.949,0.949,1};
			font = "PuristaMedium";
			offsetPressedX = 0.01;
			offsetPressedY = 0.01;
			offsetX = 0.01;
			offsetY = 0.01;
			sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1);
			soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1.0};
			soundEnter[] = {"\A3\ui_f\data\sound\RscButton\soundEnter",0.09,1.0};
			soundEscape[] = {"\A3\ui_f\data\sound\RscButton\soundEscape",0.09,1.0};
			soundPush[] = {"\A3\ui_f\data\sound\RscButton\soundPush",0.09,1.0};
			shadow = 0;
			onButtonClick  = "[] spawn fnc_Storm;";
			
		};
		class Cancle_Button
		{
			type = 1;
			idc = -1;
			x = -0.03257538;
			y = 0.67500009;
			w = 0.25151518;
			h = 0.08055558;
			style = 0+2;
			text = "CANCLE";
			borderSize = 0;
			colorBackground[] = {0.102,0.102,0.102,1};
			colorBackgroundActive[] = {0.2,0.2,0.2,1};
			colorBackgroundDisabled[] = {0.2,0.2,0.2,1};
			colorBorder[] = {0,0,0,0};
			colorDisabled[] = {0.2,0.2,0.2,1};
			colorFocused[] = {0.2,0.2,0.2,1};
			colorShadow[] = {0,0,0,0};
			colorText[] = {0.949,0.949,0.949,1};
			font = "PuristaMedium";
			offsetPressedX = 0.01;
			offsetPressedY = 0.01;
			offsetX = 0.01;
			offsetY = 0.01;
			sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1);
			soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1.0};
			soundEnter[] = {"\A3\ui_f\data\sound\RscButton\soundEnter",0.09,1.0};
			soundEscape[] = {"\A3\ui_f\data\sound\RscButton\soundEscape",0.09,1.0};
			soundPush[] = {"\A3\ui_f\data\sound\RscButton\soundPush",0.09,1.0};
			action = "closeDialog 12346;";
		};
		class Fog_None
		{
			type = 1;
			idc = -1;
			x = safeZoneX + safeZoneW * 0.414375;
			y = safeZoneY + safeZoneH * 0.50444445;
			w = safeZoneW * 0.0525;
			h = safeZoneH * 0.05777778;
			style = 0+2;
			text = "None";
			borderSize = 0;
			colorBackground[] = {0.102,0.102,0.102,1};
			colorBackgroundActive[] = {0.2,0.2,0.2,1};
			colorBackgroundDisabled[] = {0.2,0.2,0.2,1};
			colorBorder[] = {0,0,0,0};
			colorDisabled[] = {0.2,0.2,0.2,1};
			colorFocused[] = {0.2,0.2,0.2,1};
			colorShadow[] = {0,0,0,0};
			colorText[] = {0.949,0.949,0.949,1};
			font = "PuristaMedium";
			offsetPressedX = 0.01;
			offsetPressedY = 0.01;
			offsetX = 0.01;
			offsetY = 0.01;
			sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1);
			soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1.0};
			soundEnter[] = {"\A3\ui_f\data\sound\RscButton\soundEnter",0.09,1.0};
			soundEscape[] = {"\A3\ui_f\data\sound\RscButton\soundEscape",0.09,1.0};
			soundPush[] = {"\A3\ui_f\data\sound\RscButton\soundPush",0.09,1.0};
			shadow = 0;
			onButtonClick  = "[] spawn fnc_None_Fog;";
			
		};
		class Fog_Low
		{
			type = 1;
			idc = -1;
			x = 0.44924244;
			y = 0.50909094;
			w = 0.12727273;
			h = 0.10505051;
			style = 0+2;
			text = "Low Fog";
			borderSize = 0;
			colorBackground[] = {0.102,0.102,0.102,1};
			colorBackgroundActive[] = {0.2,0.2,0.2,1};
			colorBackgroundDisabled[] = {0.2,0.2,0.2,1};
			colorBorder[] = {0,0,0,0};
			colorDisabled[] = {0.2,0.2,0.2,1};
			colorFocused[] = {0.2,0.2,0.2,1};
			colorShadow[] = {0,0,0,0};
			colorText[] = {0.949,0.949,0.949,1};
			font = "PuristaMedium";
			offsetPressedX = 0.01;
			offsetPressedY = 0.01;
			offsetX = 0.01;
			offsetY = 0.01;
			sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1);
			soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1.0};
			soundEnter[] = {"\A3\ui_f\data\sound\RscButton\soundEnter",0.09,1.0};
			soundEscape[] = {"\A3\ui_f\data\sound\RscButton\soundEscape",0.09,1.0};
			soundPush[] = {"\A3\ui_f\data\sound\RscButton\soundPush",0.09,1.0};
			shadow = 0;
			onButtonClick  = "[] spawn fnc_Low_Fog;";
			
		};
		class Fog_Medium
		{
			type = 1;
			idc = -1;
			x = 0.59924244;
			y = 0.50909094;
			w = 0.12727273;
			h = 0.10505051;
			style = 0+2;
			text = "Medium Fog";
			borderSize = 0;
			colorBackground[] = {0.102,0.102,0.102,1};
			colorBackgroundActive[] = {0.2,0.2,0.2,1};
			colorBackgroundDisabled[] = {0.2,0.2,0.2,1};
			colorBorder[] = {0,0,0,0};
			colorDisabled[] = {0.2,0.2,0.2,1};
			colorFocused[] = {0.2,0.2,0.2,1};
			colorShadow[] = {0,0,0,0};
			colorText[] = {0.949,0.949,0.949,1};
			font = "PuristaMedium";
			offsetPressedX = 0.01;
			offsetPressedY = 0.01;
			offsetX = 0.01;
			offsetY = 0.01;
			sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1);
			soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1.0};
			soundEnter[] = {"\A3\ui_f\data\sound\RscButton\soundEnter",0.09,1.0};
			soundEscape[] = {"\A3\ui_f\data\sound\RscButton\soundEscape",0.09,1.0};
			soundPush[] = {"\A3\ui_f\data\sound\RscButton\soundPush",0.09,1.0};
			shadow = 0;
			onButtonClick  = "[] spawn fnc_Medium_Fog;";
			
		};
		class Fog_Medium_copy1
		{
			type = 1;
			idc = -1;
			x = 0.74924246;
			y = 0.50909094;
			w = 0.12727273;
			h = 0.10505051;
			style = 0+2;
			text = "Thic Fog";
			borderSize = 0;
			colorBackground[] = {0.102,0.102,0.102,1};
			colorBackgroundActive[] = {0.2,0.2,0.2,1};
			colorBackgroundDisabled[] = {0.2,0.2,0.2,1};
			colorBorder[] = {0,0,0,0};
			colorDisabled[] = {0.2,0.2,0.2,1};
			colorFocused[] = {0.2,0.2,0.2,1};
			colorShadow[] = {0,0,0,0};
			colorText[] = {0.949,0.949,0.949,1};
			font = "PuristaMedium";
			offsetPressedX = 0.01;
			offsetPressedY = 0.01;
			offsetX = 0.01;
			offsetY = 0.01;
			sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1);
			soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1.0};
			soundEnter[] = {"\A3\ui_f\data\sound\RscButton\soundEnter",0.09,1.0};
			soundEscape[] = {"\A3\ui_f\data\sound\RscButton\soundEscape",0.09,1.0};
			soundPush[] = {"\A3\ui_f\data\sound\RscButton\soundPush",0.09,1.0};
			shadow = 0;
			onButtonClick  = "[] spawn fnc_Thic_Fog;";
		};
		
	};
	
};

CustomControlClasses.h

#ifndef HG_CustomControlClassesh
#define HG_CustomControlClassesh 1
//Create a header guard to prevent duplicate include.

#endif

description.ext

#include "Weather_Dialog.hpp"

init.sqf

_weatherDialog = [] spawn compile PreprocessFileLineNumbers "Weather.sqf";

Weather.sqf

fnc_gui_Open_Weather = {
disableSerialization;
createDialog "Weather_Dialog";
}; //i am using this fnc in some other script if you want you can delete this or do with this what ever you want


//also if you want to make your own presets of weather just change the values bellow 
fnc_Sunny = {
5 setOvercast 0;
5 setRain 0;
forceWeatherChange;

systemChat "Sunny Weather";
};

fnc_Cloud = {
5 setOvercast 1;
5 setRain 0;
forceWeatherChange;
systemChat "Cloudy Weather";
};

fnc_Rain = {
5 setOvercast 1;
5 setRain 1;
forceWeatherChange;
systemChat "Rain Weather";
};

fnc_Storm = {
5 setOvercast 1;
5 setRain 1;
forceWeatherChange;
systemChat "Stormmy Weather";
};

fnc_None_Fog = {
0 setFog [0,0,0];
forceWeatherChange;
systemChat "None Fog";
};

fnc_Low_Fog = {
0 setFog [0.1,0.1,3];
forceWeatherChange;
systemChat "Low Fog";
};

fnc_Medium_Fog = {
0 setFog [0.3,0.3,20];
forceWeatherChange;
systemChat "Medium Fog";
};

fnc_Thic_Fog = {
0 setFog [0.1,0.1,50];
forceWeatherChange;
systemChat "Thic Fog";
};

 

  • Like 2

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

×