Yue Posted September 12, 2021 Share Posted September 12, 2021 How can I implement a change of window to full screen after activating the option in the options menu? Do I have to force the user to restart the game? Or can I do it with the program running live? Quote Link to comment Share on other sites More sharing options...
Josh Posted September 14, 2021 Share Posted September 14, 2021 Create a new window and then delete the previous window. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
reepblue Posted September 14, 2021 Share Posted September 14, 2021 To be honest, I just request the user to restart. This prevents anything relying on the context to not break when the user changes the window mode. 1 Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
Yue Posted September 14, 2021 Author Share Posted September 14, 2021 1 hour ago, reepblue said: To be honest, I just request the user to restart. This prevents anything relying on the context to not break when the user changes the window mode. Quote Link to comment Share on other sites More sharing options...
Yue Posted September 14, 2021 Author Share Posted September 14, 2021 8 hours ago, Josh said: Create a new window and then delete the previous window. The question is: How do I destroy a wind Quote Link to comment Share on other sites More sharing options...
Josh Posted September 14, 2021 Share Posted September 14, 2021 Same as any object in Leadwerks, Release(): https://www.leadwerks.com/learn?page=API-Reference_Object_Release You might try Window::SetShape() first, it might allow resizing a fullscreen window. Just make sure the new size is one of the support graphics resolutions for your monitor. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Yue Posted September 14, 2021 Author Share Posted September 14, 2021 2 minutes ago, Josh said: Same as any object in Leadwerks, Release(): https://www.leadwerks.com/learn?page=API-Reference_Object_Release You might try Window::SetShape() first, it might allow resizing a fullscreen window. Just make sure the new size is one of the support graphics resolutions for your monitor. Thank you very much, always something to learn with Leadwerks. Quote Link to comment Share on other sites More sharing options...
Yue Posted September 14, 2021 Author Share Posted September 14, 2021 2 hours ago, Josh said: Same as any object in Leadwerks, Release(): https://www.leadwerks.com/learn?page=API-Reference_Object_Release You might try Window::SetShape() first, it might allow resizing a fullscreen window. Just make sure the new size is one of the support graphics resolutions for your monitor. When I delete the window, is the context of the window and the world it contains deleted? Quote Link to comment Share on other sites More sharing options...
Josh Posted September 14, 2021 Share Posted September 14, 2021 The context is deleted, but the world is not. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Yue Posted September 15, 2021 Author Share Posted September 15, 2021 On 9/14/2021 at 1:42 PM, Josh said: The context is deleted, but the world is not. The GUI is also deleted, the thing is that in the resolution change it seems that the GUI is broken, it does not draw the menu correctly in the coordinates, I think I have to delete it and create it again. Quote Link to comment Share on other sites More sharing options...
Yue Posted September 15, 2021 Author Share Posted September 15, 2021 Ok, it works perfectly. :) 1 Quote Link to comment Share on other sites More sharing options...
Yue Posted September 15, 2021 Author Share Posted September 15, 2021 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.