Would work in much same way as any other panel, only it would appear in a separate 'gui.overlay' layer. The panels default to hidden, but can be shown and aligned with new GUI method such as:
Code: Select all
local overlay = game.players[somePLayer].gui.overlay
overlay.somePopUp.snap_to( anotherGuiElement, position )
overlay.somePopUp.style.visible = true
This way, when a button is clicked we could easily show a popup panel aligned to that button, for example:
Code: Select all
-- note: could also trigger on custom-input events
script.on_event(defines.events.on_gui_click, function(event)
local popup = game.players[event.player_index].gui.overlay.myPopUp
popup.snap_to( event.element, "bottom-left" )
popup.style.visible = not popup.visible
end )