Help, my textbox moves on it's own!

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
Chansel
Veteran
Posts: 249
Joined: Sat May 01, 2010 6:11 pm
Projects: School's Out! -- A GxB or GxG VN/Dating Sim
Location: The Netherlands, Noord-Brabant
Contact:

Help, my textbox moves on it's own!

#1 Post by Chansel »

Good day to all you lovely forum member out there ^^

I've gotten myself into some trouble with my textbox, which seems to have grown legs or something...
When I add my namebox, it's right where it should be.
But if I use my narrator (without textbox) or present the player with choices, the textbox jumps a couple of px (I'd say 10-15?) to the right :S

Now I know that I made a mistake somewhere, otherwise the textbox would be a good boy and stay put. But I honestly can't spot it T^T

Here's the code for both the textbox and the namebox:

Code: Select all


# ███▓▒░ FRAME ░▒▓███████████████████████████████████████████
    ## The background of the window. In a Frame, the two numbers
    ## are the size of the left/right and top/bottom borders,
    ## respectively.

    style.window.background = Frame("gui/frame.png", 741, 185)

    ## Margin is space surrounding the window, where the background
    ## is not drawn.

    style.window.left_margin = 29
    style.window.right_margin = 6
    # style.window.top_margin = 6
    style.window.bottom_margin = 3   

    ## Padding is space inside the window, where the background is
    ## drawn.

    style.window.left_padding = 50
    style.window.right_padding = 50
    style.window.top_padding = 16
    style.window.bottom_padding = 75

    ## This is the minimum height of the window, including the margins
    ## and padding. 
    
    ##Making the max and min the same assures that the window won't change size.

    style.window.yminimum = 188
    style.window.ymaximum = 188
    style.window.xminimum = 776
    style.window.xmaximum = 776
    
# ███▓▒░ NAMEBOX ░▒▓███████████████████████████████████████████
## The namebox settings
    style.say_who_window.background = Frame("gui/namebox.png", 223, 74) #Background skin
    style.say_who_window.xalign = 0.0
    style.say_who_window.yalign = 1.0
    #style.say_who_window.xpos = 100 #For precise placement
    #style.say_who_window.ypos = 100 #For precise placement
    style.say_who_window.left_padding = 50
    style.say_who_window.top_padding = 36
    style.say_who_window.bottom_padding = 15
    style.say_who_window.xminimum = 223
    style.say_who_window.yminimum =  74
    style.say_who_window.ymaximum = 74
Any form of help would be greatly appreciated ^^

Xx
Image ~ A GxB or GxG Visual Novel/Dating Sim

User avatar
Aleema
Lemma-Class Veteran
Posts: 2677
Joined: Fri May 23, 2008 2:11 pm
Organization: happyB
Tumblr: happybackwards
Contact:

Re: Help, my textbox moves on it's own!

#2 Post by Aleema »

What do your character definitions look like? Something might be going on in them to adjust the alignment.

Which is also a way to fix this; you can tell the Narrator character to move 10-15 pixels to the left to compensate. I know this doesn't fix the problem, but it let's you move on to more important things. :)

Code: Select all

$ narrator = Character(None, window_left_margin=-10)
Also, I'm stealing your ASCII separators. Such a good idea. >_>

Chansel
Veteran
Posts: 249
Joined: Sat May 01, 2010 6:11 pm
Projects: School's Out! -- A GxB or GxG VN/Dating Sim
Location: The Netherlands, Noord-Brabant
Contact:

Re: Help, my textbox moves on it's own!

#3 Post by Chansel »

First of all, thank you very much for helping me again =D
You're too kind ^^
What do your character definitions look like? Something might be going on in them to adjust the alignment.
They look like this:

Code: Select all

    $ Al = Character('Alessandro de Luca', show_two_window=True)   
    
    $ Ka = Character('Kaori', show_two_window=True)   
    
    $ Ik = Character(None)
(Ik is the Dutch word for 'me'. Since it's nice and short, I'm using it instead of 'narrator' or something similar.)
If I add the window_left_margin the textbox get's stretched out O.o So I used window_right_margin to, uhm 'shrink' it back again. It doesn't move now (yay!), but I think the code is messy this way...
So, there's no real rush. But if you happen to know where the mistake is, that'd be great ^^
Also, I'm stealing your ASCII separators. Such a good idea. >_>
Hehe, I stole them myself from a demo I downloaded ^^" HMG - Heavy Metal Girl Madonna.

And thank you again for helping me out for the second time in two days ^^
If there's anything I can do for you, be sure to let me know :) (though I doubt It'd be code-related :P)
Image ~ A GxB or GxG Visual Novel/Dating Sim

dott.Piergiorgio
Veteran
Posts: 345
Joined: Sun May 18, 2008 1:52 pm
Contact:

Re: Help, my textbox moves on it's own!

#4 Post by dott.Piergiorgio »

Out of curiosity, how is one pg has an Italian name & surname ? (and I hope you're not taking some sort of virtual revenge toward certain questionable behaviour of a subspecie of my not-so-fellow countrymen....)

Best regards from Italy,
dott. Piergiorgio.

User avatar
Aleema
Lemma-Class Veteran
Posts: 2677
Joined: Fri May 23, 2008 2:11 pm
Organization: happyB
Tumblr: happybackwards
Contact:

Re: Help, my textbox moves on it's own!

#5 Post by Aleema »

Haha, well that's some simply character codes. Mine are usually a huge mess (at least the template character is) with various bells and whistles, haha. I'd probably have to look at your window images and mess around with them in an editor to see what's really happening. Just seeing the numbers doesn't scream that anything's wrong, outside of using the entire width and length of a window in the Frame("file",#,#) code. (Techincally, you're supposed to put the size of the corners, but not a big deal really.)

In regards to using Ik instead of Narrator ... you don't actually type the word Narrator to get the narrator's formating. Writing with just quotes is considered the Narrator, so when I suggested editing the Narrator character, I was suggesting editing the default text.

Code: Select all

"This is the text formated by the Narrator character."
Ik "This is the text formated by the Ik character."
Forgive me if you knew that already and I misunderstood you. >_>

And of course, I will help you anytime. :)
dott.Piergiorgio wrote:Out of curiosity, how is one pg has an Italian name & surname ? (and I hope you're not taking some sort of virtual revenge toward certain questionable behaviour of a subspecie of my not-so-fellow countrymen....)

Best regards from Italy,
dott. Piergiorgio.
Are you kidding? Italians are sexy. I'm sure the character reflects this somehow. ;)

Chansel
Veteran
Posts: 249
Joined: Sat May 01, 2010 6:11 pm
Projects: School's Out! -- A GxB or GxG VN/Dating Sim
Location: The Netherlands, Noord-Brabant
Contact:

Re: Help, my textbox moves on it's own!

#6 Post by Chansel »

Out of curiosity, how is one pg has an Italian name & surname ? (and I hope you're not taking some sort of virtual revenge toward certain questionable behaviour of a subspecie of my not-so-fellow countrymen....)

Best regards from Italy,
dott. Piergiorgio.
No, no revenge at all :P
He's the 'hot and young foreign language teacer' ^^ And he's actually going to be one of the dateble guys in the game (together with 2 others).
And I agree with Aleema. Italians are smexy *drools*
I just hope the name doesn't sound weird to an actual italian ^^" I did some research on wiki, so hopefully it's oke.
In regards to using Ik instead of Narrator ... you don't actually type the word Narrator to get the narrator's formating. Writing with just quotes is considered the Narrator, so when I suggested editing the Narrator character, I was suggesting editing the default text.
*nervous laugh* ...Hehe, thanks ^^" I thought that I had to 'create' a narrator character. So, yeah...
Well, now I know ^^

Xx
Image ~ A GxB or GxG Visual Novel/Dating Sim

User avatar
Aleema
Lemma-Class Veteran
Posts: 2677
Joined: Fri May 23, 2008 2:11 pm
Organization: happyB
Tumblr: happybackwards
Contact:

Re: Help, my textbox moves on it's own!

#7 Post by Aleema »

Chansel wrote: No, no revenge at all :P
He's the 'hot and young foreign language teacer' ^^ And he's actually going to be one of the dateble guys in the game (together with 2 others).
I WANT TO PLAY YOUR GAME.

dott.Piergiorgio
Veteran
Posts: 345
Joined: Sun May 18, 2008 1:52 pm
Contact:

Re: Help, my textbox moves on it's own!

#8 Post by dott.Piergiorgio »

Chansel wrote: I just hope the name doesn't sound weird to an actual italian ^^" I did some research on wiki, so hopefully it's oke.
no, is an actual Italian name, hence my question, also implyng that your research is really well done, actually perfectly done ;) :D

one thing, perhaps secondary, the minuscule d in surname, as in french usage, denoty nobility, as the german "von" (I guess you know well, because this cause misunderstandings with the Dutch "Van" (there's many people whose actually think that Ludwig Van Beethoven or Rembrandt Van Rijin was nobles....)

On the narrator thing, I guess "ik" is perfect, authorship being, well, telling a tale or history :) so the narrator=author equation is conceptually sound, at least IMVHO.

On Italian as people, I guess that my opinion somewhat differ, because I value much more brains than aesthetics in people :D After all, is brain (or, at least a part of it) that create aesthetics, as one whose has even done a cursory look at Italian things :D

is not by random that I chose the pic I posted in that "your pic" thread, after all....

Best regards from Italy,
dott. Piergiorgio.

Chansel
Veteran
Posts: 249
Joined: Sat May 01, 2010 6:11 pm
Projects: School's Out! -- A GxB or GxG VN/Dating Sim
Location: The Netherlands, Noord-Brabant
Contact:

Re: Help, my textbox moves on it's own!

#9 Post by Chansel »

I WANT TO PLAY YOUR GAME
You just summed up the goal of the game :P (making people want to play it).
no, is an actual Italian name, hence my question, also implyng that your research is really well done, actually perfectly done ;) :D

one thing, perhaps secondary, the minuscule d in surname, as in french usage, denoty nobility, as the german "von" (I guess you know well, because this cause misunderstandings with the Dutch "Van" (there's many people whose actually think that Ludwig Van Beethoven or Rembrandt Van Rijin was nobles....)
Yay! I'm so happy it's a believable name ^^
It took me a looooong time to decide on his name. Much longer than the other characters combined, actually :S
And yes, I did know that it denotes nobility. But I won't say much more on this subject, because I don't want to give away too much of his secrets ^^
Hmm.. I never knew we Hollanders were mistaken for nobles because of our 'van'. It's kinda funny, actually :P
On Italian as people, I guess that my opinion somewhat differ, because I value much more brains than aesthetics in people :D After all, is brain (or, at least a part of it) that create aesthetics, as one whose has even done a cursory look at Italian things :D
I actually completely agree with you. But it doesn't hurt to have a little eye-candy walking around here and there, right? ^^
Image ~ A GxB or GxG Visual Novel/Dating Sim

dott.Piergiorgio
Veteran
Posts: 345
Joined: Sun May 18, 2008 1:52 pm
Contact:

Re: Help, my textbox moves on it's own!

#10 Post by dott.Piergiorgio »

Chansel wrote: I actually completely agree with you. But it doesn't hurt to have a little eye-candy walking around here and there, right? ^^
heh. I'm always caught off-guard by these observations from foreigners, because, well, there's too many of what you call "eye-candy walking around" everytime I'm outside ;) and of course I don't realize this privilege :D

Now, on your char; I assume that is an JET teacher, whose are always of English language & mothertongue; so I suggest, on the basis of your very little teaser on his background, that will be more realistic an Italo-Briton background than an Italo-American background.....

Best regards from Italy,
dott. Piergiorgio.

Chansel
Veteran
Posts: 249
Joined: Sat May 01, 2010 6:11 pm
Projects: School's Out! -- A GxB or GxG VN/Dating Sim
Location: The Netherlands, Noord-Brabant
Contact:

Re: Help, my textbox moves on it's own!

#11 Post by Chansel »

I have to say that I haven't really thought it through yet.
He's the last character I'm developing and he's about half-way through.
Thanks for the advise though, I'll defiantly keep it in mind ^^
Image ~ A GxB or GxG Visual Novel/Dating Sim

Post Reply

Who is online

Users browsing this forum: geoWaffle, Google [Bot]