Lemma Soft Forums

Supporting creators of visual novels and story-based games since 2003.

Visit our new games list, blog aggregator, IRC channel, and Discord (new).
Activation problem? Email pytom@bishoujo.us.
It is currently Tue Jun 27, 2017 8:14 pm

All times are UTC - 5 hours [ DST ]


Forum rules


This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like, and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.



Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: Rotate Namebox
PostPosted: Fri Apr 28, 2017 2:36 pm 
Newbie

Joined: Sat Oct 22, 2016 11:20 pm
Posts: 9
Is it possible to rotate the gui.name and gui.namebox?


Top
 Profile Send private message  
 
 Post subject: Re: Rotate Namebox
PostPosted: Fri Apr 28, 2017 3:44 pm 
Newbie

Joined: Sat Apr 08, 2017 1:07 pm
Posts: 17
Location: Europe
Rils wrote:
Is it possible to rotate the gui.name and gui.namebox?


In screens.rpy, find the "screen say" definition. There is a line that says:
Code:
text who id "who"


Change it to:
Code:
text who id "who" vertical True


Now, when I tried it, the name was overlapping a bit with the text message.

A partial solution was to add a hbox for the two windows. Hence my code became:
Code:
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"


Now the name is a bit too far from the text, for my liking, but it is a start! :smile:


Attachments:
File comment: First example.
screenshot1.png
screenshot1.png [ 11.11 KiB | Viewed 219 times ]
File comment: Second example.
screenshot2.png
screenshot2.png [ 12.41 KiB | Viewed 219 times ]
Top
 Profile Send private message  
 
 Post subject: Re: Rotate Namebox
PostPosted: Fri Apr 28, 2017 5:39 pm 
Newbie

Joined: Sat Oct 22, 2016 11:20 pm
Posts: 9
Hmm, I didn't mean to make it vertical, I meant being able to put it at a 15 Degree angle.


Top
 Profile Send private message  
 
 Post subject: Re: Rotate Namebox
PostPosted: Fri Apr 28, 2017 7:24 pm 
Newbie

Joined: Sat Apr 08, 2017 1:07 pm
Posts: 17
Location: Europe
Rils wrote:
Hmm, I didn't mean to make it vertical, I meant being able to put it at a 15 Degree angle.

I am not sure you can do it with text :O

:idea: Perhaps you can add the rotated name to the side image, and just hide the namebox.


Top
 Profile Send private message  
 
 Post subject: Re: Rotate Namebox
PostPosted: Fri Apr 28, 2017 9:38 pm 
Miko-Class Veteran

Joined: Mon Dec 14, 2015 5:05 am
Posts: 638
Location: Your monitor
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.

_________________
Image
Ren'Py Raspberry Pi portable console build


Top
 Profile Send private message  
 
 Post subject: Re: Rotate Namebox
PostPosted: Fri Apr 28, 2017 10:55 pm 
Miko-Class Veteran
User avatar

Joined: Sun Jun 05, 2016 8:29 pm
Posts: 507
Completed: The Falconers: Moonlight
Organization: Bionic Penguin
Twitter: @BionicPenguinTH
itch.io: bionicpenguin
Make an ATL code to rotate object -15 degree. Add it to namebox window in "screen say()" under "screens.rpy".
Code:
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"

    . . .

_________________
Completed:
Image


Top
 Profile Send private message  
 
 Post subject: Re: Rotate Namebox
PostPosted: Sat Apr 29, 2017 2:25 am 
Newbie

Joined: Sat Oct 22, 2016 11:20 pm
Posts: 9
Woo, that works, after fiddling with positioning and stuff it'll work great, thanks!


Top
 Profile Send private message  
 
 Post subject: Re: Rotate Namebox
PostPosted: Fri May 19, 2017 10:08 pm 
Newbie

Joined: Fri Jul 03, 2015 6:17 am
Posts: 10
Twitter: @stanleypines_
Tumblr: dallasgenoard
Skype: touhruadachi
Divona wrote:
Make an ATL code to rotate object -15 degree. Add it to namebox window in "screen say()" under "screens.rpy".
Code:
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.
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


Top
 Profile Send private message  
 
 Post subject: Re: Rotate Namebox
PostPosted: Sat May 20, 2017 12:56 am 
Miko-Class Veteran
User avatar

Joined: Sun Jun 05, 2016 8:29 pm
Posts: 507
Completed: The Falconers: Moonlight
Organization: Bionic Penguin
Twitter: @BionicPenguinTH
itch.io: bionicpenguin
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.

_________________
Completed:
Image


Top
 Profile Send private message  
 
 Post subject: Re: Rotate Namebox
PostPosted: Sat May 20, 2017 2:21 am 
Newbie

Joined: Fri Jul 03, 2015 6:17 am
Posts: 10
Twitter: @stanleypines_
Tumblr: dallasgenoard
Skype: touhruadachi
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.

Thank you for all your help.

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. :oops:


Attachments:
test code.png
test code.png [ 9.77 KiB | Viewed 119 times ]
Top
 Profile Send private message  
 
 Post subject: Re: Rotate Namebox
PostPosted: Sat May 20, 2017 2:28 am 
Miko-Class Veteran
User avatar

Joined: Sun Jun 05, 2016 8:29 pm
Posts: 507
Completed: The Falconers: Moonlight
Organization: Bionic Penguin
Twitter: @BionicPenguinTH
itch.io: bionicpenguin
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:
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"

_________________
Completed:
Image


Top
 Profile Send private message  
 
 Post subject: Re: Rotate Namebox
PostPosted: Sat May 20, 2017 2:30 am 
Newbie

Joined: Fri Jul 03, 2015 6:17 am
Posts: 10
Twitter: @stanleypines_
Tumblr: dallasgenoard
Skype: touhruadachi
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:
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!


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: Imperf3kt


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Protected by Anti-Spam ACP
Powered by phpBB® Forum Software © phpBB Group