Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Set Window Size without stretching the images

Author
Message
dimy93
15
Years of Service
User Offline
Joined: 10th Jul 2009
Location:
Posted: 15th Jul 2009 01:34
I'm making my first 2D game with Dark GDK and I'm experiencing a serious problem. Anyhow I try to resize the window-I tried by the code of the program and the usual resizing the window the sprites shrink or stretch with the window.Pls tell me how to fix this. Tnx for the responce.
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 15th Jul 2009 03:23
That is just the behaviour of the directX surface I believe. It resizes itself to the size of the window it is stuk in, but doesnt change resolutions at all, just "stretches and shrinks" .... I think that has to do with the way TGC coded their wrapper, One way around it may be to create your own window(CreateWindowEX) and dbOverrideHWND() the GDK surface into it. You could then setup your own callback to catch the WM_SIZE message and make sure that it stays square as its dragged.. also, I ahvent tried but you may be able to setup a callback for the original GDK window using its handle(g_pGlob->hWnd) and catch its WM_SIZE to avoid having to override the window(I knw you can setup the callback function and catch/send messages, but I have no idea how TGC coded their WndProc or how they handle/process windows messages)

There is probably an easier way, but im sorry I dont know it off the top of my head

You could always set the window to be non-resizable aswell, if that helps... I think dbSetWindowLayout may be the command for that.

If it ain't broke.... DONT FIX IT !!!

Login to post a reply

Server time is: 2024-10-01 08:31:44
Your offset time is: 2024-10-01 08:31:44