Ctc icon in NVL mode

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
Post Reply
Message
Author
User avatar
DesertFox
Regular
Posts: 196
Joined: Sun Jul 28, 2013 1:29 pm
Completed: Over The Hills And Far Away
Projects: My Little Dictator
Organization: WarGirl Games
Contact:

Ctc icon in NVL mode

#1 Post by DesertFox » Tue Sep 22, 2015 3:55 pm

I'm trying to get a CTC icon nestled at the end of lines in NVL mode, but instead it places itself on the line below. Each line then realigns once you move onto the next one, and it looks kind of sloppy. Not sure what's going wrong.

Code: Select all

define narrator = Character(' ', color="#c8ffc8", kind=nvl, ctc="ctc", ctc_position="nestled")

Code: Select all

screen nvl(dialogue, items=None):
    window:
        style "nvl_window"
        has vbox:
            style "nvl_vbox"
        # Display dialogue.
        for who, what, who_id, what_id, window_id in dialogue:
            window:
                id window_id
                has hbox:
                    spacing 10
                if who is not None:
                    text who id who_id
                text what id what_id

User avatar
PyTom
Ren'Py Creator
Posts: 15893
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Ctc icon in NVL mode

#2 Post by PyTom » Tue Sep 22, 2015 9:02 pm

Can you take a couple of screenshots? My guess is that Ren'Py isn't breaking the line before the CTC indicator. Maybe try:

Code: Select all

define narrator = Character(' ', color="#c8ffc8", kind=nvl, ctc="ctc", ctc_position="nestled", what_suffix=' ')
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
DesertFox
Regular
Posts: 196
Joined: Sun Jul 28, 2013 1:29 pm
Completed: Over The Hills And Far Away
Projects: My Little Dictator
Organization: WarGirl Games
Contact:

Re: Ctc icon in NVL mode

#3 Post by DesertFox » Tue Sep 22, 2015 11:26 pm

Never mind. It was an issue with my definition of the ctc image. Apparently including a 'contains' block will affect the ctc icon's position and line spacing.

Code: Select all

image ctc :
    contains:
        "gui/ctc.png"
        alpha 1.0
        pause 0.8
        alpha 0
        pause 0.8
        alpha 1.0
        repeat

Post Reply

Who is online

Users browsing this forum: Google [Bot]