RhenaudTheLukark / CreateYourFrisk

Rhenaud The Lukark's Unitale fork
GNU General Public License v3.0
133 stars 56 forks source link

[next] not working for text object #25

Closed TomaszewskiPatryk closed 5 years ago

TomaszewskiPatryk commented 5 years ago

Bug description In text objects (created by CreateText()) [next] is completely ignored (same goes for [finished] and [nextthisnow], but I assume those are only related to enemy dialog).

Code to reproduce

Text = CreateText({"This is[next]","text that","should automatically change"},{320, 240},150,"Top",150)
Text.progressmode = "manual"

Workaround If anyone else is struggling with this, there is a workaround for it. You have to create a global variable where the text object is stored as well as a function which has .NextLine() inside of it. While it is a working solution, it is required to create a variable and function for each and every text object (when you want to display more than one at once), extremely cluttering the code.

local Text
function PseudoNext()
  Text.NextLine()
end
Text = CreateText({"This is[func:PseudoNext]","text that","should automatically change"},{320, 240},150,"Top",150)
Text.progressmode = "manual"

Setup:

RhenaudTheLukark commented 5 years ago

We'll look into it right now!

RhenaudTheLukark commented 5 years ago

Fixed in the last commit to master!