Ren'Py (Solved) Help with existing code adjustment

Kakimito

Newbie
Jan 25, 2022
94
61
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
2,296
3,953
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

Newbie
Jan 25, 2022
94
61
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
2,296
3,953
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
4,914
8,026
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