Rotate Namebox
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Rotate Namebox
Is it possible to rotate the gui.name and gui.namebox?
Re: Rotate Namebox
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
A partial solution was to add a hbox for the two windows. Hence my code became:
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"
- Attachments
-
- First example.
- screenshot1.png (11.11 KiB) Viewed 2359 times
-
- Second example.
- screenshot2.png (12.41 KiB) Viewed 2359 times
Re: Rotate Namebox
Hmm, I didn't mean to make it vertical, I meant being able to put it at a 15 Degree angle.
Re: Rotate Namebox
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.
Perhaps you can add the rotated name to the side image, and just hide the namebox.
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3794
- Joined: Mon Dec 14, 2015 5:05 am
- itch: Imperf3kt
- Location: Your monitor
- Contact:
Re: Rotate Namebox
Use ATL
Include "text" instead of "image"
Then don't use a namebox, instead make a function so every time a character shows, your ATL also shows (I Don't know how to do this) or call it every time manually.
That or put it physically in the side image.
These are my suggestions, they may not be optimal, so use them with caution.
Include "text" instead of "image"
Then don't use a namebox, instead make a function so every time a character shows, your ATL also shows (I Don't know how to do this) or call it every time manually.
That or put it physically in the side image.
These are my suggestions, they may not be optimal, so use them with caution.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Twitter
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
- Divona
- Miko-Class Veteran
- Posts: 678
- Joined: Sun Jun 05, 2016 8:29 pm
- Completed: The Falconers: Moonlight
- Organization: Bionic Penguin
- itch: bionicpenguin
- Contact:
Re: Rotate Namebox
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"
. . .
Re: Rotate Namebox
Woo, that works, after fiddling with positioning and stuff it'll work great, thanks!
-
- Newbie
- Posts: 10
- Joined: Fri Jul 03, 2015 6:17 am
- Tumblr: dallasgenoard
- Skype: touhruadachi
- Contact:
Re: Rotate Namebox
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" . . .
How do I use this code? I've been Googling for over an hour, trying various things, and I can't figure out how ATLs work at all ( extreme noob to all of this ). I've pasted the rotate code in, and now I'm not sure where to go from there. Could you explain a bit more ... ?
I'm more or less trying to rotate the name to fit on the image!
http://prntscr.com/f9wvav
- Divona
- Miko-Class Veteran
- Posts: 678
- Joined: Sun Jun 05, 2016 8:29 pm
- Completed: The Falconers: Moonlight
- Organization: Bionic Penguin
- itch: bionicpenguin
- Contact:
Re: Rotate Namebox
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.
-
- Newbie
- Posts: 10
- Joined: Fri Jul 03, 2015 6:17 am
- Tumblr: dallasgenoard
- Skype: touhruadachi
- Contact:
Re: Rotate Namebox
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.
So I thought it might have been a problem with my customization initially, and I've been messing around with various things on a default code instead.
I more or less added the transform to the original screens rpy file. Is there something that I should place somewhere else as well? I feel like I must be missing adding a certain tag to other option rpy files, or to my script, or something like that, because I can't for the life of me think of what else it could be.
- Attachments
-
- test code.png (9.77 KiB) Viewed 2259 times
- Divona
- Miko-Class Veteran
- Posts: 678
- Joined: Sun Jun 05, 2016 8:29 pm
- Completed: The Falconers: Moonlight
- Organization: Bionic Penguin
- itch: bionicpenguin
- Contact:
Re: Rotate Namebox
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"
-
- Newbie
- Posts: 10
- Joined: Fri Jul 03, 2015 6:17 am
- Tumblr: dallasgenoard
- Skype: touhruadachi
- Contact:
Re: Rotate Namebox
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"
Who is online
Users browsing this forum: Google [Bot], Ocelot