Help with scrolling bar for music list on Music room

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
tob447
Newbie
Posts: 1
Joined: Sun Mar 29, 2015 1:08 pm
Contact:

Help with scrolling bar for music list on Music room

#1 Post by tob447 » Sun Mar 29, 2015 2:17 pm

Hey guys Im making the music room for the fate apohenia project and I really need help with a scrolling box that has a list of songs pretty much like the picture below.Can someone help me with an example code please?.I would like those songs to played
when clicked on them ,I think they must be buttons for that.In the picture there is two scrolling lists I want to do both but with an example code I can do both without the need for an specific example code for each one.
Attachments
rsz_211087229_1561611157454306_881086206_o.jpg

User avatar
Daarkess
Regular
Posts: 93
Joined: Mon Jun 10, 2013 11:47 pm
Completed: University Projects (Political Vikings; Hexa Wars; ImaginAlien; Cubo)
Projects: Stained with Magic; Magnicity
Organization: Hikage Studios
Location: Australia
Contact:

Re: Help with scrolling bar for music list on Music room

#2 Post by Daarkess » Tue Mar 31, 2015 12:23 am

This is some code I quickly wrote up. It only covers the scrolling part of the music room. Hope it helps.
Contact me if you need clearer instructions on how to create the full music room in the style you want.

Code: Select all

screen music_room:

    tag menu

    side "c b r":
        area (100, 100, 200, 300)
        
        viewport id "music":
            draggable True mousewheel True
            vbox:
                # The buttons that play each track.
                text "Track 1" #action mr.Play("track1.ogg")
                text "Track 2" #action mr.Play("track2.ogg")
                text "Track 3" #action mr.Play("track3.ogg")
                text "Track 4"
                text "Track 5"
                text "Track 6"
                text "Track 7"
                text "Track 8"
                text "Track 9"
                text "Track 10"
                text "Track 11"
                
                null height 20
                # Buttons that let us advance tracks.
                text "Next" #action mr.Next()
                text "Previous" #action mr.Previous()
                
                null height 20
                # The button that lets the user exit the music room.
                textbutton "Main Menu" action ShowMenu("main_menu")
        bar value XScrollValue("music")
        vbar value YScrollValue("music")
Stained with Magic - Chasing Shadows - - A magic/sci-fi fusion epic split across multiple chapters.

Image

Post Reply

Who is online

Users browsing this forum: Google [Bot]