Jump to content

Leadwerks News

  • entries
    190
  • comments
    1,264
  • views
    769,968

Contributors to this blog

In-Game Menu


Along with Leadwerks GUI, Leadwerks 4.4 adds an in-game menu that is available with the default Lua scripted game.  You can use this to allow your users to adjust settings in the game, or provide a more sophisticated way to quit the game than simply pressing the escape key.

Image1.thumb.jpg.3c376f0b4bad8d43e3c7f6608fbcf18a.jpg

The default window size has been changed to 1280x720 when run from the editor.  Your game will now run in fullscreen mode by default when it is launched outside the editor.

All of these changes are contained in the Main.lua and Menu.lua scripts, and can all be modified or removed to your heart's content.

A full build is available now on the beta branch.

  • Upvote 6

16 Comments


Recommended Comments

Josh

Posted

There are still some things I want to do to make the GUI prettier, but I figured first step was to get it out there.

mdgunn

Posted

Current beta seems to be crashing for me (tut sample as base then simple box with camera and spectator script).  Window launches but never makes it.   Normal branch seemed OK.

Executing "D:\Work\Leadwerks\Projects\Tut2\Tut2\Tut2.exe"...
Initializing Lua...
Lua sandboxing enabled.
Executing file "D:/Work/Leadwerks/Projects/Tut2/Tut2/Scripts/Error.lua"
Executing file "D:/Work/Leadwerks/Projects/Tut2/Tut2/Scripts/Main.lua"
Executing file "D:/Work/Leadwerks/Projects/Tut2/Tut2/Scripts/Menu.lua"
Initializing OpenGL graphics driver...
OpenGL version 451
GLSL version 450
Device: Radeon (TM) RX 480 Graphics
Process Complete.

I might uninstall everything and put beta back on but it would be tomorrow night before I get a chance.

 

 

 

 

 

Einlander

Posted

27 minutes ago, mdgunn said:

Current beta seems to be crashing for me (tut sample as base then simple box with camera and spectator script).  Window launches but never makes it.   Normal branch seemed OK.

Executing "D:\Work\Leadwerks\Projects\Tut2\Tut2\Tut2.exe"...
Initializing Lua...
Lua sandboxing enabled.
Executing file "D:/Work/Leadwerks/Projects/Tut2/Tut2/Scripts/Error.lua"
Executing file "D:/Work/Leadwerks/Projects/Tut2/Tut2/Scripts/Main.lua"
Executing file "D:/Work/Leadwerks/Projects/Tut2/Tut2/Scripts/Menu.lua"
Initializing OpenGL graphics driver...
OpenGL version 451
GLSL version 450
Device: Radeon (TM) RX 480 Graphics
Process Complete.

I might uninstall everything and put beta back on but it would be tomorrow night before I get a chance.

 

 

 

 

 

See if this helps you: 

 

 

reepblue

Posted

This current beta pretty much just broke Luawerks' console although I reinstalled the item. It's Ok since I was gonna make a new console box with the new GUI anyway. Just odd that broke. 

Also, Joint issue still exists with my script, but not in the stock fps game. I'll investigate that. Might open another post with a video. Luckily the double jumping fix works! 

Overall, really cool, thanks for keeping me busy! ;)

aiaf

Posted

Will this work from c++ ?

Josh

Posted

1 hour ago, aiaf said:

Will this work from c++ ?

By default the Lua script will create this, but you can create a menu in C++ if you want.

mdgunn

Posted

You are right Einlander! Some multi-monitor related issue.

Unplugged 2 of the 3 monitors and it builds OK now.   I'll give your notes on the issue a read.

 

tipforeveryone

Posted

These settings can't be saved. I must set them up again each time starting game.

Josh

Posted

7 hours ago, tipforeveryone said:

These settings can't be saved. I must set them up again each time starting game.

 

DooMAGE

Posted

You plan to add a fullscreen/windowed option too?

  • Like 1
The Mover Cell

Posted

There seem to be some sort of mainmenu functionality, how to activate it though?

Pleca

Posted

On 6/8/2023 at 10:50 AM, The Mover Cell said:

There seem to be some sort of mainmenu functionality, how to activate it though?

Just hit ESC key while running a game.

  • Downvote 1
The Mover Cell

Posted

16 hours ago, Pleca said:

Just hit ESC key while running a game.

I meant main menu (the one with new game button), not pause menu

Guest
Add a comment...

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