Closed ambr0sial closed 2 years ago
Hello! There is in fact a way to do what you want! Just call the function Center.TextAlign with your variable as an argument! Then you can do whatever you want with it :)
Hello! Thank you for your answer, however, maybe I'm doing something wrong, but it does the same as if I used Center.XCenter (Pystyle updated at the latest version, 2.0) Just in case, here is the code:
Write.Print(text=Center.TextAlign("You're currently using a beta version of Winter. If you notice any bugs, please report them to the developer."), color=Colors.red_to_white, interval=0.002)
And also, I don't know if that changes something, but I used System.Size(100, 50)
Have a good day!
Hello again. Text align is used to align multiple lines, not just one. In your case, Center.XCenter should be working perfectly and shouldn't align to left since you have only one line. Can you show me your code with Center.XCenter so I can see what's causing the problem?
It is only one line but is still left justified because it is automatically jumping one line because of the window size. I would like the "developer" that is in the second line to be centered in X position.
Here's the first lines of the code:
System.Clear()
System.Title("Winter")
print('\n' * 2)
print(Colorate.Diagonal(color=Colors.blue_to_white, text=Center.XCenter(ascii_art)))
print('\n' * 2)
Write.Print(text=Center.TextAlign("You're currently using a beta version of Winter. If you notice any bugs, please report them to the developer."), color=Colors.red_to_white, interval=0.002)
print('\n' * 3)```
//other part of the code that isn't important
The problem here is that the size of the terminal is too small. Just put it bigger, it should correct the problem with Center.TextAlign !
That was the size of the terminal. Thank you!
Is there a way to do multi-line with Center.XCenter without the text being left justified (I want my text to be middle aligned)?