She's waiting...ready to tease you live - Jerkmate is free! Join Now!
x

Ren'Py (Solved) Help with existing code adjustment

Kakimito

Member
Jan 25, 2022
139
82
73
Hello everyone
Im trying to make a tooltip that follows user's mouse and then found this f95 thread: Link (
f95zoneuser463's last posts in thread)
But then I wanted to add a different displayable into a tooltip to part of code below:
Code:
fixed = Fixed(self.backgroundcolor, xpos=-self.padding, xsize=int(w)+self.padding*2, ysize=int(h)+self.padding*2)
    fixed.add(self.text)
    render.place(fixed, x, y)
(I wanted to add a window with my own styles)
And sadly no success... Can anyone help me please?
 

osanaiko

Engaged Member
Modder
Jul 4, 2017
3,389
6,508
707
Code:
fixed = Fixed(self.backgroundcolor, xpos=-self.padding, xsize=int(w)+self.padding*2, ysize=int(h)+self.padding*2)
    fixed.add(self.text)
    render.place(fixed, x, y)
In your example code the "self.text" is the displayable (or actually a string that renpy magically converts into a Text displayable) that is being added into the "Fixed" container.

Replace that with your displayable and see what you get.

You'll almost certainly have to adjust the "w" and "h" variables to suit the dimensions of your "window" displayable.
 

Kakimito

Member
Jan 25, 2022
139
82
73
Code:
fixed = Fixed(self.backgroundcolor, xpos=-self.padding, xsize=int(w)+self.padding*2, ysize=int(h)+self.padding*2)
    fixed.add(self.text)
    render.place(fixed, x, y)
In your example code the "self.text" is the displayable (or actually a string that renpy magically converts into a Text displayable) that is being added into the "Fixed" container.

Replace that with your displayable and see what you get.

You'll almost certainly have to adjust the "w" and "h" variables to suit the dimensions of your "window" displayable.
forgot to say thanks, sorry
your answer helped

can I close thread somehow if I dont need it anymore?
 

osanaiko

Engaged Member
Modder
Jul 4, 2017
3,389
6,508
707
forgot to say thanks, sorry
your answer helped

can I close thread somehow if I dont need it anymore?
You're welcome!

No need to close threads (in fact I don't think it's possible), better to leave them so others can find and potentially learn from.
 
  • Like
Reactions: Kakimito

MissFortune

I Was Once, Possibly, Maybe, Perhaps… A Harem King
Respected User
Game Developer
Aug 17, 2019
6,827
10,555
872
No need to close threads (in fact I don't think it's possible), better to leave them so others can find and potentially learn from.
Putting something like "(Solved)" in the title might be helpful, though, so people know it was answered.
 
  • Like
Reactions: osanaiko