Jump to content

Ultra Software Company Blog

  • entries
    188
  • comments
    1,259
  • views
    686,216

Contributors to this blog

In-Game Menu


Josh

5,418 views

 Share

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
 Share

16 Comments


Recommended Comments

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.

Link to comment

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.

 

 

 

 

 

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

 

 

Link to comment

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! ;)

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

Link to comment

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.

 

Link to comment
7 hours ago, tipforeveryone said:

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

 

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