Hi there,
I am currently using a large number of edit boxes in my project, and wish to be able to save a screenshot of the screen at some arbitrary point.
Doing so is proving difficult!
I have searched these forums and come across a number of issues taking a screen shot, ie fullscreen view gives a black image etc. I have changed to windowed and seem to be making progress, however my screen is still black, with black text being barely visible. Previously, with the screen fullsize, the text was not visible at all on the black background so... some progress.
My screen when viewed is white however, and I'm having trouble getting this on my screen shot.
I have ultimately tried drawing a white box, then expecting the edit boxes to update onto this, then saving.
I am having no luck:
if GetRawKeyPressed(83) //S
TestReportFileImg=CreateRenderImage(1920,1080,0,0)
SetRenderToImage(TestReportFileImg,0)
ClearScreen()
DrawBox(0,0,1920,1080,MakeColor(255,255,255),MakeColor(255,255,255),MakeColor(255,255,255),MakeColor(255,255,255),1)
Update(0)
Render()
Swap()
SaveImage(TestReportFileImg,"TestReport.png")
SetRenderToScreen()
endif
I believe using Sync() ruins the process yes? And I must manually call Render() etc. To no avail.
Is there a separate call that forces the edit boxes to draw?
Any help on this would be much appreciated as I dont think this has been answered conclusively anywhere?
Thanks!
Martin