Jump to content

Fullscreen?


MadCat
 Share

Recommended Posts

Thanks

 

But can't find where to do that

 

http://www.leadwerks.com/werkspace/page/api-reference/_/window/windowcreate-r462

 

Window::Create

This function creates and returns a new window.

Syntax

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

Parameters

  • 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

 

Example:

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

context = Context:Create(window)

world = World:Create()

local camera = Camera:Create()

camera:Move(0,0,-3)

local light = DirectionalLight:Create()

light:SetRotation(35,35,0)

model = Model:Box()

model:SetColor(0.0,0.0,1.0)

 

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

 

model:Turn(0,Time:GetSpeed(),0)

 

Time:Update()

world:Update()

world:Render()

context:SetBlendMode(Blend.Alpha)

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

context:SetBlendMode(Blend.Solid)

context:Sync(false)

end

 

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

  • Upvote 2

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
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.

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

Thanks Josh for the strait answer

 

As I'm still learning all this it's nice to get a strait foreword answer

 

http://www.leadwerks.com/werkspace/page/tutorials/_/lua-scripting-r12#section3

In the official LUA Scripting tutorial starting with 'Section 3: Script Editor' explains to use the script Main.lua.

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
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.

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
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 comment
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.

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
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
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.

 Share

×
×
  • Create New...