Ren'Py Add image & multiple rows to single text box on Main Menu

Symphatic

Trial Moderator
Trial Moderator
Uploader
Donor
Nov 25, 2021
410
1,688
My English is doodoo today so bare with me some. I'm trying to mimic something (Image 2) and can't seem to figure it out. How do I mimic what's in the second image on image one? Preferably the flower on the left side and not right.

Image 1, Renpy.
1662939204355.png

Image 2, Website.
1662939396831.png
 

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,607
2,256
Probably a simple .

I'm thinking {p=0} (paragraph, with zero wait time).
Or an \n. See :

So "Line 1{p=0}Line2" or "Line 1\nLine2".

I assume textbutton will resize accordingly. But it'll need testing.

The other text tag you'll need for the picture is .
 
Last edited:

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,964
16,209
I'm thinking {p=0} (paragraph, with zero wait time).
Or an \n. See :
More the second. I'm almost sure that "flow" tags are ignored in screens. They are anyway relatively meaningless since the text is always shown immediately.
 
  • Like
Reactions: 79flavors

guest1492

Member
Apr 28, 2018
350
288
Isn't OP asking how to add a flower image to the left of the text button on hover, perhaps with a tooltip?
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,964
16,209
Isn't OP asking how to add a flower image to the left of the text button on hover, perhaps with a tooltip?
Oh... Then it's by using a as , with a little bit of as final touch.
The trick is to have an image that will have two-three pixel at full transparency at its left side, then to define the Frame in such wait that it will keep the right side (where the flower or whatever is) unchanged.

Assuming that the flower is 20 pixels wide:
Python:
style myButton is button:
    # Keep as it the 20 first pixels from the right
    background Frame( "background.png", right=20 )
    #  Add a 25 pixel margin at the right side, where the /flower/ will
    # take place, plus 5 pixels to aerate.
    right_margin 25

screen whatever():
    textbutton "whatever":
        # Apply this new style to the button.
        style "myButton"
        action NullAction()
 

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,607
2,256
Isn't OP asking how to add a flower image to the left of the text button on hover, perhaps with a tooltip?

I didn't think so.
I thought it was just "picture of a flower + japanese text", with "english text" below it on a second line.

Plus there was a discussion a little while ago that confirmed it's not really practical to have hover mechanics for a textbutton, though like everything with RenPy... there's a work-around if you are willing to bodge things a little.
 

Symphatic

Trial Moderator
Trial Moderator
Uploader
Donor
Nov 25, 2021
410
1,688
Oh... Then it's by using a as , with a little bit of as final touch.
The trick is to have an image that will have two-three pixel at full transparency at its left side, then to define the Frame in such wait that it will keep the right side (where the flower or whatever is) unchanged.

Assuming that the flower is 20 pixels wide:
Python:
style myButton is button:
    # Keep as it the 20 first pixels from the right
    background Frame( "background.png", right=20 )
    #  Add a 25 pixel margin at the right side, where the /flower/ will
    # take place, plus 5 pixels to aerate.
    right_margin 25

screen whatever():
    textbutton "whatever":
        # Apply this new style to the button.
        style "myButton"
        action NullAction()
It's 26 pixels wide. I made the edited one 50 (adding 24 on the right).
Thank you! Sorry I have been at work. Is this enough? icon_flower_w.png
Here is the original: icon_flower_w.png