Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow given picture classes/paths to core_pushNotification #4

Open
Adanteh opened this issue Oct 13, 2017 · 0 comments
Open

Allow given picture classes/paths to core_pushNotification #4

Adanteh opened this issue Oct 13, 2017 · 0 comments
Milestone

Comments

@Adanteh
Copy link

Adanteh commented Oct 13, 2017

Being able to use extra pictures would be nice, allow some config class for Notifications to have extra paths (Because you like configs), or by given a path to a picture directly.

Something like this would work

		private _imageSlug =  (_data select 0);
		
		private _image = _imageSlug call {
			private _notifcationCfg = configFile >> "CfgSurfacePainter" >> "Notifications" >> _this;
			if (isText (_notifcationCfg >> "path")) exitWith { getText (_notifcationCfg >> "path"); };

			if ((_this select [count _this - 4, 4]) == ".paa") exitWith { _this };

			switch (toUpper _this) do {
				case ("WARNING"): {"x\surface_painter\addons\sp_core\data\notification_yellow_co.paa"};
				case ("NOK"): {"x\surface_painter\addons\sp_core\data\notification_red_co.paa"};
				default {"x\surface_painter\addons\sp_core\data\notification_green_co.paa"};
			};
		};
@zgmrvn zgmrvn added this to the v2.0.0 milestone Oct 17, 2017
@zgmrvn zgmrvn changed the title Enhancement: Allow given picture classes/paths to core_pushNotification Allow given picture classes/paths to core_pushNotification Oct 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants