Leigh Posted November 1, 2015 Share Posted November 1, 2015 I'm sure this topic has been covered before, but I'm new at scripting and have just been tinkering and messing around with various things to see what happens and I have no real knowledge of scripting. While I have managed to change the resolution parameters in the Main.lue script to something more suitable, the game still runs in windowed mode instead of fullscreen. What parameter do I change to get a game to run fullscreen? --Initialize Steamworks (optional) Steamworks:Initialize() --Set the application title title="sci fi shooter" --Create a window local windowstyle = window.Titlebar if System:GetProperty("fullscreen")=="1" then windowstyle=windowstyle+window.FullScreen end window=Window:Create(title,0,0,System:GetProperty("screenwidth","1920"),System:GetProperty("screenheight","1080"),windowstyle) window:HideMouse() --Create the graphics context context=Context:Create(window,0) if context==nil then return end --Create a world world=World:Create() world:SetLightQuality((System:GetProperty("lightquality","1"))) --Load a map local mapfile = System:GetProperty("map","Maps/CryoLab.map") if Map:Load(mapfile)==false then return end while window:KeyDown(Key.Escape)==false do --If window has been closed, end the program if window:Closed() then break end --Handle map change if changemapname~=nil then --Clear all entities world:Clear() --Load the next map Time:Pause() if Map:Load("Maps/"..changemapname..".map")==false then return end Time:Resume() changemapname = nil end --Update the app timing Time:Update() --Update the world world:Update() --Render the world world:Render() --Render statistics context:SetBlendMode(Blend.Alpha) if DEBUG then context:SetColor(1,0,0,1) context:DrawText("Debug Mode",2,2) context:SetColor(1,1,1,1) context:DrawStats(2,22) context:SetBlendMode(Blend.Solid) else --Toggle statistics on and off if (window:KeyHit(Key.F11)) then showstats = not showstats end if showstats then context:SetColor(1,1,1,1) context:DrawText("FPS: "..Math:Round(Time:UPS()),2,2) end end --Refresh the screen context:Sync(true) end Main.lua Quote Link to comment Share on other sites More sharing options...
Thirsty Panther Posted November 1, 2015 Share Posted November 1, 2015 I use this: --Create a window local windowstyle = window.FullScreen if System:GetProperty("fullscreen")=="1" then windowstyle=windowstyle+window.FullScreen end window=Window:Create(title,0,0,System:GetProperty("screenwidth","1920"),System:GetProperty("screenheight","1080"),windowstyle) window:HideMouse() Hope this helps. Quote Link to comment Share on other sites More sharing options...
f13rce Posted November 1, 2015 Share Posted November 1, 2015 on this line: if System:GetProperty("fullscreen")=="1" then windowstyle=windowstyle+window.FullScreen end Try removing the "windowstyle+" before the "window.FullScreen" part (so make it windowstyle=window.FullScreen). Also make sure System:GetProperty("fullscreen") is gives you "1". Quote Using Leadwerks Professional Edition (Beta), mainly using C++. Windows 10 / Linux Mint, Visual Studio 2017. GPU: NVidia GeForce GTX970, CPU: Intel i7 7700K @ 4.20 GHz Previously known as Evayr. Link to comment Share on other sites More sharing options...
Leigh Posted November 1, 2015 Author Share Posted November 1, 2015 I use this: --Create a window local windowstyle = window.FullScreen if System:GetProperty("fullscreen")=="1" then windowstyle=windowstyle+window.FullScreen end window=Window:Create(title,0,0,System:GetProperty("screenwidth","1920"),System:GetProperty("screenheight","1080"),windowstyle) window:HideMouse() This is what I already tried but all it does is give me a script error message Try removing the "windowstyle+" before the "window.FullScreen" part (so make it windowstyle=window.FullScreen). I did as you suggested but it makes no difference for me. It still runs in a window, even if I change the resolution. Is there something else I have to do? Quote Link to comment Share on other sites More sharing options...
Leigh Posted November 1, 2015 Author Share Posted November 1, 2015 Its ok I think I figured what to do. I need to change (title,0,0,System) values to reposition the window. Thanks for the help! It still isn't full screen Quote Link to comment Share on other sites More sharing options...
Leigh Posted November 1, 2015 Author Share Posted November 1, 2015 This is what it looks like now. Still playing in a window, but it looks better! https://twitter.com/MediaShirt/status/660655044447072257/photo/1 Quote Link to comment Share on other sites More sharing options...
cassius Posted November 1, 2015 Share Posted November 1, 2015 window = Window::Create("title", 0, 0, 1024, 768, Window:: FullScreen); In c++ the above single line works ok; Don't know if this will help Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ 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.