Rotate Namebox
Posted: Fri Apr 28, 2017 2:36 pm
Is it possible to rotate the gui.name and gui.namebox?
Supporting creators of visual novels and story-based games since 2003.
https://lemmasoft.renai.us/forums/
In screens.rpy, find the "screen say" definition. There is a line that says:Rils wrote:Is it possible to rotate the gui.name and gui.namebox?
Code: Select all
text who id "who"
Code: Select all
text who id "who" vertical True
Code: Select all
screen say(who, what):
style_prefix "say"
window:
id "window"
hbox:
if who is not None:
window:
style "namebox"
text who id "who" vertical True
text what id "what"
I am not sure you can do it with text :ORils wrote:Hmm, I didn't mean to make it vertical, I meant being able to put it at a 15 Degree angle.
Code: Select all
transform namebox_rotate():
rotate -15
screen say(who, what):
. . .
if who is not None:
window at namebox_rotate:
style "namebox"
text who id "who"
text what id "what"
. . .
Sorry, this is an old thread and I should probably just use mine, but.Divona wrote:Make an ATL code to rotate object -15 degree. Add it to namebox window in "screen say()" under "screens.rpy".Code: Select all
transform namebox_rotate(): rotate -15 screen say(who, what): . . . if who is not None: window at namebox_rotate: style "namebox" text who id "who" text what id "what" . . .
Thank you for all your help.Divona wrote:If you could drop the code you have here, I could help point out what else you need to do. It's pretty much just having a transform code somewhere and make an edit to "screen say" in "screens.rpy" file.
Code: Select all
transform namebox_rotate():
rotate -15
screen say(who, what):
style_prefix "say"
window:
id "window"
if who is not None:
window at namebox_rotate:
style "namebox"
text who id "who"
text what id "what"
Oh, I see! D'oh. What a simple fix that I completely overlooked, haha. The grief of the hours I spent puzzling over ATLs and such. At least I learned some things that may be useful in the future. Thanks so much again!Divona wrote:You have to assign transform to "who" window, and that's it. You can continue to add more style and transform properties to "namebox_rotate()" to adjust the position and other things to your liking.Code: Select all
transform namebox_rotate(): rotate -15 screen say(who, what): style_prefix "say" window: id "window" if who is not None: window at namebox_rotate: style "namebox" text who id "who" text what id "what"