Forum

> > CS2D > Scripts > Close menu
Forums overviewCS2D overview Scripts overviewLog in to reply

English Close menu

3 replies
To the start Previous 1 Next To the start

old Close menu

JonyFrosta
User Off Offline

Quote
How to close menu opened with Lua function menu(id, str)?

old Re: Close menu

Mami Tomoe
User Off Offline

Quote
You can't close it.

Possible workarounds:
• You can show an invisible menu using the @i suffix, good in theory, bad in practice, nobody knows this feature exists and it doesn't actually close the menu, just replaces it with an empty invisible menu.
• Create an empty menu to replace the old menu, doesn't close it, only prevents seeing the old content.
• Create your own GUI for menus where you can show your own menu (cs2d lua cmd image) and then free the image (cs2d lua cmd freeimage) when you want to close the menu.

There could be other approaches you can take, but realistically it is not currently possible to close the menu, you can only hide it in various ways (whilst retaining a menu open) or create your own menu system.

old Re: Close menu

JonyFrosta
User Off Offline

Quote
I need to close the menu, not hide, not create a custom.
I use the @i menu to hide the interface of items (at the top of the screen) when scrolling the mouse wheel. And in order to restore the normal process, I need to close the menu with the @i parameter.

old Re: Close menu

Mami Tomoe
User Off Offline

Quote
As I said, CS2D does not have a function permitting closing a menu as a server to the client.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview