Jump to content

How Can I Minimize Lua Script Menu?


maulz

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.