Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0

Full-screen while running


Go to solution Solved by Josh,

Question

10 answers to this question

Recommended Posts

  • 0

Thanks.  Working now :D

int _index = comboboxFullscreen->GetSelectedIndex();
bool _oldFullscreenValue = Base::Config::fullScreen;
Base::Config::fullScreen = (_index == 0 ? true : false);

if (_oldFullscreenValue != Base::Config::fullScreen) {
	Context::GetCurrent()->Release();
	Window::GetCurrent()->Release();
	
	int _xPos = (Base::Config::fullScreen == true ? 0 : Base::desktopWidth / 2);
	int _yPos = (Base::Config::fullScreen == true ? 0 : Base::desktopHeight / 2);
	auto _newWindow = Window::Create(Base::GameTitle, _xPos, _yPos, Base::Config::screenWidth, Base::Config::screenHeight, (Base::Config::fullScreen == true ? Window::FullScreen : Window::Titlebar));
	auto _context = Context::Create(_newWindow);
}
else {
	Window::GetCurrent()->SetLayout((Base::desktopWidth / 2) - (Base::Config::screenWidth / 2),
		(Base::desktopHeight / 2) - (Base::Config::screenHeight / 2),
		Base::Config::screenWidth, Base::Config::screenHeight);
}

 

  • Upvote 2
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...