- EnableLayers()
n = CreateTextObject(Nil, "yea", color=#BLACK)
SetLayerStyle(n, {text="no"})
why does setlayerstyle not accept createlayer ID?
why does setlayerstyle not accept createlayer ID?
What am I doing wrong in here, or is this some sort of bug?
Re: why does setlayerstyle not accept createlayer ID?
Forgot to add one line to show that it works in other place:
So createtextobjecst output works when using DisplayTextObject, but it wont work when using setlayerstyle?
Code: Select all
EnableLayers()
n = CreateTextObject(Nil, "yea", color=#BLACK)
DisplayTextObject(n, 100, 100)
SetLayerStyle(n, {text="no"})
Re: why does setlayerstyle not accept createlayer ID?
I got round the problem and probably figured what half the problem was too.
Displaytextobject makes a textout layer, hence i had to figure out the ID of that new layer.
I took it by looking what is the highest numbered layer attached to that bgpic, but is there a better way to do it?
Displaytext dont seem to return the id of the layer it creates, but is there a way to give that textout layer a name when creating it, like "DisplayTextObject(1, 100, 100, {name="myname"})"?
Displaytextobject makes a textout layer, hence i had to figure out the ID of that new layer.
I took it by looking what is the highest numbered layer attached to that bgpic, but is there a better way to do it?
Displaytext dont seem to return the id of the layer it creates, but is there a way to give that textout layer a name when creating it, like "DisplayTextObject(1, 100, 100, {name="myname"})"?
Re: why does setlayerstyle not accept createlayer ID?
DisplayTextObject(n, 100, 100)
SetLayerName(0, "mytextlayer")
ID 0 in SetLayerName modifies the last added layer.
SetLayerName(0, "mytextlayer")
ID 0 in SetLayerName modifies the last added layer.
Re: why does setlayerstyle not accept createlayer ID?
Ah, thats a good tip. I had missed that 0 option.
Re: why does setlayerstyle not accept createlayer ID?
Thanks a lot, jPV! I also missed that 0 option (that should be highlighted definitely better in the documentation, it is easy to overread) and wonder and tried exactly like Bugala.
Glad I used the board search.
Glad I used the board search.
Currently using: Hollywood 9 with Windows IDE and Hollywood 9 with Visual Studio Code and hw4vsc