Code: Select all
function displayTextBox(inputStringArray)
currentTextPossition = 1
local textFrame = loveframes.Create("frame")
textFrame:SetName("")
textFrame:SetPos(0,476)
textFrame:SetSize(640,100)
textFrame:SetState("playing")
textFrame:ShowCloseButton(false)
textFrame:SetResizable(false)
textFrame:SetDraggable(false)
local listText = loveframes.Create("list", textFrame)
listText:SetPos(0, 0)
listText:SetSize(640, 100)
listText:SetPadding(5)
listText:SetSpacing(5)
TextBox = loveframes.Create("text")
TextBox:SetText(inputStringArray[currentTextPossition])
listText:AddItem(TextBox)
NextTextButton = loveframes.Create("button", textFrame)
NextTextButton:SetText("Next")
NextTextButton:SetPos(555,70)
NextTextButton.OnClick = function(object)
if inputStringArray[(currentTextPossition + 1)] ~= nil then
currentTextPossition = currentTextPossition + 1
TextBox:SetText(inputStringArray[currentTextPossition])
else
textFrame:Remove()
end
end
end