Jump to content
Neviothr

[SOLVED] Displaying an image on the screen?

Recommended Posts

How would one go about displaying an image on the screen when the player is using his NVGs, and removing it when he's not?

Share this post


Link to post
Share on other sites

Possible starting point:

h = [] spawn {
	PICTURE = "\A3\Weapons_F\Data\UI\gear_item_compass_ca.paa";

	with uiNamespace do {
		TAG_Picture = findDisplay 46 ctrlCreate ["RscPicture", -1];
		TAG_Picture ctrlSetPosition [safeZoneX, safezoneY, safeZoneW, safezoneH];
		TAG_Picture ctrlCommit 0;
	};
			
	findDisplay 46 displayAddEventHandler ["KeyDown", {
		params ["_control", "_key", "_shift", "_ctrl", "_alt"];
			
		if (_key in (ActionKeys "NightVision"))  then {
			(uiNamespace getVariable "TAG_Picture") ctrlSetText (["", PICTURE] select !(currentVisionMode player > 0));
		};
		false
	}];
};
Edited by hallyg
  • Like 1

Share this post


Link to post
Share on other sites

 

Possible starting point:

h = [] spawn {
	PICTURE = "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_unbind_ca.paa";

	with uiNamespace do {
		TAG_Picture = findDisplay 46 ctrlCreate ["RscPicture", -1];
		TAG_Picture ctrlSetPosition [0, 0.8, 1, 0.2];
		TAG_Picture ctrlCommit 0;
	};
			
	findDisplay 46 displayAddEventHandler ["KeyDown", {
		params ["_control", "_key", "_shift", "_ctrl", "_alt"];
			
		if (_key in (ActionKeys "NightVision"))  then {
			(uiNamespace getVariable "TAG_Picture") ctrlSetText (["", PICTURE] select (currentVisionMode player isEqualTo 0));
		};
		false
	}];
};

 

Tried the above, nothing was displayed.

Share this post


Link to post
Share on other sites

Tried the above, nothing was displayed.

I edited the picture as well as its position, give it another try. Hopefully it'll work- it seemed to work for me. :) 

  • Like 1

Share this post


Link to post
Share on other sites

I edited the picture as well as its position, give it another try. Hopefully it'll work- it seemed to work for me. :)

 

That did it, thank you very much!

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

×