beno_83au 1362 Posted July 31, 2016 Ok, so this post was previously asking why I couldn't get a weapon picture displaying in a RscPicture. Kinda got that working except that the picture flashes on and off constantly and I don't know why. I haven't encountered this before with displaying pictures (albeit custom .jpgs). Dialog: class loadoutMenu { idd = 2000; movingenable = false; onLoad = "nul = [] execVM 'blufor\loadouts\weaponPictures.sqf';"; class Controls { class MainRole_Primary: RscPicture { idc = 2002; text = ""; x = 5 * GUI_GRID_W + GUI_GRID_X; y = 7.5 * GUI_GRID_H + GUI_GRID_Y; w = 8 * GUI_GRID_W; h = 8 * GUI_GRID_H; }; }; }; weaponPictures.sqf: params ["_mainPri"]; waitUntil {!isNull (findDisplay 2000)}; _mainPri = getText (configfile >> 'CfgWeapons' >> 'arifle_MX_GL_ACO_pointer_F' >> 'picture'); ctrlSetText [2002,_mainPri]; So how do I stop it flashing? Share this post Link to post Share on other sites
soolie 189 Posted July 31, 2016 Not sure if it's the problem but I've always used double quotes when getting info from config files _mainPri = getText (configfile >> "CfgWeapons" >> "arifle_MX_GL_ACO_pointer_F" >> "picture"); Share this post Link to post Share on other sites
beno_83au 1362 Posted July 31, 2016 Although you're right about quotes usually being double quotes, I've used single because that line is then set as the text field in the RscPicture, so that's why I used singles. Still, don't know if it is necessary but it didn't stop the flickering on/off. Share this post Link to post Share on other sites
MrCopyright 107 Posted July 31, 2016 Do you have the ctrlSetText command within a loop? If so, add a check so it will only execute the command if the config path is different. 1 Share this post Link to post Share on other sites
beno_83au 1362 Posted July 31, 2016 No, BUT, thinking more towards a loop I went back through how I'm running the dialog, and I hadn't quite realised that a loop was going to just keep firing due to the way I was handling things with a waitUntil. Another simple waitUntil after running the dialog and I'm set. Knew it'd be something simple. Cheers. Share this post Link to post Share on other sites