- 60
- Posts
- 11
- Years
- Seen Jul 9, 2015
I'm using pbDrawTextPositions to display a .txt file, the problem is that I have no idea how to change to a second line, that's what I tried:
I did type \n in the .txt file but it didn't really work, any help would be appreciated!
-edit-
Of course I know I could just use a "for i" each line and it would still be good enough, what I'm asking is having
a single line but with "\n" each time I want to break it and a way to recognize that \n must be read as a break line and not just as text.
The reason I won't simply do a simple "for i" with i being the number of lines, is just for learning purposes =P that's if what i'm asking is even possible.
Code:
textPositions=
[
[_INTL(file.readlines.to_s),34,20,0,baseColor,shadowColor]
]
for i in file.readlines
textPositions.push i.sub(/\n/) {}
end
I did type \n in the .txt file but it didn't really work, any help would be appreciated!
-edit-
Of course I know I could just use a "for i" each line and it would still be good enough, what I'm asking is having
a single line but with "\n" each time I want to break it and a way to recognize that \n must be read as a break line and not just as text.
The reason I won't simply do a simple "for i" with i being the number of lines, is just for learning purposes =P that's if what i'm asking is even possible.
Last edited: