Jump to content
stanhope

Vehicle preview picture in GUI

Recommended Posts

Is it possible to get the preview picture for vehicles (like when you hover over a vehicle in the eden editor) with SQF?  If that's the case it should be possible to display it in a GUI correct?

(PS: I'm not asking anyone to write it for me, just point me in the right direction)

Share this post


Link to post
Share on other sites

Sure. Something like (not tested):

_control ctrlSetText format ["%1", getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "picture")];
picture = "\A3\soft_f\Offroad_01\Data\UI\Offroad_01_base_CA.paa";
editorPreview = "\A3\EditorPreviews_F\Data\CfgVehicles\C_Offroad_01_F.jpg";
configfile >> "CfgVehicles" >> "C_Offroad_01_F" >> "picture"
configfile >> "CfgVehicles" >> "C_Offroad_01_F" >> "editorPreview"

Remember to define _control and _vehicle somewhere, obviously.

  • Thanks 1

Share this post


Link to post
Share on other sites
2 minutes ago, HazJ said:

picture = "\A3\soft_f\Offroad_01\Data\UI\Offroad_01_base_CA.paa";

Any way of getting this path from a vehicles class name?

Share this post


Link to post
Share on other sites

As shown above. :grinning:

_control ctrlSetText format ["%1", getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "picture")];

 

Share this post


Link to post
Share on other sites

I should sleep more :)

  • Like 1

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

×