[SOLVED] Problem adding button on a viewport

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
javiert239
Newbie
Posts: 20
Joined: Fri Jul 24, 2015 10:34 pm
Contact:

[SOLVED] Problem adding button on a viewport

#1 Post by javiert239 »

Hi everyone.

I'm trying to add a button into a viewport I've created. But the problem is that when I add the button, the sidescroll bars stop working (you can see them, but don't work).

This is the code without the button:

Code: Select all

screen panel_tube:
                   add "images/icons/ViewTubeScreenF.png" xoffset 234 yoffset 135
                   imagebutton auto "images/icons/closewindow_%s.png" action Jump ("monitor") xoffset 1583 yoffset 135
                   screen viewport_example():
                       side "c b r":
                            area (584, 312, 923, 603)
                            viewport id "vp":
                                draggable True mousewheel True
                                add "images/icons/courses.png"
                            bar value XScrollValue("vp")
                            vbar value YScrollValue("vp")
Just in case, this is the code of the button:

Code: Select all

imagebutton auto "images/icons/CSGO_%s.png" action Jump ("OutsideRooms") xoffset 100 yoffset 600
Can someone please tell me what is happening?
Last edited by javiert239 on Sat Apr 20, 2019 3:47 pm, edited 1 time in total.

User avatar
Alex
Lemma-Class Veteran
Posts: 3093
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Problem adding button on a viewport

#2 Post by Alex »


javiert239
Newbie
Posts: 20
Joined: Fri Jul 24, 2015 10:34 pm
Contact:

Re: Problem adding button on a viewport

#3 Post by javiert239 »

That did the trick. Thank you so much!

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], IaMe