Files
Basalt/docs/docs1_6/objects/Basalt/removeFrame.md
Robert Jelic d4c72514ef Docs 1.6
Accidentally uploaded outdated 1.6 docs
2023-05-01 16:28:46 +02:00

888 B

Basalt

removeFrame

Removes the base frame by it's id. This only works for base-frames.

Parameters

  1. string id - ID of the base-frame.

Usage

  • Removes the previously created frame with id "secondBaseFrame" The frame id is gotten from a frame variable's :getName()
local main = basalt.createFrame("firstBaseFrame")
local main2 = basalt.createFrame("secondBaseFrame")
main:addButton()
    :setText("Remove")
    :onClick(function()
        basalt.removeFrame(main2:getName())
    end)
  • Removes the previously created frame with id "secondBaseFrame", without frame stored in variable The frame id is the frame's name
local main = basalt.createFrame("firstBaseFrame")
local main2 = basalt.createFrame("secondBaseFrame")
main:addButton()
    :setText("Remove")
    :onClick(function()
        basalt.removeFrame("secondBaseFrame")
    end)