maulz Posted July 7, 2018 Share Posted July 7, 2018 Hello, I Need some help. How can i minimize menu of lua script, and when i click GG button the menu show again? Please answer my question. Thanks Link to comment Share on other sites More sharing options...
CmP Posted July 7, 2018 Share Posted July 7, 2018 You may use the following example. Should not be hard to adapt it according to what you need. local function showMenu() local action = gg.choice({'Minimize menu (close GG interface)', 'Minimize menu (without closing GG interface)'}) if action == nil then -- something to perform if user cancelled the menu elseif action == 1 then if gg.isVisible() then gg.setVisible(false) end elseif action == 2 then while true do if not gg.isVisible() then break else gg.sleep(100) end end end end while true do if gg.isVisible() then showMenu() else gg.sleep(100) end end Link to comment Share on other sites More sharing options...
maulz Posted July 8, 2018 Author Share Posted July 8, 2018 @CmP Sorry sir, can you make a example script. Because when i try that, the script error *look at the image Thank before Link to comment Share on other sites More sharing options...
Administrators Enyby Posted July 8, 2018 Administrators Share Posted July 8, 2018 @maulz invisible bad char after "function" word. Retype first line manually, not copy from forum. Link to comment Share on other sites More sharing options...
CmP Posted July 9, 2018 Share Posted July 9, 2018 12 hours ago, maulz said: @CmP Sorry sir, can you make a example script. That's strange, copied the code above to a file and executed it, worked without any errors. Anyway, here is the file with this code. Let me know, if it works for you.minimize_menu_sample.lua Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.