Window Scaller +position

Posted By: CocaCola

Window Scaller +position - 11/25/17 12:50

hello,
i wont load window position and sice from a file, at start.
I use video_window to change the window parameter.
in the code underneath I have nearly same resolutions, but I get my panel double sizes . what do video_window in realy?
Code:
function main()
{
	wait(1);
	vec_set(screen_size,vector(1920,1080,0));
//	video_mode = 9;
//	video_screen = 0;
	wait(1);
	video_window(vector(2,2,0),vector(1900,1000,0),2,NULL);
...


Posted By: CocaCola

Re: Window Scaller +position - 11/25/17 21:19

I have nowI have zip the project hereI have download the project here
https://www.dropbox.com/s/3mxkdgxwnniiuvs/WindowVectors.zip?dl=0
It is a empty project. You can activate with esc the esc_menue an closet these by the smal button on the bottom right sight of the window.
for the scale mode you click on the middle botton, in posmode, you can switch beween change size or window position by the righn mouse botton, by clicking LMT you acept the window POS and Size.
my problem is now, how can I make, the mouse is staying in the game window?
Posted By: codeChallenged

Re: Window Scaller +position - 12/08/17 06:37

#include <windows.h>

void lock_mouse() //keep mouse in game window
{
RECT rect;
GetClientRect(hWnd,&rect);
ClientToScreen(hWnd,&rect);
ClientToScreen(hWnd,&rect.right);
ClipCursor(&rect);

}
© 2024 lite-C Forums