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

Recommended Posts



But can't find where to do that





This function creates and returns a new window.


  • static Window* Create(const std::string& title="Leadwerks", int x=0, int y=0, int width=1024, int height=768, int style=Titlebar)


  • title: the window text.
  • x: the x position of the new window.
  • y: the y position of the new window.
  • width: the width of the new window.
  • height: the height of the new window.
  • style: the style of the new window. This can be any combination of the following bitwise flags:
    • Window::Titlebar: the window will have a titlebar with text shown.
    • Window::Resizable: the window will be resizable and have minimize and maximize buttons.
    • Window;:Hidden: the window will be initially hidden on creation.
    • Window::FullScreen: the window will take up the entire screen

Since the forum has a bug that prevents from posting Window styles correctly, 'window.Fullscreen' = 64



window = Window:Create("example",0,0,800,600,64)

context = Context:Create(window)

world = World:Create()

local camera = Camera:Create()


local light = DirectionalLight:Create()


model = Model:Box()



while window:KeyDown(Key.Escape)==false do








context:DrawText("Hit ESCAPE to exit program", 2,2)





Also note that forum website has a search located in the upper right that allows you to search for keywords.

  • Upvote 2
Link to post
Share on other sites

Still doesn't tell me where to find the script to change it to fullscreen


Also note that forum website has a search located in the upper right that allows you to search for keywords.


First search return for fullscreen after your post shows an example of changing windows styles in game, if that is what you are searching for. You need to start explaining better what you are looking for - people here are willing to help but we are not mind readers. It would help if you took a little initiative and did some testing of the API reference examples, tutorials, or searching the forum.

Link to post
Share on other sites

Yeah that link does

But the other links you gave did not

That is why I asked

Again, we are not mind readers. Your first post just asks if you can run the game fullscreen. Your second post just said you cannot find where to do "that" which seemed to be asking where in the Window:Create() command to set the fullscreen style parameter. The third post asking to find a script was interpreted to be asking for a script showing how to change to fullscreen in game.


You need to explain better what you are looking for as I had no idea that after a month of posting here that you didn't know that the Main.lua script was the script being ran at runtime. Again, I would recommend that you review the official leadwerks tutorials as they are full of good information that will help explain a lot of the beginner's questions.

Link to post
Share on other sites

first RTFM as they say, but truth to be told:


"Window::FullScreen: the window will take up the entire screen, and the screen resolution will be changed to match the window size."


That does not do what it says at least on the Linux version. It just removes window borders and will not resize to the fullscreen. So you need to readjust screen resolution (I currently don't know can LE probe for current resolution of the display), then apply new resolution and change to Fulscreen to remove border decoration.

Link to post
Share on other sites

In the Windows version, it doesn't automatically resize the screen resolution (context's width & height) either when switching in-game but it does make the window go fullscreen. And while there is no inherent method to determine current display resolution, I just always pick the last available resolution that the monitor can support as typically this is the default native resolution.

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.

Reply to this topic...

×   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...